servicenow email template, notification and notification email script

mandy_zhao
Kilo Contributor

Hi all,

I am working on email notifications, but found a strange issue. When I use email template, and try to include an email script in notification. I will receive a blank mail body.....looks like the template is not working.

find_real_file.png

find_real_file.png

But When I remove the mail script from notification, I can receive the notification with correct mail template content. Do any one know what's the issue?

find_real_file.png

The mail script is used to get a list of users who should be in Cc. My understanding is the template is used to define the mail content, should has nothing do to with the mail script as it's just generate a list of distribution list.

Pls guide how to fix this issue, thanks

1 REPLY 1

Brad Tilton
ServiceNow Employee
ServiceNow Employee

You would have to call the mail script from the template. The way ServiceNow works with templates is if anything is in the subject or message html fields on the notification, it uses that rather than the template. You can't call a mail script from the notification itself and use a template with it. You would either have to call the mail script from the template or add the message html from the template into the notification itself.