- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 06:54 AM
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...
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 07:36 AM
Hi Sathwik,
Hope you are safe and good.
You can try this with scheduled jobs.
- Create an event in the registry.
- 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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 07:36 AM
Hi Sathwik,
Hope you are safe and good.
You can try this with scheduled jobs.
- Create an event in the registry.
- 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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 07:39 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 07:44 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-22-2021 07:47 AM
Thank you.. but here why "after 29" and before "31" both are used? can you please explain a bit?