Send An Email Reminder Based On a Variable Date Field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Hello ServiceNow Community,
I am looking to achieve a requirement that simply sends an email notification 60 days before the due date. based on:
Variable type: Date
Tech name: due_date
Requirement: Send a email notification if today's date reaches 60 days or less before the due date.
What's an efficient way to develop this? I figured a scheduled job would suit my case. But how would you query the variable and its value? So that if these conditions meet, send out an notification that contains a link to the RITM.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
Yes my friend — a scheduled job is the right way to do this, especially since your “due date” is a catalog variable.
What I’d do:
Add a real date field on the RITM (example: u_due_date) and a simple flag like u_60_day_notice_sent.
Copy the variable value into that field when the RITM is created (or when the variable changes). This avoids having to query the variable tables every day.
Create a Scheduled Script Execution that runs daily and finds RITMs where:
u_due_date is within the next 60 days, and
u_60_day_notice_sent is false
For each match, trigger an event or send directly and include a link to the RITM in the email.
Set the flag to true so the user doesn’t get the same email again tomorrow.
That approach is much simpler than querying sc_item_option_mtom for the variable value on every run, and it scales better.
@GamNOW - Please mark Accepted Solution and Thumbs Up if you found Helpful 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11 hours ago
You can also get it done within a Flow for each record (depending on the volume of records). Add the Flow logic "Wait for a duration of time", and then either "Send Email" or "Send Notification".
