- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 07:12 AM
I am really struggling to find a solution to this and given the potential uses for it I can't believe it isn't simpler to use so I am hoping I am just missing something.
I have a Flow in which I generate an email to an individual. There is a variable that is gathered part way through the workflow that needs to be picked up and delivered to the recipient of the email. I have a variable on the preceding task (URL type) that is filled in by the group doing the work. Then in the email I add the Data Pill but it just comes out as straight text. I can't seem to fathom a way to convert it to a href. On the net I saw some people doing it via Flow Variables but they were choosing the options Data for type of variable and in Yokohama that no longer seems to be an option. Is anyone able to help me figure this one out?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 08:12 AM - edited 05-28-2025 08:16 AM
Method 1: Use a String Flow Variable with HTML
Create a Flow Variable
- Type: String
- Name: LinkVariable
- Value: <a href="https://yourinstance.service-now.com/your_table.do?sys_id=@{yourRecord.sys_id}">Click here</a>
- Replace your_table and yourRecord.sys_id with the appropriate table name and dynamic data pill
- Set the Variable
Use the "Set Flow Variables" action to populate this variable dynamically using the record's sys_id. Insert into Email
In the Send Email action:- Switch the body to HTML mode.
- Insert the variable like this:Please review the record: @{LinkVariable}
Method 2: Use Built-in Tokens like ${URI} or ${URI_REF}
If you're using email notifications (not Flow Designer's "Send Email" action), you can use:
- ${URI} → Inserts a link with the text "LINK"
- ${URI_REF} → Inserts a link with the record's display value as the link text
These work well in Notification Templates, but not directly in Flow Designer emails
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 08:41 AM
Hi @ChrisWing ,
check my response in the below thread
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 08:12 AM - edited 05-28-2025 08:16 AM
Method 1: Use a String Flow Variable with HTML
Create a Flow Variable
- Type: String
- Name: LinkVariable
- Value: <a href="https://yourinstance.service-now.com/your_table.do?sys_id=@{yourRecord.sys_id}">Click here</a>
- Replace your_table and yourRecord.sys_id with the appropriate table name and dynamic data pill
- Set the Variable
Use the "Set Flow Variables" action to populate this variable dynamically using the record's sys_id. Insert into Email
In the Send Email action:- Switch the body to HTML mode.
- Insert the variable like this:Please review the record: @{LinkVariable}
Method 2: Use Built-in Tokens like ${URI} or ${URI_REF}
If you're using email notifications (not Flow Designer's "Send Email" action), you can use:
- ${URI} → Inserts a link with the text "LINK"
- ${URI_REF} → Inserts a link with the record's display value as the link text
These work well in Notification Templates, but not directly in Flow Designer emails
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 08:26 AM
Hey @Roshnee Dash
So I have to follow Method 1 as I am not doing a notification, but rather the Email Action.
3. switch the body to HTML mode......Where is that capability. I can switch to scripting but there is nothing to dictate that the body should be HTML.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 10:27 AM
You can click on the insert link icon and add the url.
Stay awesome,
Roshnee Dash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2025 05:45 AM
@ChrisWing, Roshnee1's answer was correct, you just forgot to do steps 1 & 2, which are to create and set a flow variable 🙂
The flow variable is the one that will contain the full HTML code for the link that will be referred to in the Email Action.
When filling in the Flow Variables, I will usually use a quick script to generate the HTML code. Here's what it looks like
and here's the actual code.
var retTxt = '<a href="';
retTxt += gs.getProperty('glide.servlet.uri') + gs.generateURL('kb_knowledge', fd_data._1__look_up_record.record.sys_id); //Replace with your actual URL
retTxt += '">';
retTxt += fd_data._1__look_up_record.record.number; //Replace with what you want the user to see
retTxt += '</a>';
return retTxt;
Line 2 is the URL (which in this case refers to a KB in the instance), line 4 will be the text shown to the user. Of course, you can play as you wish with one or the other. From what I see, you're linking to OneDrive, so line 2 would look like retTxt += fd_data.20__Get_Cat...
Then in your email action, just refer to the Flow Variable
HTH