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.

Scripted Recipients in a Communication Plan

stevejarman
Tera Guru

I'm currently configuring Major Incident module. Within the Communications Plan, I need to be able to dynamically script the recipients of each of the emails that are going out from the MIM Workbench. I've done the following:

Created a Notification Email Script:

find_real_file.png

Referenced it in the Email Client Template in the Communications Plan:

find_real_file.png

Execute the comms from the MIM Workbench. I'm expecting to see myself as a recipient in that box, but it's not happening:

find_real_file.png

Anyone have any thoughts/pointers?

1 ACCEPTED SOLUTION

Manish Vinayak1
Tera Guru

Hi Steve,

I tried the same thing in an email client template and got the same result. However then I tried putting "javascript:" in the "CC" field definition in the email client template, and it works!

Here is the example:

find_real_file.png

You can see I tried using the following line as one recipient:

javascript:"manish.vinayak@" + "example1.com"

and other recipient after having a "," as :

manish.vinayak@example2.com

And I observed, it actually processes the Javascript as one recipient. Here is the result of that configuration:

find_real_file.png

 

I didn't expect it to work; but it did 🙂 Give it a try.

 

Hope this helps!

Cheers,

Manish

View solution in original post

7 REPLIES 7

The values I'll be adding aren't static.

I see, you can then try to create a script include and call it from the CC field like:

javascript: new commEmail().getCC();

nimerkawwa
Giga Expert

You should look into "Recipients List".

Create a recipient list using Dynamic filter or Script.

In the communication plan definition, under the "communication contact definition" you should be able to choose a "Recipient List" instead of User or Group.