Custom Email Header for Specific Task
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 10:06 AM
How can I set a custom main header in ServiceNow for a notification that would be spent for a specific task creation? I saw some solutions for a business rule to attach a custom header, but I wasn't sure if this would result in the header being applied to all entries in the table. We want that notification to be filtered to a queue based on the header, but we don't want all emails getting routed there.
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0756080
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0759108
My hope was to have the header in the notification itself, but I wasn't sure how to set that in a template. And I'm having trouble understanding how the business rule method in the articles above would apply to notifications for only that task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 10:50 AM
Hey bteele,
I would create a custom notification on the notification table and under the 'What it will contain' tab, dotwalk and reference the needed information from the task that generates the notification. This post contains some more info: https://community.servicenow.com/community?id=community_article&sys_id=81a40d6adb1b2300b1b102d5ca961...
Hope this helps,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2022 11:23 AM
Thanks Patrick. I'm fine with the concept of making the notification based on task parameters, but I wasn't sure about how to set the main header for the notification itself via the notification or template? The links I provided have instructions on the script to use in a BR, but I'm not sure about how to format that for the notification or template.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-01-2022 11:02 AM
When you say "custom main header", I'm getting the idea that you don't mean an Email Header (Wikipedia) which is what those two articles are about...
(On the off chance that it is, the answer I think is that - from what I've seen - it doesn't seem like you can configure headers for on the individual Notification records or even mail scripts because there's nothing in the Mail script API to write to the email headers.)
I take it you're referring to a header in the email body, i.e. the one that by default shows the ServiceNow logo?
Take a look at Email Layouts - I think that is what you're looking for. Here's an example in the docs - Use email notification layout (servicenow.com) - of how ServiceNow has a "Next Experience" layout, with the idea that you apply it to all customer facing and it automatically includes the desired header, footer, logos, etc.