Monthly email reminders for incidents over 30 days old
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2024 07:53 AM
I have a request to generate emails to be sent to the Assigned To for incidents that are more than 30 days old.
We would like a single email for each Assigned To user *versus several emails for each incident)
Ideally, we would like to run this as a scheduled job if possible.
- Labels:
-
Service Desk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2024 08:22 AM
Hi @John H1
First of all, you need to create an event in Event Registry table and a Notification with When as Event is triggered. Then you can use the following schedule job script to send the notification-
sendNotification();
function sendNotification() {
var inc = new GlideRecord("incident");
inc.addEncodedQuery('active=true^assigned_toISNOTEMPTY^sys_created_on<=javascript:gs.beginningOfLast30Days()');
inc.setLimit(100);
inc.query();
while (inc.next()) {
gs.eventQueue('incident.30days', inc, inc.assigned_to.email.toString(), inc.assigned_to.user_name.toString()); // incident.30days is the name of event.
}
}
Please mark my answer helpful and correct.
Regards,
Amit

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-06-2024 08:29 AM
How often will you be sending this notification?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-24-2024 06:48 AM
Sorry for the delay getting back to you, (I pulled into another project).
I would like to run this report weekly.
I've never worked with creating an Event Registry, any assistance setting this up would be greatly appreciated.