How to automate for notifying if a task isopened
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 06:11 AM
I want to send notification mail reminding that a task is opened. The mail should be sent every 6 hours until the task is closed. Please help its urgent
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 06:13 AM
How does a task get reopened? As far as I know, once a task is closed, it should not be reopened. Please make sure to follow this practice."
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 06:55 AM
No its not reopened. I meant, i want to send email notifications to the user until a specific task is not closed in every 6 hours duration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 06:55 AM
Using scheduled job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2025 07:26 AM
Hello @Priyadarshini2
Method#1: Scheduled Job
1. Create an Event in Event Registery (Table:sysevent_register)
2. Create Scheduled Job - System Defintion > Scheduled Jobs (Table: sysauto_script)
Enter Name
Run: Periodically
Repeat Interval: Days 0 Hours 06
Run this Script:
var grTask = new GlideRecord('sc_task');
grTask.addEncodedQuery('assigned_toISNOTEMPTY^stateNOT IN3,4,7'); //is the state is not one of Closed Incomplete, Closed Complete and Closed Skipped along with assigned to is not empty. You can build this in the sc_task list view as per your requirement
grTask.query();
while (grTask.next()) {
gs.eventQueue('sc_task.reminder_email', grTask, grTask.assigned_to.email, grTask.number);
}
3. Set up e-mail notification: If you execute the above scheduled job then in the sysevent_list table you will see the value of Parm1 and Parm2. Based upon this, you can set your e-mail notification as shown below:
When to Send:
Who will receive:
What it will contain:
4. Validation: Table: sys_email
Execute the scheduled job and you will find the sent e-mail in sys_email table:
Method#2: Flow (Workflow studio): No code
Flow Name
Advanced Options: Run as > System User
1. Trigger:
2. Actions > Look Up Records
3. Flow Logic > For each - Drag and Drop Pill Catalog Task Records (under 1 - Look Up Records) from left
4. Action > Send E-mail
Target Record: Drag 2 - For Each > Catalog Task Record
Table: sc_task
To: Use Data Pill picker to dot walk Catalog Task Record > Assigned To > Email
Subject: your choice
Body: Your choice
Hope that helps!
Hope that helps!