This action posts to chatter in a way similar to the built-in Post to Chatter action. It supports the subset of rich text that Chatter supports. You can pass it a Text Template with rich text formatting, or simply provide it with some HTML text.
This is an invocable action, also known as a process action, and runs in Flow Builder, Process Builder, Bot Builder, and Strategy Builder.
Handling is as follows:
Bold, Underline, List (Bullets and Numbers), Italics get displayed in Chatter without any modification.
URLs and Images get displayed in Chatter but are modified. Both are rendered in Chatter as clickable links (there’s probably a way to improve this action’s Apex to display these more effectively inline, if there are any Apex Chatter experts out there reading this).
The following rich text formatting elements available in Flow are not supported in Chatter, so they get stripped out:
- Font Size
- Font Family
- Font Color
|body||String||Can be HTML, which also means a Flow Text Template with formatting. See documentation for information on how various formatting is affected.|
|targetId||String||Can be the id of a User or Group, the string ‘me’ (which represents the current user) or the name of a user or group. The action will first try and match this value to a known name and then assume it’s an Id.|
|communityId||String||If null, the user’s current community is used.|
Support for @Mentions
This action will attempt to convert any recordId it sees in the Body that is in braces to an @mention. So if you put this in a Flow Text Template:
and curGroup is a flow variable of type Text that contains a recordId, you’ll get an @mention in the Chatter:
This action makes extensive use of ConnectionApiHelper.