Flow Designer - "@" someone

Tom Lapkowicz
Tera Expert

Hello.  In Flow Designer, I have an Update Record step where I am adding a Work Note on a Request Item.  The comment will include a user's name (the name is from a previous step in the flow so I could use the "pil" to get their name).

 

Is it possible that the comment can tag the person (with the "@" symbol)?

 

I tried setting it up as "@" + pil record of user name, the text showed up as "@[person's name]" but didn't actually tag them

3 REPLIES 3

Sandeep Rajput
Tera Patron
Tera Patron

@Tom Lapkowicz I doubt if @mention can be triggered via a flow. It only works if it is made via the native/workspace view from comments/worknote fields. 

Kristen Dettman
Kilo Sage
Kilo Sage

I agree with Sandeep, if that's possible I certainly don't know how to do it.

 

A possible workaround might be to add the user to the work notes list in a previous action, so that when you send the work note they would receive a notification.

Kieran Anson
Kilo Patron

This question came up in sndevs.com and the solution is below:

 

In flow designer, or in scripts, you can use the format as below

@[user_sys_id:name]
where user_sys_id is the sys_user sys_id record
name is the display value of sys_user.name (not user ID field)

 

KieranAnson_0-1739525530266.png

Above not so helpful, as you can't see the pills. But I've taken the caller_id.sys_id and caller_id.name from the trigger record, and put it in the format as above.

 

KieranAnson_1-1739525582849.png

And the result!

 

 

var gr = new GlideRecord('incident');
gr.get('2250f250832b02105e43c4a6feaad337');

var getMentionString = function(userGR){
  
  return gs.getMessage('@[{0}:{1}]' ,
                      [ userGR.getUniqueValue(),
                       userGR.getDisplayValue()])
  
}

var mention = getMentionString(gr.caller_id.getRefRecord());

gr.work_notes.setJournalEntry(gs.getMessage('Hi There {0}, we need you to help', [mention]));
gr.update();