---
sourceDocument: Australia Build workflows
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/build-workflows

 Release :

    - australia

ft:locale :

    - en-US

ft:publication_title :

    - Australia Build workflows

ft:clusterId :

    - crworkflow

bundleId :

    - crworkflow

workflow :

    - Creator


---

# Do the following until flow logic

# Do the following until flow logic {#ariaid-title1}

* Release version: Australia
* 
* Updated March 12, 2026
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 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 {#flow-logic-do-until__section_k2q_fhm_r2b}

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 {#flow-logic-do-until__section_nw4_jll_ffb}

This flow logic produces no outputs.  

## Send a daily email until an incident is resolved {#flow-logic-do-until__example_bdg_q3z_mdc}

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.

## Execution details {#flow-logic-do-until__section_npd_l3t_r2b}

Figure 1. Execution details for Do the following until  
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.
{#flow-logic-do-until__ol_wtt_scs_r2b}
**Related concepts**   

* [Assign subflow outputs flow logic](https://servicenow-prod.fluidtopics.net/Vi2xufmkKFPMynJkLOlALA "Specify the data the subflow returns when it completes running. Use subflow output as data for a parent flow or as input for another process.")
* [Call a workflow flow logic](https://servicenow-prod.fluidtopics.net/XDLqoShzg9~AHEcc9WiB4A "Run a published and active workflow from your flow. You can use the flow data as a workflow input. For example, you can specify the current record as a workflow input.")
* [Do the following in parallel flow logic](https://servicenow-prod.fluidtopics.net/eILn02zBZvbi3Tn7n7lqLA "Run actions and subflows in separate paths within an isolated flow logic block.")
* [Dynamic flows flow logic](https://servicenow-prod.fluidtopics.net/9CA7wcyPkP1MnkHwcFtX5Q "Identify and run a flow or subflow dynamically by using runtime data. Build templates to provide expected inputs for dynamically called flows or subflows.")
* [End Flow flow logic](https://servicenow-prod.fluidtopics.net/NAyoEtyTqpGliQlDlcqNCg "Stop running the current flow. Use End Flow within a branch of the flow to specify an exit condition. For example, end the flow when it reaches a specific If flow logic block.")
* [For Each flow logic](https://servicenow-prod.fluidtopics.net/m2Jd4tAy1wj9Vfu6zJIqGQ "Apply one or more actions to each record in a list of records.")
* [If flow logic](https://servicenow-prod.fluidtopics.net/nR06QTqfpGjIp8_whZe0CQ "Selectively apply one or more actions only when a list of conditions is met.")
* [Make a decision flow logic](https://servicenow-prod.fluidtopics.net/kj1wegOGweMm50e~aPx~aA "You can use the decision table branching logic in situations where multiple conditional paths are required, as an alternative to nested If, Else If, or Else flow logic. For example, if you want to determine what kind of car insurance you need, you can add inputs such as your age, accident history, and car model to the decision table to determine a level of insurance coverage. This logic can save you time and present a more readable format than nested if conditions or switch case statements.")
* [Set Flow Variables flow logic](https://servicenow-prod.fluidtopics.net/taLpFCTeLjMl12m~qAkCGw "Assign a value to one or more flow variables, which store flow data as data pills. Access flow variable values by referring to their data pill.")
* [Try flow logic](https://servicenow-prod.fluidtopics.net/2anCAJO7Iy6D_v~Y9CMVeg "Allow a flow to continue running when an error occurs within a flow logic block. Run a sequence of actions in response to errors within the flow logic block.")
* [Wait for a duration flow logic](https://servicenow-prod.fluidtopics.net/jta33j7A9dgcVulpsFKEdg "Use this flow logic to give your users time to act during automated processes or to wait for a specific date and time to complete actions.")  
**Related reference**   

* [Append to Flow Variables flow logic](https://servicenow-prod.fluidtopics.net/QdizsC8_AAj6fxqxNs3ynQ "Append a value to one or more array of objects flow variables. Use flow data to generate values.")
* [Exit Loop flow logic](https://servicenow-prod.fluidtopics.net/wNRkIzhET_BU_tHJZo0sww "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.")
* [Get Flow Outputs flow logic](https://servicenow-prod.fluidtopics.net/vKzFDepPhnY3B2SF7MnreA "Retrieve output values generated by dynamic flows or subflows.")
* [Go back to flow logic](https://servicenow-prod.fluidtopics.net/ZBe0On6wxNGHSUgBMlBOTA "Return to a prior step in the flow to repeat a sequence of actions.")
* [Skip Iteration flow logic](https://servicenow-prod.fluidtopics.net/hAlsZiuAyM0sbpeo32QQ4w "Skip the current iteration of a flow logic loop when the conditions of an If flow logic are met. Continue running the flow logic loop with the next item in the list. This flow logic is also known as continue.")

