send a notification once a variable is checked in catalog task using flow designer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 10:30 AM
I need to make a functionality that once a variable is checked true on a catalog task, there should be a notification sent, but how do i accomplish this using a flow since if I am placing this flow action below the create catalog task its not being run untill the task is complete as the wait field is checked on the task action, if I am running it on parallel its running once and returning false as initially the checkbox is unchecked, how to accomplish this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 11:12 PM
Hi @AanchalS ,
1.Go to Flow Designer > New Flow
2.Trigger:
- Table: sc_task (Catalog Task)
- Trigger: Updated
- Filter:
- Variable [your_variable_name] changes to true
- Task state is not Closed (optional, based on your needs)
3.Actions:
- Add a Send Notification action
- Configure the notification (e.g., to a group, user, or requestor)
If my response helped, please hit the 👍Thumb Icon and accept the solution so that it benefits future readers.
Regards,
Pratik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2025 11:22 PM
You can try a Subflow with a Wait for Condition
Create a subflow that waits for the variable to be updated.
Steps:
Create a Subflow
Name: Wait for Checkbox on Catalog Task
Inputs:
Catalog Task (Type: Task [sc_task] Reference)
Variable name or hard-code the variable you're checking
Add a "Wait for Condition" Action
Table: sc_task
Condition: YourVariableName is true
This waits until the variable is checked.
Add a "Send Notification" Action
Trigger your email once the condition is met.
Save and Publish the subflow.
2. In Your Main Flow: Call This Subflow in Parallel
In your main flow (e.g., associated with the Catalog Item or Request):
After creating the Catalog Task:
Use a Parallel branch:
Branch 1: Continue standard flow (e.g., wait for Catalog Task completion).
Branch 2: Call your "Wait for Checkbox on Catalog Task" subflow, passing the created task as input.
Please mark correct/helpful if this helps you
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 07:09 AM
I am not able to set the condition since its only showing the fields of the sc_task table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2025 12:44 AM
you can create a subflow which accepts few parameters such as TASK SysId etc
Then within that subflow have logic to send email to whoever you want with email body etc
Then have after update business rule on sc_task table
Condition:
current.request_item.cat_item.name == 'Your Item Name' && current.variables.<variable_name>.changes()
Script:
// trigger your subflow from script
Scripting with Flows, Subflows, and Actions
(function() {
try {
var inputs = {};
inputs['taskSysId'] = current.sys_id;
// Start Asynchronously: Uncomment to run in background. Code snippet will not have access to outputs.
// sn_fd.FlowAPI.getRunner().subflow('subflow_name').inBackground().withInputs(inputs).run();
// Execute Synchronously: Run in foreground. Code snippet has access to outputs.
var result = sn_fd.FlowAPI.getRunner().subflow('subflow_name').inForeground().withInputs(inputs).run();
var outputs = result.getOutputs();
// Current subflow has no outputs defined.
} catch (ex) {
var message = ex.getMessage();
gs.error(message);
}
})();
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