How can I have 2 different email subjects in one email notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-24-2022 04:54 AM
Hi All,
I have a requirement where based on some conditions I have to show different email subject to different groups. Can you help me with how to acheive this ?
Thanks
Pranav

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-24-2022 05:00 AM
Hi Pranav,
1. You can generate an event queue which will have one subject line.
2. Other subject you can create from the subject field.
3. Manage conditions for other groups in your email script/event.
Please mark my answer correct/helpful, based on impact.
Regards
Aditi Sharma
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-24-2022 05:01 AM
Hi Pranav,
You can achieve this by using mail script. You would need to use email.setSubject function to set subject based on your required condition.
FYR : Setting email subject with a mail script
Let me know if you have any further queries.
Please mark this as Correct or Helpful if it helps.
Thanks and Regards,
Abhijit
Regards,
Abhijit
ServiceNow MVP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā02-24-2022 05:03 AM
Hi Pranav,
You can use email.setFrom to set a from Email ID.
email.setFrom(current.caller_id.email);
email.setReplyTo("joe.employee@yourcompany.com");
email.setSubject("This is the new subject line");
email.setBody("This is the new body");
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep