Notification, Who will receive(cc) doesn't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 08:04 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 08:57 PM - edited 07-16-2024 09:09 PM
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:
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 12:39 PM - edited 03-27-2025 03:11 PM
gs.eventQueue("your_event_name", current, 'sncommunity@servicenow.com');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 10:43 PM
Hi @MJHuang
Who will receive section is for 'to' in emails. For 'cc', you will have to write Notification Email script only.
Regards,
Amit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 11:44 PM
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");
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak