How to trigger a notification when due date is approaching? using flow designer

Sathwik1
Tera Expert

In a table I had a field "Due Date" now suppose

              -> When due is approaching in 30 days I need to trigger a notification...

              -> and when due date is approaching in 15 days again need to trigger a notification..

Is it possible by using flow designer? if so can anyone help me please...I am not getting how to set the condition to calculate 30 and 15 days using flow designer...

1 ACCEPTED SOLUTION

Community Alums
Not applicable

Hi Sathwik,

Hope you are safe and good.

You can try this with scheduled jobs.

  1. Create an event in the registry.
  2. Create a Scheduled script execution which runs daily at 0800 hrs. 

        var chg_req=new GlideRecord('change_request');
               chg_req.addEncodedQuery('active=true^due_dateRELATIVEGT@dayofweek@ahead@29^due_dateRELATIVELT@dayofweek@ahead@31^NQdue_dateRELATIVEGT@dayofweek@ahead@14^due_dateRELATIVELT@dayofweek@ahead@16');
     chg_req.query();
       if(chg_req.hasNext())
       {
          while(chg_req.next())
           {
              gs.eventQueue('change_request.schedule_reminder',gr,gr.assigned_to.email,'');
           }
       }

    3. Create notification which sends the notification when the event got triggered.

In this example I have used Change Request table. Replace the table name in the glide record also due_date field name.

Please click on helpful if it is.

 

 

Thanks & Regards,

Sharath Allam

Kaptius - ServiceNow Premier Partner.

View solution in original post

17 REPLIES 17

So sorry brother...didn't checked the month...

Thank you so much @Sharath Allam 

Sathwik1
Tera Expert

@Ankur Bawiskar @Prasad Pagar 

Ankur Bawiskar
Tera Patron
Tera Patron

@Sathwik 

You can easily achieve this with no script using flow designer.

Refer below link for the solution and enhance as per your use-case

how to send email notifications prior or 3 days befor valid date automatically

Regards
Ankur

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