+ Start a Discussion
Todd B.Todd B. 

Creating an @Mention in Chatter using a flow

I am trying to create a Chatter post from a visual workflow.  When an Oppty is won, I want to create a Chatter post congratulating the Oppty owner and have it come from their Manager.  So far I can I can do all that using the Create Record Action
User-added image

The issue I am running into, I want to @mention the Manager (so they know they "sent" a chatter post) so I created a text body formula:
User-added image 
but the Chatter post is listing the id, and not doing a true @mention
User-added image

Any ideas on how to do a proper @mention via a formula?

Thanks, 

Todd B. 
 
NagendraNagendra (Salesforce Developers) 
Hi Todd,

Please check below link from stack exchange community which will help you to accelerate on the above requirement. Hope this helps.

Best Regards,
Nagendra.P
Alexis KasperaviciusAlexis Kasperavicius
You have to put square brackets around the id of the user. @[UserId] This one got me because it's not immediately obvious from looking at the help article here (https://help.salesforce.com/articleView?id=vpm_designer_elements_action_feed.htm&type=5), but that's the trick, square brackets around the ID.

Below is example I just tested in a process builder chat mention and works perfectly:
 
@[{![Task].Owner:User.Id}] This task is over 90 days old and has been closed as abandoned. It will no longer appear as an open task. To re-open it, set the due date in the future.

Mark as solved to make this easy to find! 
Hoc NgoHoc Ngo

Hello,

Is anyone able to confirm if this still works? Im trying it on my end and it doesn't work for me. I am trying to use this in a formula field 
 

[FeedItem].Parent:Opportunity.OwnerId
 

and I added 
 

@[{![FeedItem].Parent:Opportunity.OwnerId}]
Jim Nichols 1Jim Nichols 1
This just worked for me.@[{!$Record.Owner_Manager_ID__c}]