Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Send module url through mail

Vijaykumar K
Tera Contributor

Hi all,

 

I need a help on, how can we send a module url through email notification as hyper link. My use case is when ticket sent for approval and if user clicks on an hyper link that should redirect to " my approval" module inside the native ui 

 

Thanks..

1 ACCEPTED SOLUTION

Not applicable

Hi @Vijaykumar K ,

 

You can do it like this :

 

1. you can simply embedd the url in notification like below : (tested and it worked.)

 

use the url > https://dev214688.service-now.com/sysapproval_approver_list.do?sysparm_query=approverDYNAMIC90d1921e...

 

 

SohailKhilji_1-1711538889194.png

 

OR -

 

Use mail script and call it in your notifcation:

 

template.print(URL + "<br />");

 

View solution in original post

4 REPLIES 4

sujitha16
Kilo Patron

@Vijaykumar K  

 

Try creating a notification email script and append it to your email body of the notification created in approval table as below, 

 

SujathaVM_0-1711538439783.png

 

Notification Email Script: ( I have routed it to portal, you can change it accordingly)

 

 

var URL = '<a href="' + gs.getProperty('glide.servlet.uri') + 'sp?id=approval&table=sysapproval_approver&sys_id=' + current.sys_id + '">' + current.getDisplayValue('document_id') + '</a>';
template.print(URL + "<br />");
 
Note: Using this syntax gs.getProperty('glide.servlet.uri') dynamically picks the instance and routes to the instance specific approval module. 

 

 

Please mark this as helpful and accept it as a solution if this resolves your query.

Thanks,

Sujatha V.M.

Please mark this as helpful and accept it as a solution if this resolves your query.
Sujatha V.M.

Not applicable

Hi @Vijaykumar K ,

 

You can do it like this :

 

1. you can simply embedd the url in notification like below : (tested and it worked.)

 

use the url > https://dev214688.service-now.com/sysapproval_approver_list.do?sysparm_query=approverDYNAMIC90d1921e...

 

 

SohailKhilji_1-1711538889194.png

 

OR -

 

Use mail script and call it in your notifcation:

 

template.print(URL + "<br />");

 

Thank you @Community Alums , pls suggest howcto configure the same if we are sending email notification from workflow 

Not applicable

its goes the same you can configure the notifcaiton and in workflow you can trigger an event to sent the email notification. or you can use send notifcation activity to configure the same

 

mail script :

 

template.print(URL + "<br />");