Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

Exit Loop flow logic

Exit from a flow logic loop when the conditions of an If flow logic are met. Continue running the flow from the next step after the flow logic loop. This flow logic is also known as break.

Valid Exit Loop placement

You can only add Exit Loop flow logic within certain portions of a flow. The Exit Loop flow logic must be within a branch of a parent For Each or Do the following until flow logic block.

  • Then branch of an If flow logic block
  • Then branch of an Else If flow logic block
  • Then branch of an Else flow logic block

Inputs

This flow logic has no inputs.

Outputs

This flow logic has no outputs.

Execution Details

When a flow exits a loop, the state of the Exit Loop flow logic block becomes Completed. Any remaining steps in the For Each or Do the following until flow logic block aren’t run.

Exit a loop based on incident count

In this example, a flow generates a list of incidents assigned to a user. For each incident that is assigned to the user, the flow sends an email. If the list of incidents is greater than or equal to 5, then the flow exits the For Each flow logic loop and doesn’t send an email.

Image omitted: flow-logic-exit-loop.png
Exit Loop flow logic within an If flow logic then branch

In this example, there are 19 incidents assigned to the user, which meets the exit conditions. The first item of the For Each flow logic counter shows the Exit Loop flow logic having a state of Completed.

Image omitted: flow-logic-exit-loop-execution-details.png
Execution details of an Exit Loop flow logic

Parent Topic:Workflow Studio flow logic

Related topics

Append to Flow Variables flow logic

Assign subflow outputs flow logic

Call a workflow flow logic

Do the following until flow logic

Do the following in parallel flow logic

Dynamic flows flow logic

End Flow flow logic

For Each flow logic

Get Flow Outputs flow logic

Go back to flow logic

If flow logic

Make a decision flow logic

Set Flow Variables flow logic

Skip Iteration flow logic

Try flow logic

Wait for a duration flow logic