Need to put user in cc for approval email
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 01:51 AM
Hi All,
There is a notification on the approval table which gets triggered every time a record is inserted into the approval table, however, we have a requirement that we need to cc a user XYZ in all the approval notifications. Please suggest.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 01:59 AM
Write a email notification script and embed that in your approval notification using:
email.addAddress("cc","emailaddress","Name of user");
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-26-2022 02:28 AM
Hi,
Are you willing to update the OOB Notification on sysapproval_approver table?
If yes then you will have to use email script and ensure the CC user is being set only for your catalog item approval and not for every item
Create email script and include it in your email notification body
(function runMailScript(/* GlideRecord */ current, /* TemplatePrinter */ template,
/* Optional EmailOutbound */ email, /* Optional GlideRecord */ email_action,
/* Optional GlideRecord */ event) {
// Add your code here
var gr = new GlideRecord("sc_req_item");
gr.addQuery("cat_item.name", "Your Item Name here"); // give your item name
gr.addQuery("sys_id", current.sysapproval);
gr.query();
if (gr.next()) {
email.addAddress("cc","xyz@test.com","XYZ"); // give correct email address and correct display name of user
}
})(current, template, email, email_action, event);
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader