Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

how to add individuals name in email notification?

bala_1312
Tera Contributor

i am sending email notification to multiple people , but in email body i need to write like below -

 

Hello  {name of each individuals} ,

 

A request has been submitted.

 

 

i am trying below scripts but its printing everyones name.

 

var getdata = [];
getdata =current.variables.{variables_name};
var gr = new GlideRecord("sys_user");
gr.addEncodedQuery('sys_idIN' + getdata );
gr.query();
while(gr.next()) {
var name= gr.first_name;
template.print(name);
}

 

how to add individuals name there in email body , please advice .

Thank you.

5 REPLIES 5

BharathChintala
Mega Sage

@bala_1312 

can you send the screen shot of notification who will receive tab

If my inputs have helped with your question, please mark my answer as accepted solution, and give a thumb up.
Bharath Chintala