Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2026 10:58 AM
Hi @Mundo23
Use a Notification Email Script to evaluate conditions and override the subject line using email.setSubject().
Ref: Email Client Script Dynamically Changing Subject Line
Step 1: Create the Notification Email Script
- Navigate to System Policy > Email > Notification Email Scripts in your ServiceNow instance.
- Click New.
- Set the Name (like set_dynamic_client_subject).
- In the Script field, add your logic.
Sample code :
if (current.client == 'Client A') {
email.setSubject("Important Update for Client A: " + current.number);
} else if (current.client == 'Client B') {
email.setSubject("Important Update for Client B");
} else {
email.setSubject("General Notification: " + current.short_description);
}
Step 2: Add the Script to your Notification
- Open the Email Notification you want to send.
- Call email script from within the body : ${mail_script:set_dynamic_client_subject}
Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti