top of page

How to send email reminders in ServiceNow

SAASWITHSERVICENOW

Updated: May 8, 2023

Use Case

If active incident is not updated in last 7 days then user in assigned to field should get reminder to update the ticket with latest status.


Solution

ServiceNow can send reminder emails by using scheduled jobs which can generate event once condition is matched as per the query of records.

You can use gs.eventQueue() method for generating event in script.


Method : gs.eventQueue(name,record,parm1,parm2,queue)

Parameters :

  • name - Name of the event to be generated. This event can be created in Event Registry.

  • record - current record or glide record. Example - gr or current

  • parm1 - Parameter to be used in scripting or sending email. Example - gr.assigned_to.email

  • parm2 - Another Parameter. Example - gr.number

  • queue- Provide queue name else leave empty for custom queue

What elements need to be created

  • Create a Scripted Schedule

  • Create an Event in Event Registry

  • Create a Notification

Create a Scheduled Job for Script Execution

  • Go to System Definitions > Scheduled Jobs

  • Create New Scheduled Job

  • Click on Automatically run a script of your choosing.

  • Fill fields

  • Name: send.reminder.email

  • Run: Daily

    • Time Zone : As per your requirement

    • Script :

var gr = new GlideRecord('incident');
gr.addEncodedQuery('active=true^sys_updated_on<javascript:gs.beginningOfLast7Days()');
gr.query();
while(gr.next())
	{
		gs.eventQueue('inc.sendreminder',gr,gr.assigned_to.email,gr.number);
		
	}

Create an event record in Event Registry

  • Go to System Policy > Events > Registry


  • Create new Event

  • Name as inc.sendreminder

  • Save the form

Create Email Notification

  • Go to System Notifications > Emails > Notifications

  • Create New Notification

  • Provide the name

  • Select Incident table

  • Select Send When as Event is Fired

  • Event Name should be the event you have created in event registry. In this case it is inc.sendreminder

  • You can provide other details like who will recieve and content of email

  • Save the form

You are Done!

This way you can send reminders to different people if tickets are not getting updated.



6,986 views0 comments

Recent Posts

See All

Comentarios


Post: Blog2_Post

©2020 by SAASWITHSERVICENOW.
You might be navigated to ServiceNow Website via some links however we do not have any association with ServiceNow.
SAASWITHSERVICENOW is an independent blogging website which is just referring the information about ServiceNow.

bottom of page