Notification to trigger 2 months before the record end date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2025 02:52 AM
i am trying to achieve above requirement in flow designer. Trigger as scheduled daily but i need help in date validation if end date is 2 months from today then trigger the notification.
is this possible achieve scripting via flow variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
@Ankur Bawiskar : Thank you but when i tried this filter, it doesn't stop sending the next day:
Could you suggest
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
Hi @abhilashsg
Yes, this is possible in Flow Designer by using a scheduled daily trigger. You can use the "Run Script" action or a data transform to compare the record’s end date. If the calculated date matches the record’s end date, you can proceed to send the notification. This logic can be implemented through a script in a flow variable or by using Flow Designer’s date functions.
Kind Regards,
Mohamed Azarudeen Z
Developer @ KPMG
Microsoft MVP (AI Services), India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago
hi @abhilashsg
May you try via schedule job and call an event to send the notification
var today = new GlideDate(); // current date
var twoMonthsLater = new GlideDate();
twoMonthsLater.addMonthsLocalTime(2 ); // Remove the space in parentheses)
var gr = new GlideRecord('your_table');
gr.addQuery('end_date', twoMonthsLater.getValue()); // exact match
gr.query();
while (gr.next()) {
gs.info('Record ' + gr.sys_id + ' has an end date exactly 2 months from today.');
// Send notification (example: Event)
gs.eventQueue('custom.notification.event', gr, gr.assigned_to, '');
}