Send E-mail based on the Date/time selected in a field.

Mark263
Kilo Contributor

All,

I have a field on the incident form

Name : 'Next Email'

Type - Date/Time

An E-mail should be sent as per the date and time selected in that field.

Is this possible.? If yes, Kindly help

1 ACCEPTED SOLUTION

Mark,

eventQueueScheduled works to trigger an email on a particular date and time. Only when Next email is updated from empty to a new value, it triggers an event to be processed at the specified date and time.

https://docs.servicenow.com/bundle/jakarta-platform-administration/page/integrate/email-integrations...

I am not sure what is not working for you. 

View solution in original post

25 REPLIES 25

arielgritti
Mega Sage

Hello

Maybe this approach can help you

Create a scheduled job running for example every 5min to execute and script to loop all the active incident with not null value in the "next email" filed of the incident table.

 

For each record incident found generate and event in the event queue compare a variable like "now" (you can obtain the date/time of "now" with a function). If equal the date_time of the incident then the event is generated

Create a notification to send the email when the event is generated.

 

I hope my answer has been useful

Ariel

PS: Please mark my answer correct or helpful if I have helped you. Thanks

I would change the condition to greater-than or equal-to the current date/time. If you only look for an exact match (i.e., "equal"), chances are it will never fire. Thanks, -Brian

can u help me with the coding part for the same?

 

can u help me with the coding part for the same?