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

Sohail Khilji
Kilo Patron
Kilo Patron

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 />");

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

View solution in original post

4 REPLIES 4

Sujatha V M
Kilo Patron
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.

Sohail Khilji
Kilo Patron
Kilo Patron

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 />");

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

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

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 />");

☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect