How to send one email daily regaurdless of how many incidents/requests a user generates?

Will35
Tera Expert

I have a scoped application that pulls in incidents from an outside platform. User may get one incident or multiple incidents each day. The incidents show up on a Service Portal page that allows each user to view only their assigned incidents. I don't want users getting spammed with a notification for each incident. I just want to send an email once a day that alerts the user they have new incidents to review and points them to the Service Portal page. All the information I find points to doing a notification per a record. I want to filter users who have an assigned incidents today and then send one email only.

I am open to any option that will allow me to do this.

5 REPLIES 5

Cameron Boote
Tera Guru

Only option I can think of is setup some kind of scheduled job that sends out a summary email to each unique assigned to on an active Incident.  I've done something similar that sends out a summary of all changes occurring in the next 24 hours.  

Can't think of a good way to do this without a fairly complex script. 

 

Here's how I've done this on Change Requests:

1.  Scheduled Job  - runs your query, steps through list of Incidents/Assigned to

2.  Script Include - make a script include to build the content of the email

3.  Event - make a custom event the script include can call to trigger a notification to be sent out

4.  Notification that sends when your event is fired.  One of the event parameters can contain the html for your email.  

Hi Cameron, On you option I have the event already and the Notification. I am still new with ServiceNow scripting.  Do you have an example of the script and script include you currently use for your Change request? Thank you

Mike Derhammer
Kilo Sage

Hi Will,

I offered a solution to a similar scenario a couple months ago and think it can definitely work for yours as well. It is the same approach that Cameron recommended, but includes some of the scripted components to further demonstrate the complete solution. The scenario I solved for was to send a single email with details about incidents created that day - but this same solution could be used to send a list of incidents to each respective assigned to daily.

Scheduled Job based Notifications using Events

If this has been helpful and allowed you to achieve what you were looking for, I'd love it if you'd mark it as correct/helpful! If you have additional questions, let me know.

Thank you!
Michael

 

Hi Michael I am looking at your solution now. I actually do not want to send the incidents numbers to the user. The notification has a link to the service portal page and will insert the user into the URL and show their incidents. I am just needing to capture that they had an incident that day and send them one email with the service portal link. It looks like your script collects all incidents from the previous day and sends them to predetermined user based on the notification. I assume I could use the requested by and manager fields on my table to pass in who the email will need to go to, but I am still not sure how I make sure each user only gets one email.  Thank you for the help.