Exit Loop flow logic

  • Release version: Zurich
  • Updated July 31, 2025
  • 1 minute to read
  • 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.

    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.

    Execution details of an Exit Loop flow logic