Do the following until flow logic

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 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

    Input Description
    Condition label Descriptive label for the loop.
    Condition 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.
    Note:
    Avoid using the same record you used to trigger the flow in your condition, because the flow populates its values when the flow starts and they remain static.

    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. This is necessary because the record that triggers the flow is only loaded when it is triggered. By adding this look up step, you can get the current state of the incident each time the loop runs.

    Example Do the following until flow.

    Outputs

    This flow logic produces no outputs.

    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.