Populate recipients First name in the email body for a particular group

taylor13
Tera Contributor

I am trying to send an email notification to a group of users. I have a salutation in the Body of the email saying Hello "Name". How do I populate the recipients name in "Name" such that each user who receives the email gets their own name in the email salutation? 

 

@Ankur Bawiskar @Community Alums @Aman Kumar S 

1 ACCEPTED SOLUTION

Ramu Neelam
Giga Expert

Hi Taylor,

If the notification recipient is a group, then system generates only one single email and content will not be generated dynamically for each individual recipient.  However, if you are ok to have all the recipients separated by comma or slash then you can achieve this using email script:

Write an email script and get the recipient name(s) from the group and then generate a concatenate string will all the recipients separated by "/". For example, the notification group is Business_Users_Group which contains two users in it (Ramu Neelam and Taylor Joy). The email script iterates the group members and generates a string "Hello Ramu / Taylor".

Please keep in mind that ServiceNow generates single email and send it to all the group members but not multiple individual emails (separate email for each recipient). So, you can't generate email body like "Hello Ramu" for Ramu's email and "Hello Taylor" for tailor email because it is only one email where both Ramu and Taylor is copied.

 

Please let me know if you need any help with the email script.

 

Thanks,

Ramu Neelam

View solution in original post

11 REPLIES 11

Aman Kumar S
Kilo Patron

Hi @taylor13 ,

Where your user inofrmation is?

Lets say, if you are senifn to caller of your incident, it should be something like

Hello ${caller_id.first_name}

Best Regards
Aman Kumar

Hello Aman,

Thanks for your quick reply!

Actually we are providing assessment approval notification in Risk Assessment Module. as per OOTB functionality its taking only Entity Owner name. we want to send notification to Particular Group assume XYZ is a Group and we both are part of that Group. so, whenever i received the email I want message as a Hello Taylor joy, for you it will be Aman Kumar.

 

Actually I have Tried the email script trying to call out in the notifications but it's not working

Share your email script and how are you embedding it in the notification

Best Regards
Aman Kumar

Community Alums
Not applicable

Hi @taylor13 ,

What is the name of the OOTB notification?