Do the following until flow logic

  • Release version: Zurich
  • Updated July 31, 2025
  • 1 minute to read
  • Apply one or more actions repeatedly until an end condition is met. You can use the flow data to specify the end conditions.

    You can use Do the following until flow logic to create a loop that repeatedly applies one or more actions. This flow logic requires a condition specifying when to stop the loop.
    Note:
    When you set a data pill value from inside a Do the following branch of flow logic, the data pill value is only available to other actions in the same branch. Referencing a data pill value that was set inside a Do the following branch from outside of the flow logic branch produces a null value.

    Inputs

    Condition label
    Data type: String

    Text description of the condition that you want to display in the flow.

    Conditions
    Data type: Conditions
    Conditions under which the loop terminates. You could, for example, end a loop when the state of an incident changes. If the end condition is true when the flow starts, the loop runs once and then stops.
    Tip:
    You can use flow variables to check for custom conditions such as the number of times a loop has run.

    Outputs

    This flow logic produces no outputs.

    Send a daily email until an incident is resolved

    In this example, the flow sends a daily email about the incident, until the incident is in a closed or canceled state. Inside the Do the following branch, there is a step for looking up the incident record.

    Example Do the following until flow.

    Execution details

    Figure 1. Execution details for Do the following until
    Example execution details for a do until flow.
    1. The header shows the state, start time, and runtime for the flow logic.
    2. This flow logic can run actions or subflows multiple times until it's condition is met. Use the arrow icons to select an iteration and its values.
    3. The Actions section shows details on the actions, flows, or subflows that are run during this loop iteration.