How to stop a scheduled workflow on a list once a positive result occurs?

I have a API workflow on a list that runs and checks whether a list of employees have availability. If they do have availability, an email is sent. But I only want one email sent, not for every employee that is available. So how do I get to API workflow on a list to stop running once the first email is sent?

I assume you scheduled an API Workflow on a list.

Instead, schedule an API Workflow once, passing the list of employees as a parameter.

Add the following 2 steps:

Step 3: If the employee was available and the email in step 2 was sent, Terminate this workflow.

Step 4: If the workflow made it to step 4, that means the current employee being processed was NOT available. So schedule this same workflow to run again, but with the next employee (if there are still employees left to check).

Summary:
You should loop your workflow, checking one employee at a time instead of scheduling a list of workflows to run separate from one another.

Let me know if this makes sense.

Perfect, I will try that out now. Thanks

1 Like

Got it figured out

This topic was automatically closed after 70 days. New replies are no longer allowed.