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

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

That sounds interesting! I might be able to get it to reference a Script Include that will do all the work. Thanks! I'll experiment with this and post back with results.

Tested on a similar use case and can confirm running Script Include works and does the job

Raf1
Tera Guru

You should be able to directly specify this as CC on your template:

find_real_file.png