Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Flow Designer Send Email Action – HTML Link Variable Not Rendering in Email

swethavelu
Tera Contributor

Hi Community,

I’m working on a Flow Designer flow in ServiceNow where I need to send an email with a clickable link that directs the recipient to a Case record.

Here’s what I’ve done so far:

  • Created a Flow Variable named linkvariable using Set Flow Variables action.
  • The value of the variable is:
     
    swethavelu_0-1763634674845.png

    In the Send Email action, switched the body to HTML mode and added:

    <p>Please review the case: @{linkvariable}</p>

Issue:
When the email is sent, instead of rendering the link, the email shows: Please review the case: @{linkvariable}.The variable is not being replaced at runtime.

But when I manually tested the flow I can see the corrct runtime value which is redirecting to case, but not binding in the email.

swethavelu_1-1763634883515.png

Questions:

  1. Is there a correct way to use Flow Variables with HTML in Send Email action?
  2. Do I need to escape HTML or use a different approach (like a script)?
  3. Any best practices for sending dynamic record links in Flow Designer emails?

Thanks in advance for your help!

 

Regards,

swetha.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@swethavelu 

see my blog on how to do this

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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

7 REPLIES 7

@swethavelu 

it should work fine.

Can you try to add the Send Email action again and publish and then test again?

💡 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Sanjay191
Tera Sage
Tera Sage

Hi @swethavelu 
try to create notification on case table use the notification in your flow  and try to create email to script that dynamically build link that redirect to the record.

Sanjay191_0-1763635748720.png

 

please check the below thread for the email script and dyncamic link generation

 https://www.servicenow.com/community/developer-forum/how-to-embed-a-dynamic-link-in-the-email-notifi...

If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
Thank You