2

Ok, I have my flow creating a FeedItem record but I can't get the @mention to work properly. I am posting to a Chatter Group so I can't use the ParentID field and the related to field is referencing a WorkThanks record.

In the body of the post I have this formula: {!varMessage} & '@[' + {!WhoToThank} + ']'

WhoToThank is the ID of the user.

I get this result: enter image description here

I assume it has something to do with my formula syntax but I don't know how to fix it.

Any ideas?

1
  • I have also tried just putting @[{!WhoToThank}] in the body and it still doesn't work.
    – Matt M
    Commented Dec 4, 2015 at 17:24

5 Answers 5

3

It's always helpful if you post images of your flow for this kind of troubleshooting. I'm assuming that you're using a record create on the feed item. Rather than this, please use the standard "Post To Chatter Action."

In the following example, I lookup my user record and then use the post to chatter action to post dynamically to my user record and @mention.

enter image description here

However, the issue that you're having here is that you're creating a record and then trying create a feed item. When you create a feed item, it will create it as plain text. Chatter posts that need at mentions must go through the streaming API, which the standard post to chatter action does. For this specific use case, you will need to create an apex plugin that does this work for you.

2

This was posted a few years ago so there may have been an update to flow - following up for future reference. I am able to @ mention users in chatter posts from flow using a text template resource to bring in the record ownerid that I retrieved in a get element.

Create a "Post to Chatter" Core action Create a new resource for the Message, make it a text template. If you stored the record owner in a Get element, brought in from process builder, record triggered flow, etc. you should reference the Id like this:

@[{!Get_Customer_Voice_Record_1_5.OwnerId}]

Then you can insert any additional data or text you want to have in the chatter post.

0

Is the WhoToThank record a user or a salesforce record? If it is a record Id then you need to reference the user associated with that record. try something like this..

can you try @[{![WhoToThank].UserId__c}]

5
  • The WhoToThank value is the ID of the user.
    – Matt M
    Commented Dec 4, 2015 at 19:03
  • Have you tried @{!WhoToThank} Commented Dec 4, 2015 at 19:05
  • Yep, anything I try just keeps getting turned into a string.
    – Matt M
    Commented Dec 4, 2015 at 19:08
  • Looks like this won't work. SF has a custom action for performing an @mention which doesn't help me as I need to set the relatedto and parentid values.
    – Matt M
    Commented Dec 4, 2015 at 19:30
  • help.salesforce.com/…
    – Matt M
    Commented Dec 4, 2015 at 19:30
0

You have to do this in Process Builder, not Flow. Unless there has been a change you can't get the @MentionUserName to work in Flow. Process Builder has a different UI for when you post to chatter.

You might have to do some sort of Process Builder --> Flow --> Process Builder process to get the Flow to trigger your second Process Builder that makes the post based on the data you are updating. But, I am not sure what is going on in your Flow to say for sure -- or if you could do it all within Process Builder (as it looks like you might)

0

I tried with @[{!$Record.OwnerId}] and it worked.

0

You must log in to answer this question.

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