How to add an url in email notifications?

anusha9918
Kilo Contributor

Hi,

Please suggest me how to add a URL in notifications.

9 REPLIES 9

The ServiceNow Wiki content is no longer supported. Updated information about this topic is located here: Scripting for Email Notifications




Visit http://docs.servicenow.com for the latest product documentation


Shantharao
Kilo Sage

Hi Anusha,



First u create   a Notification Email Scripts     like below



var temp = event.parm1;


var user = new JSON().decode(temp);


template.print('Click here to approve <a href="https://give urs instance url here/nav_to.do?uri=sysapproval_approver.do?sys_id=' + user.approval_sys_id + '"> Google </a>');



and call above Notification Email Scripts in your notification body like below


${mail_script:Notification Email Script Name}


anusha9918
Kilo Contributor

Hi All,



Thanks for the replies.



I was trying to display an URL in the notification which is fixed one. I added that URL in html source code, it is working fine.



Thanks,


Anusha


Hi Anusha,



If your query is resolved, please mark the answer as correct and also hit Like and Helpful so as to close the thread



Thanks


Ankur


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

Hi Anusha,



Is your query resolved? If yes then kindly mark answer as correct so that this thread is closed.



Thanks


Ankur


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