How to add all variables into the notification while using one email template

VIKAS MISHRA
Tera Contributor

I have one notification that gets triggers to users to approve the request. one email template is already being used in that notification and this is the reason notification body is blank because all the required email script gets called through that template only. 

now i want to call one email script from the notification body so that it will print all the request's variable into the notification.

But not sure how call the email script from notification body when one email template is already being called.

2 REPLIES 2

Riya Verma
Kilo Sage
Kilo Sage

Hi @VIKAS MISHRA ,

Hope you are doing great.

To call the additional email script, you need to follow these steps:

  1. Open the "Approval_Template" email template in the ServiceNow platform.

  2. Locate the section within the email template where the notification body is defined. This section typically contains HTML code or a text field.

  3. Within the notification body section, add the following script invocation code where you want the additional email script to be executed:

 

${gs.include('additional_email_script')}

 

  • save the changes
Please mark the appropriate response as correct answer and helpful, This may help other community users to follow correct solution.
Regards,
Riya Verma

I have added line no. 5 and heiglight that also, please see the below screenshot 

howveevr still not working.

VIKASMISHRA_0-1687343202827.png