How to set dynamic email template on a single email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2022 02:42 AM
Hi All,
I have 100s of email templates which needs to be set on an email notification dynamically based on a condition. Is this possible? Can I set email template from email script? If so, can someone please help me with the command please.
I'm not looking to create 100s of notification.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2022 02:00 PM
Hi Prinsu,
For multiple conditions, I usually do create individual notifications. However, using Insert and Stay makes this process easy to create multiple different notifications.
Reference:
You can create one mail script and call it with ${mail_script:[name of mail script]}
Mail scripts are written in System Notifications > Email > Notification Email Scripts. Documentation here: https://docs.servicenow.com/en-US/bundle/tokyo-servicenow-platform/page/script/server-scripting/conc...

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2022 02:50 PM
Do you have 100s of email templates? How different are those from each other?
There is no script which apply a template to the notification.
You can definitely use email script to put content in it. But if the templates are in hundred, not sure if you can script all the html in those.
Please mark this response as correct or helpful if it assisted you with your question.