How to add CC in the notification activity of workflow in ServiceNow

Arun91
Tera Contributor

Hi Team,

I have a requirement to add cc in the notification activity of workflow in ServiceNow. Could some one please help me on that.

 

Thanks in Advance

19 REPLIES 19

Hi @Arun91 

1) Create the event

2) Create notification to fire when the event is triggered (use "when to send" tab to set this up) and specify any recipients (from a field or from "parm1" or "parm2")

3) Within workflow use "create event activity" to specify the event..

Please mark reply as Helpful/Correct, if applicable. Thanks!

 

_Gaurav
Kilo Sage

Hi @Arun91 

You need to create a email script and define the user you want to set as cc in email and then call the email script from the notification.

Steps to create Email Script and how to use:

  1. Navigate to the "Notification email Script" in the "System Notification" in filter navigator.
  2. Set the name of email notification "add_newusers_to_cc".
  3. add below code in the script:
 email.addAddress("cc","email_address_of_the_user","Name_of_ther_user");
//if you want to push the user dynamically then you can use the scripting to validate and push the user.

4. Now navigate to the notification where you want to add cc.

5. add "${mail_script:add_newusers_to_cc}" in "Message HTML" field in "What it will contain" form section of notification.

Kindly mark my answer as Correct and helpful based on the Impact.

Regards,

Gaurav

Arun91
Tera Contributor

I am using notification activity in workflow will it work?

Yes @Arun91 this will work. Also, you can pass the backend value of updated by field to make it
dynamic
email.addAddress("cc",current.updated_by.email,current.updated_by.getDisplayValue());

Arun91
Tera Contributor

It is not working