URL in the body of an email sent out via flow designer

Sam10
Tera Expert

Hi All, 

 

I have a requirement to send an email through flow designer upon triggering a condition. Email generates fine except for the URL (link) to the record in the body of email. I did some reading around the community and noticed that one of the users have introduced a link generator, tried it in our San Diego dev environment but it did not work for me.

 

Is there any other way to accomplish this whiteout using a notification? 

 

Thanks! 

2 REPLIES 2

mister_mentor
Kilo Guru

@Sam10 

Are you using the "Send Email" action or the "Send Notification" action? The mail scripts (if that is what you are using for the link) will not work in the "Send Email" action. Using the "Send Notification" allows you to select something from the "Notifications" table that is set to "Send when" > "Triggered".

Aishwarya_R
Tera Contributor

Hi @Sam10 ,

Yes, there is a way to add link to the record in the body of email using "send email" action in flow designer.


Select "Send Email" action.

Go to the Body field. You will see icon next to Body field in the action which allows to write script. Hover over that icon which shows "Toggle scripting on for body".
Then write below code:

var sysId = fd_data.trigger.request_item.sys_id;
var num= fd_data.trigger.request_item.number;
var text = "write your text here <br/><br/>Number: ";
var url = "https://Add your URL here/sp?sys_id="+ sysId +"&view=sp&id=ticket&table=sc_req_item";
var url_final = '<a href = "'+url+'">'+ num +'</a>';
return text + url_final ;


Please mark the answer as correct & helpful if it works for you.

Regards,
Aishwarya