- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 04:56 AM
Hi All,
I have a requirement for service catalog. I need to send reminder emails for every 2 days from the day the catalog task moved to pending approval state to the approver.
Kindly, let me know the best way to do this.
Many Thanks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 05:19 AM
You won't be able to send the reminders from the workflow itself. Instead, you'll want to set up a scheduled job to trigger an event for any outstanding approval records. Then you could set up an email notification to respond to that event and send the reminder. There's a nice solution demonstrated here by Chuck Tomasi that makes the process of setting up that scheduled job much simpler.
https://community.servicenow.com/community?id=community_blog&sys_id=ae9caee1dbd0dbc01dcaf3231f96193d
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2023 08:20 AM
I ended up doing the following:
1. Creating an Event
2. Creating an Event Notification (email)
3. Running a daily Scheduled Job to create the emails
The key to my Scheduled Job is an Encoded Query that selects the records I need. Specifically, I am looking for specific requested items that are active and in a specific stage.
The code in my Scheduled Job looks something like this:
//only return active requests that are in "Return to Work Approval" stage
var gr = new GlideRecord("sc_req_item");
gr.addEncodedQuery("cat_item=9999999999999999999999^active=true^stage=return_to_work_approval");
gr.query();
while(gr.next()){
gs.eventQueue("rtw.reminder.email",gr,"","");
}
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-23-2018 05:51 AM
Hi Manasa,
You cannot use workflow to trigger emails based on regular intervals. in order to achieve this u have to use scheduled job in which u have to define it should run for every two days. in which u have to glide the approval table to fetch the approval state if the state is in requested state u can trigger the notification.
Please mark Helpful if it is useful for your analysis.
Thanks,
Manoj

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2018 06:50 PM
Just checking on on this one. Has this question been answered or is there more information I can help you with? If it's been answered, please mark the answer above as the correct one so people know this has been taken care of. Thanks!