- 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
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2025 01:00 AM
You can enhance the logic as per your requirement, I just gave a reference
Thank you for marking my response as helpful.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2025 04:31 AM
@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
08-12-2025 04:05 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-13-2025 01:43 AM
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, '');
}
