How to send a reminder prior one hour of the start date and time.

Prithvi Ramesh1
Mega Sage

How to send a reminder prior one hour of the start date and time?

5 REPLIES 5

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @Prithvi Ramesh1 

 

https://www.servicenow.com/community/developer-forum/send-reminder-emails-through-flow/m-p/2752851

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Ankur Bawiskar
Tera Patron
Tera Patron

@Prithvi Ramesh1 

what's the business use-case for sending email 1 hour before date/time?

you can use hourly scheduled flow and check if the time left is 1 hour, check below link and enhance for your case

I cannot seem to get an Email Notification when a record's due date is reached 

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

We are providing ServiceNow role access to users for a specific period of time. Once the end date and time have passed, we revoke the access. The use case is to send a reminder to the approver one hour before the start date and time, prompting them to approve the request. Once the request is approved, access can be granted accordingly.

However, even after following the necessary steps, I am encountering the following error:

 

PrithviRamesh1_0-1752227345895.pngPrithviRamesh1_1-1752227367232.pngPrithviRamesh1_2-1752227401432.png

 

In the setflow variable part i have scripted the section - 

var startDT = fd_data._1__look_up_records.variables.start_date;
var startDateTime = new GlideDateTime(startDT);
var nowDateTime = new GlideDateTime();
var diffMillis = startDateTime.getNumericValue() - nowDateTime.getNumericValue();

// Check if current time is within one hour before start time
if (diffMillis > 0 && diffMillis <= 3600000) {
    return true;
}