8

In our community, we want to post automated welcome messages in Chatter. Does anyone know if it is possible to use a flow and process builder to post to Chatter on behalf of another user, like say a community manager. I know that the ConnectApi does not allow this, but you can get around this in plain apex. I'm also curious if there is a declarative way around this as well.

3
  • If you can do it in plain Apex, you might want to think about an invocable that can be called from a flow.
    – crmprogdev
    Commented Dec 9, 2016 at 3:56
  • Invocable is a good second option, thanks for mentioning. I'm still curious about doing this entirely declaratively.
    – greenstork
    Commented Dec 9, 2016 at 17:40
  • Not sure if I have seen an option for a Process Builder to run as a specified user, it normally runs as a system user and flow runs as the calling user. Think this is worth trying to build a poc for.
    – Dave Humm
    Commented Dec 10, 2016 at 2:58

1 Answer 1

4

You can set CreatedById on FeedItem in visual workflow.

This will set who the post is from.

Couldnt figure out a way to do it in process builder, as the 'post to chatter' functionality doesnt let you set this, and 'feedItem' is not listed in the 'create a record' option

Screenshot of my assignment element and the test flow below

Assignment element to construct feedItem sObject variable

assignment element

Flow

flow overview

This flow successfully created a post on the ParentId user's feed, from the User set as CreatedById

feedItem created

Came across another sfse post that highlights one limitation of this approach - you can't at mention anyone or use topics. Also not sure about any community specific considerations.

To at mention you need to use the standard post to chatter element, but it doesn't appear like you can set created by id going that route.

So if you need at mention capabilities along w created by id, a custom Apex plugin likely is needed.

1
  • 1
    The message body looks like something we'd all like to see.
    – Dave Humm
    Commented Jan 8, 2017 at 22:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .