how to set dynamic Email address in CC for the MIM communication plan

Sathwik1
Tera Guru

how to set dynamic Email address in CC for the MIM communication plan?

13 REPLIES 13

No, it was normal notification, I'm asking about communication plan which is in Major incident management.

 

It using Email Client Template

Mailscripts works in email client template as well. Create a mail script to return the values and use the mail script as in email client template as normal notifications 

Ankur Bawiskar
Tera Patron

@Sathwik1 

screenshots please

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 10x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Tanushree Maiti
Tera Patron

Hi @Sathwik1 

 

 

  1. You can create Notification Email Scripts and use below API to add cc in a notification.

 

 

  • Navigate to System Notification > Email > Notification Email Scripts.
  • Click New to create a new script.
  • Name your script  like mim_dynamic_cc
  • Add the following script logic to target the required dynamic recipient

 

(function runMailScript(current, template, email, email_action, event) {  

    // For a dynamic user referenced on the incident form:

   email.addAddress("cc", current.caller_id.manager.email.toString(), current.caller_id.manager.name.toString());

})(current, template, email, email_action, event);

 

2.Call the Script in Your Notification

  • Navigate to System Notification > Email > Notifications and select the notification pertained to MIM
  • Under the What it will contain tab, locate the Message HTML field.
  • Add the email script token to the body of the email in this format:
    ${mail_script:mim_dynamic_cc}
  • Click Update

 

Please Accept the solution if it assisted you with your question & Mark this response as Helpful.
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti

@Tanushree Maiti  Hello Tanushree, as mentioned above, it's not email notification.

 

I'm referring to Email Client Template, which is using in Major Incident Management.. in the Communication Task