- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 02:54 AM
Hi,
I have an Email Notification which is sent to the Group XYZ. How can I get the User's Name of each member in the group XYZ so that I can start the notification with a personalized greeting for each.
Is there, for example, a field that I can use in the notification body or do I have to write a script? If yes, which variable can I use to get the email's recipients in the mail script.
Thanks in advanced!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 09:24 AM
Hi
This behavior is by design!
ServiceNow Notifications work to fire ONE Email per Notification that is fired (with one exception, that ServiceNow will create automatically several SIMILAR Emails if the number of recipients for ONE Mail exceeds 100).
Result A:
ONE Email sent to (e.g.) 55 Recipients (in the "TO", "CC" or "BCC" field). This creates ONE Email object in your Outbox/Sent mailboxes
In that case, you cannot send the SAME Email with an individual and personalized greeting like you are trying to do.
In that case, you also need to create an individual email per each recipient.
Result B:
Having 55 Recipients, you will end up in having 55 individual email records in your outbox/sent mailbox in ServiceNow, each having only ONE Recipient in either the "TO", "CC" or "BCC" field.
What you are heading for, is "Result B", which you could achieve by using the Mail API (and maybe a script holding a look to fire the desired number of Notifications - e.g. by firing Events, etc.)
So, you cannot create ONE Email holding personalized greetings based on one Notification, but you can create any number of different personalized emails based on one Notification - using scripting.
Let me know if that answers your question and mark my answer as correct/helpful.
Thanks & BR
Dirk

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 04:28 AM
Hi
You can use a mail script in the Subject line as well.
Maybe that solves your issue.
Let me know.
BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 05:07 AM
Unfortunenatly not. I know that I can use a script in the subject. But I don't know how I script a personalized greeting for each recipient.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 09:24 AM
Hi
This behavior is by design!
ServiceNow Notifications work to fire ONE Email per Notification that is fired (with one exception, that ServiceNow will create automatically several SIMILAR Emails if the number of recipients for ONE Mail exceeds 100).
Result A:
ONE Email sent to (e.g.) 55 Recipients (in the "TO", "CC" or "BCC" field). This creates ONE Email object in your Outbox/Sent mailboxes
In that case, you cannot send the SAME Email with an individual and personalized greeting like you are trying to do.
In that case, you also need to create an individual email per each recipient.
Result B:
Having 55 Recipients, you will end up in having 55 individual email records in your outbox/sent mailbox in ServiceNow, each having only ONE Recipient in either the "TO", "CC" or "BCC" field.
What you are heading for, is "Result B", which you could achieve by using the Mail API (and maybe a script holding a look to fire the desired number of Notifications - e.g. by firing Events, etc.)
So, you cannot create ONE Email holding personalized greetings based on one Notification, but you can create any number of different personalized emails based on one Notification - using scripting.
Let me know if that answers your question and mark my answer as correct/helpful.
Thanks & BR
Dirk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2020 11:06 PM
Thank you for your detailed answer! Then I rather prefer a single email with a general greeting than creating one mail record for each recipient.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2020 12:25 PM
Perfect. I am happy, that I was able to sort out for you.
Have fun - enjoy ServiceNow.
BR
Dirk