Building a Friendly URL Link in an Email Notification in Flow Designer

jmiskey
Kilo Sage

I have built a Flow that lookups multiple records from a custom table we have created.  I am then using a For each to loop through each of those records.  I would like to send an email out for each record, so I am using the "Send Email" Flow action.  In the body, I would like to include a "friendly" link to the current custom table record.  So my link would display the Number field for this record, and link back to the record.  How can I do this in the Body of this "Send Email Action"?

 

I am able build the URL for the link that I need, but I am not sure how to have this link display the Number field of the record instead of showing the whole, long URL.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron

@jmiskey 

check this blog where I shared approach, enhance it

ServiceNow Flow Designer: Adding Record Link in "Send Email" flow action 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

Rishi_11
Mega Sage

Hi @jmiskey ,

 

Not really sure if the "send email" action supports email scripts. This can be done easily when triggering emails through email notifications using ${URI_REF}.

 

I would recommend to trigger an event from the flow and then use that event to trigger the notification. If number field is the display value of your record ${URI_REF} should work fine, if some other field is the display value, then you can use a email script to create a hyperlink and add it to the email.

 

Please mark this response as helpful/solved, if it helped with your query.

 

Regards,

Rishi.

 

Thanks for the reply, but that isn't really what I was looking for.  I know I can do it via triggering Email Notifications via events.  I just want to see/understand if there is a way to do it directly in the Email Action itself, some "trick" I may be overlooking/missing.

In this case, as @Ankur Bawiskar  has mentioned you can make use of flow variables and then use that flow variable in the email body,

 

Regards,

Rishi.

Ankur Bawiskar
Tera Patron

@jmiskey 

check this blog where I shared approach, enhance it

ServiceNow Flow Designer: Adding Record Link in "Send Email" flow action 

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader