Trigger a send email event at the time and date inputted by the user from the catalog

symonflores_23
Tera Guru

[Context] We have developed a catalog that sends email advisories to selected users.

 

In this catalog, we included a date and time variable to allow users to schedule the email sending for a specific date and time.

Our process for achieving this is outlined below:

  1. In the flow, call the event via a script in the log.
  2. Set up system notification to send the email when the event is fired.

[Q] How can we schedule the event to fire at the date and time specified by the user in the catalog?

1 ACCEPTED SOLUTION

Ahmmed Ali
Mega Sage

hello @symonflores_23 

 

Two workarounds:

1. In flow, add a wait for duration step with reference to your date variable and after that set add an event trigger/notification step to trigger the notification.

 

2. Write a script to trigger the event with scheduled time same as your catalog variable and call that script in your flow. you can use gs.eventQueueScheduled() to trigger a scheduled event. refer below thread for example:

 

https://www.servicenow.com/community/developer-forum/how-to-trigger-notification-using-gs-eventqueue... 

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali

View solution in original post

1 REPLY 1

Ahmmed Ali
Mega Sage

hello @symonflores_23 

 

Two workarounds:

1. In flow, add a wait for duration step with reference to your date variable and after that set add an event trigger/notification step to trigger the notification.

 

2. Write a script to trigger the event with scheduled time same as your catalog variable and call that script in your flow. you can use gs.eventQueueScheduled() to trigger a scheduled event. refer below thread for example:

 

https://www.servicenow.com/community/developer-forum/how-to-trigger-notification-using-gs-eventqueue... 

 

Thank you,

Ali

If I could help you with your Query then, please hit the Thumb Icon and mark my answer as Correct!!

Thank you,
Ali