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.

How to use email script in quick message

rakesh241
Giga Contributor

Hi Team,

My requirement is to put a hyperlink "click here" in one of the quick message. On click of which users should be redirected to a portal page. For this I am trying to create an email script which dynamically gets the current instance url and I am using this email script in quick message. But I learnt that we can not use email Scripts in Quick Message. Please advice me how do I achieve this without using the Email script.

Quick Message content:

Your ticket, reference number ${sn_customerservice_case.number} has been closed.
If your issue or request was not resolved to your satisfaction please contact the Customer Success Manager here. ${mail_script:TestMailScript}

Email Script content:

template.print("<a href='https://"+gs.getProperty("instance_name")+".service-now.com/lsaascsm'>Customer Portal</a>"

This mail script is working fine in Email Notifications.

Thanks in Advance

Rakesh

 

1 REPLY 1

mmaraj1
Mega Expert

check these post out

https://community.servicenow.com/community?id=community_question&sys_id=0257c369db1cdbc01dcaf3231f961934

 

Quick Messages - customisation

 

https://community.servicenow.com/community?id=community_question&sys_id=74e90729db5cdbc01dcaf3231f9619c3