Flow: How To Post To Chatter In Two Ways

Chatter is a very handy tool for collaborating with your teammates. Do you know there are also two ways to post to chatter from Flow? Let’s dive into the two very different solution!

1 – Use Standard “Post To Chatter” Action

Step 1 – Create a “Plain-Text” Template

The standard action only supports plain text. In your template, you can add three interactive items – Mention, Topic, or Link to Record:

  • Mention: @[ ] and put User or Group Id inside.
  • Topic: #[ ] and put strings inside.
  • Link to Record: We can’t use the / notation, so use the following formula instead.
Record Link: {!CustomDomain}{!Record.id}
Custom Domain: LEFT({!$Api.Enterprise_Server_URL_540},FIND("/services", {!$Api.Enterprise_Server_URL_540})) 
Step 2 – Choose “Post To Chatter” Action

The official help article explains each field really well. Additional note on the Target Type – this is only required if you fill in a username or group name in the “Target Name or ID” field, not if you fill in the Id.

Result

2 – Use “Create Records”

Step 1 – Create a “Rich-Text” Template

It is a bummer that currently the chatter actions in Process Builder and Flow don’t support rich-text. There is an open idea to upvote. It is from the same post that I found this amazing workaround to post in rich-text! So let’s get our rich-text template ready.

Step 2 – Use “Create Records” on Feed Item Object

Here you can find the definition of each field, but the most important fields are Parent Id, Body, and IsRichText.

Parent Id corresponds to Target Name or Id and Body corresponds to Message. We have to set IsRichText to True so we can post a rich-text content.

The only downside is that Mention will no longer work in this method.

Result
  • Rich Text Template with Create Records
.
  • Rich Text Template with Post To Chatter Action

When To Use Which?

Always go with the Standard Action first

Feed Item is a complex object, so always try to go with the standard action first to minimize the risk. If there is a strong reason that you need to post in rich-text, you can then use the Create Records method after a thorough review and testing.

Is This Helpful? Check Out Flow Use Cases Or Write Us One!

Subscribe
Notify of
guest

3 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Gustavo seluja

Awesome, Melody. I didn’t know about the plain text constraint, I’ve seen it and didn’t know the reason for not using rich text. Thank you!

Fred Tchang

Hi Melody, thanks for this, very helpful! Do you have an opinion on the UnofficialSF action? Post Rich Content to Chatter with the ‘PostRichChatter2’ Action Your option #2 seems simple enough, but perhaps the unofficialSF action is helpful in that you can include @mentions, and will strip out any html that isn’t acceptable to chatter posts. But then there might be drawbacks, have not tried it yet.

Madhavi Kancharla

Hi, I am having a requirement to use the rich text template and at the same time mentions also needed. Is there any workaround that I can opt here?