Send a notification quarterly to Group managers to manage their group members.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 04:08 AM
Hello,
I have a requirement to send an email out to all of our ServiceNow assignment group managers on a Quarterly basis asking them to review the member of the group you manage in servicenow. If anyone know how to create this notifcation please share your ideas.
-- "group you manage" link which should be on email notiication content and once manager click on that link then it redirected to the group table with filter --" Manager - IsDynamic- Me ". I have attached the screenshot of the page which should be redirected to the group table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2023 11:12 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2023 09:07 AM
To send an email notification out to all of your ServiceNow assignment group managers on a Quarterly basis, you can follow these steps:
Create a new notification in ServiceNow. You can do this by navigating to System Policy > Notifications > Notifications and clicking on the New button.
In the Notification form, enter a meaningful name for the notification in the Name field.
In the Recipients field, enter the email addresses of all the ServiceNow assignment group managers you want to send the notification to. You can use a comma-separated list of email addresses.
In the Message field, compose your message. You can use variables in your message to personalize it for each recipient. For example, you can use the ${recipient.name} variable to insert the name of the recipient in the message.
In the Notification Conditions section, configure the conditions for when the notification should be sent. In this case, you can set the condition to Quarterly by configuring the notification to be sent every 90 days.
To include the link to the "group you manage" page in the email notification, you can create a new UI Action in the Group table. To do this, navigate to System Definition > UI Actions > UI Actions and click on the New button.
In the UI Action form, enter a meaningful name for the UI Action in the Name field.
In the Table field, select "Group" as the table for which you are creating the UI Action.
In the Action field, select "Redirect" as the action.
In the URL field, enter the URL for the "group you manage" page. You can use the following URL format: "/nav_to.do?uri=sys_user_group_list.do?sysparm_query=manager%3Djavascript%3Ags.getUserID()%5Eis_dynamic%3Dtrue". This URL will redirect the user to the Group table with the filter "Manager - IsDynamic- Me".
In the Condition field, enter the condition for when the UI Action should be displayed. For example, you can set the condition to display the UI Action only if the user has the role of "group_manager".
Save the UI Action.
In the email notification message, you can include a link to the "group you manage" page using the ${URI} variable. For example, you can include the following text in your message: "Please click on this link to view the group you manage: ${URI}". This will include a clickable link in the email notification that will redirect the recipient to the "group you manage" page.
Once you have completed these steps, your email notification should be set up to send to all ServiceNow assignment group managers on a Quarterly basis. The notification will include a link to the "group you manage" page, which will redirect the recipient to the Group table with the filter "Manager - IsDynamic- Me".
Please mark my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2023 08:15 AM
Thankyou for the above that I have done. Can you please let me know the code to apply on scheduled job. I need to send notification to group manager to review their groups. what condition I have to put on notification and scheduled job. and How to test it. still notification isn't trigger to group manager
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2023 10:28 PM
hi @Shivani Sahu
best way is to create flow designer. if you want create a schedule job then pick schedule job as Runs as below with script.
executeonLastWeek();
function executeonLastWeek() {
var getdtime = new GlideDateTime();
//gives you current month number 1-Jan, 2-Feb, so-on
var getmonth = getdtime.getMonth();
//execute only if it is start of quarter
if (getmonth == '3' || getmonth == '6' || getmonth == '9' || getmonth == '12') {
//gets you number of days in month 30 or 31 or 29
var days_in_month = getdtime.getDaysInMonthUTC();
var day_of_month = getdtime.getDayOfMonthUTC();
if (day_of_month >= days_in_month - 6) {
var grGroup = new GlideRecord('sys_user_group');
grGroup.addQuery('active',true);
grGroup.query();
while (grGroup.next()) {
gs.eventQueue('Eventanme', grGroup, '', '');// add your created event here.
}
} else {
// return false;
//do nothing
}
}
}
Please mark my reply as Helpful and/or Accept Solution, if applicable. Thanks!