Daily Approval reminder emails

New user1212
Tera Contributor

Hi,
I need to create a reminder about approvals that will go out every day at 1 p.m.
I don't want to do it via workflow... I've tried methods from various articles, but I have the impression that there's always something missing because these solutions don't work for me.
Can anyone help, step by step on how to create them?

7 REPLIES 7

Sohail Khilji
Kilo Patron
Kilo Patron

Hi @New user1212 ,

 

Why do you want to do it via workflow what's the specific need can you explain in detail to understand the requirement dimension.

 

As per your requirement you can achieve this using a scheduled job which runs at 1pm everyday querying your approval table and triggering event to send notification.

 

1. Create a event for 1pm reminder

2. Create a Notification which is reminder for approval (if needed use mail script) trigger will be via event.

3. Create a scheduled job that triggers and event. (this will in turn fire the notifications).

 

Sample Code:

(function executeJob() {
    var appGr = new GlideRecord('sysapproval_approver');
    appGr.addQuery('state', 'requested'); 
    appGr.query();
    while (appGr.next()) {
gs.eventQueue('name_of_event'); //trigger the event.
}

 


☑️ Please mark responses as HELPFUL or ACCEPT SOLUTION to assist future users in finding the right solution....

LinkedIn - Lets Connect

unfortunately it shows a code error

VaranAwesomenow
Mega Sage

I believe with updates to ServiceNow platform and workflow data fabric below would be the approach.

If you want to achieve it using group approval, you can consider leveraging SLAs on sysapproval_group table

VaranAwesomenow_0-1753160587917.png

 

If you want to achieve at a single RITM level then you can use a flow that triggers on RITM record.

If you want to apply this email reminder on RITM approvals in general then go with flow with trigger as schedule and table and query sysapproval_approver records then write notification logic accordingly. Only downside of flow + schedule is it wont take holiday calendar into consideration, which is available using SLAs.