- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2025 09:03 AM
Hello,
I have a requirement, i need to send notification to all users of a particular group as CC.
anyone can help me on this
thanks in advance.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2025 09:09 AM
you will have to use email script and then iterate over sys_user_grmember table and use this line
email.addAddress("cc", "email", "name");
something like this
(function runMailScript(current, template, email, email_action, event) {
// Add your code here
var gr = new GlideRecord("sys_user_grmember");
gr.addQuery("group.name", "Group ABC");
gr.query();
while (gr.next()) {
email.addAddress("cc", gr.user.email.toString(), gr.user.getDisplayValue());
}
})(current, template, email, email_action, event);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2025 09:16 AM
You can write below script to get the users email addresses from a group and add them to cc
var emails = [];
var grMem = new GlideRecord('sys_user_grmember');
grMem.addQuery('sys_id', 'giveyourgroupsysidhere');
grMem.query();
while(grMem.next())
{
email.addAddress("cc", grMem.user.email, grMem.user.getDisplayValue());
}
Accept the solution and mark as helpful if it does, to benefit future readers.
Regards,
Sumanth