Notification, Who will receive(cc) doesn't work

MJHuang
Tera Contributor

I set the notification receiver in  Who will receive(CC) tab.

But the CC are not working? I want to know the reason.

 

On the other hand, add CC by email script is OK, but in Who will receive(CC) is not working.

BTW, the notification is trigger by some event. And I don't want to set the CC in email script.

4 REPLIES 4

SN_Learn
Kilo Patron
Kilo Patron

Hi @MJHuang ,

 

As you are using event for triggering the notification, you can pass the recipient in parameter 1 or parameter 2 of the event as below:

gs.eventQueue("your_event_name", current,  'sncommunity@servicenow.com');

This email will be in paramater1, now in the notification you have to check the 'Event parm 1 contains recipient' as below:

SN_Learn_0-1721189331147.png

 

Note: I have put email as 'sncommunity@servicenow.com', you can make it dynamic and pass that as parameter.

 

 

The notification's Who will receive section does not have fields for CC or BCC recipients. You have to utilize the notification email script for that.

Reference: Notification Email Scripts 

 

Mark this as Helpful / Accept the Solution if this helps

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

 

gs.eventQueue("your_event_name", current,  'sncommunity@servicenow.com');

 

Amit Pandey
Kilo Sage

Hi @MJHuang 

 

Who will receive section is for 'to' in emails. For 'cc', you will have to write Notification Email script only.

 

Regards,

Amit

Community Alums
Not applicable

Hi @MJHuang ,

You can add CC by 2 ways given below 

1. 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. Add below 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.

 

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

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

2. By event you can give the name of user in parm1 or parm2 and in who will receive tab you can check the box 

 

gs.eventQueue("add_event_name_here", current,  "user_email", "Parm2");

 

SarthakKashyap_0-1721198529319.png

 

Please mark my answer correct and helpful if this works for you

Thanks and Regards 

Sarthak