How to send notifications to multiple users in create event?

Ed23
Tera Contributor

Hello,

I would like to know how I can send messages to multiple users using "create event" activity, for example.

If the sla reaches 50%, a notification is sent to the assigned user, when it reaches 80% a notification is sent to the assigned user and to user A, the second user who receives the notification will change depending on the assigned group. If the group is "Production" and the sla reaches 80%, a notification is sent to the assigned user and user B. If the group is "Security" and the sla reaches 80%, a notification is sent to the assigned user and user C.

Thanks.

find_real_file.png

1 ACCEPTED SOLUTION

Hi Ed,Try this in Param1

(function() {
return current.task.assigned_to + ",xyz@gmail.com";
}());

 

you can also add in your notification directly ( Note that every time this notification is triggered the user will be included in recipients)

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

View solution in original post

10 REPLIES 10

So while creating event from activity we can send parameters where we can include recipents too.

lets say my event name is test.event1 and i can send parameters to it.

  • So i'll trigger create event activity with event name test.event1 from workflow
  • With param1 value as "xyz@gmail.com,abc@gmail.com".
  • I will check Event parm 1 contains recipient checkbox in my notification so the parameters passed from activity are actually treated as recipients.

Create Event : https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/workflow-activities/re...

Notifications: https://docs.servicenow.com/bundle/quebec-servicenow-platform/page/administer/notification/task/t_Cr...

Example : https://gyde.ai/kb/servicenow/notification-example:-assignment-notification

https://developer.servicenow.com/dev.do#!/learn/courses/paris/app_store_learnv2_automatingapps_paris...


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

It's okay like this?, using: current.task.assigned_to,"cvelando@centria.net";

When I check the records in "sys_email" I only see that 2 emails were sent, one for the assigned when the sla reaches 50% and another to user A when the sla reaches 80%, there should be 2 emails when it reaches 80% one for the assigned and another for user A.

find_real_file.pngfind_real_file.png

Hi Ed,Try this in Param1

(function() {
return current.task.assigned_to + ",xyz@gmail.com";
}());

 

you can also add in your notification directly ( Note that every time this notification is triggered the user will be included in recipients)

find_real_file.png


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

Thanks Rohila,

It is good to make conditionals like this to know if the "task.assignment_group" is "Production", "Security", to send emails to different users?. I have noticed that when it reaches 80% it takes a few minutes to send the emails.

find_real_file.png

If all the events you are triggering are same and only parameters are different then you can directly write if else code instead of multiple if activities.

if( ){}

else if(){}

else{}

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP