Scheduled Email in ServiceNow

In my our previous piece, we have discussed on how to send an email when an event is fired. In that piece, we have attempted to register an event and have it queued by executing the server-side “eventQueue” method of the GlideSystem API.  On that same piece, the email is sent upon the queued event is processed. How about if we want to send an email on specific date/time?

While we are assuming that you have spared few minutes reading our previous piece, let us discuss this quick solution on how to send an email on specific date/time.

eventQueueScheduled. With the eventQueueScheduled method of the GlideSystem API, we can send an email when a defined date/time is expired by simply supplying the following parameters: Event Name, GlideRecord, Parameter 1 (Optional), Parameter 2(Optional), and Expiration. Below is a sample code:

gs.eventQueueScheduled(Even Name, GlideRecord, Parameter 1, Parameter 2, Expiration GlideDateTime);

Hope this helps.

Leave a comment