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.

Add multiple users to the event parameter to receive notification

Harish74
Tera Expert

Hi, 

I'm trying to send a notification when the project(pm_project) state got updated. 

The recipients should be:

The project manager(who is on the project record)

Managers of each of the Resource group(From the Resource plans under that project)

For suppose, if there are 5 Resource plans under that project, I should send the notification to all of the group managers of those 5 Resource plans.

I'm using an event to do this as shown:

gs.eventQueue('project_state_updated', current, ' ', ' ');

Please help me on how to pass all those 5 users in the above event parameter.

 

1 ACCEPTED SOLUTION

Harish KM
Kilo Patron
Kilo Patron

Hi refer the below links

https://community.servicenow.com/community?id=community_question&sys_id=b45f0283dbea0c544819fb243996193b

https://community.servicenow.com/community?id=community_question&sys_id=2ed003a5db98dbc01dcaf3231f961943

Regards
Harish

View solution in original post

3 REPLIES 3

suvro
Mega Sage

You can pass the comma separated values of the recipients in parm1 and in the notifications whom to send tab. Check the Event parm 1 contains recipient checkbox

  • Event parm 1 contains recipient: When using Event is fired to trigger the notification, pass the recipients in a comma separated-list as parm1 in gs.eventQueue().

So it should be

gs.eventQueue('project_state_updated', current, variable_containing_comma_separated_recipients, ' ');

Harish KM
Kilo Patron
Kilo Patron

Hi refer the below links

https://community.servicenow.com/community?id=community_question&sys_id=b45f0283dbea0c544819fb243996193b

https://community.servicenow.com/community?id=community_question&sys_id=2ed003a5db98dbc01dcaf3231f961943

Regards
Harish

Hi @Harish KM

I would like to do the same thing using the Flow designer. How can I get the managers into an array in Flow designer?