Online Course Creator (79,000 students and counting)
The YouTube video by Alireza Aliabadi explains how to use the Do until loop in Power Automate, starting with basic concepts and moving toward more advanced options. In clear steps, the presenter shows how a loop repeats actions until a condition is met, and highlights features such as the loop counter and timeout. Importantly, the video promises a follow-up that will demonstrate a complete real-world flow, so this first part focuses on mechanics and configuration. As a result, viewers can learn both the conceptual model and practical settings before seeing a full scenario in Part 2.
The video describes the Do until loop as a control that repeats actions until its exit condition becomes true, and contrasts it with Apply to each, which iterates through a known collection. Aliabadi explains that the loop typically performs a status check, waits for a chosen interval, and then repeats until the target state appears. Additionally, he clarifies that the loop is suitable when you cannot predict the number of repetitions in advance, such as when waiting for an approval or an external process to finish.
He also walks through the basic structure that most flows use: create or identify the item to monitor, check its status inside the loop, pause between checks, and exit when a terminal state appears. This model helps avoid constant polling and lets a flow respond to asynchronous events instead of relying on fixed schedules. Consequently, the approach supports processes like approvals, ticket resolution, and status synchronization across systems.
Moving beyond the basics, the video covers the Count parameter as a way to limit iterations and the Timeout parameter to control how long the loop can run overall. Aliabadi explains the tradeoff clearly: setting a short interval and high iteration count can detect changes quickly but may increase API calls and cost, while longer waits reduce load but slow reaction time. He also demonstrates using expressions to combine multiple exit conditions so a loop can stop when one of several states appears.
Moreover, the presenter warns about limitations tied to advanced parameters and where they can be applied, noting that some options only appear in specific trigger or action contexts. He details how ISO 8601 formatting governs the Timeout value, which can confuse newcomers, and he shows how to construct valid timeout strings so flows behave as intended. Therefore, understanding these formats and limits helps avoid unintended infinite loops or early exits.
Aliabadi uses an approval scenario to illustrate real tradeoffs and pitfalls: for example, stopping only when the status is "Approved" risks a flow that never ends if a request is "Rejected" or abandoned. Consequently, he recommends designing the exit condition to include terminal states like both "Approved" and "Rejected" to prevent endless polling. He also discusses the balance between responsiveness and resource use, explaining that more frequent polling improves speed but increases platform calls and potential throttling.
Another practical challenge he covers is obtaining a loop counter. The video contrasts methods such as reading a counter from the trigger versus maintaining a counter in a variable. While trigger-based counters can work when the trigger exposes iteration data, variables give more control and clarity. As a result, developers must weigh simplicity against precision and choose the approach that fits their architecture and monitoring needs.
Throughout the presentation, Aliabadi stresses a few best practices: explicitly define terminal states, use conservative polling intervals when possible, and test Timeout values carefully to avoid unintended behavior. He also recommends keeping logging and notifications in mind so that long-running loops provide visibility without overwhelming recipients. These steps improve maintainability and make it easier to troubleshoot flows in production.
Finally, he suggests using expressions in Advanced Mode to simplify complex conditions and to handle multiple stop cases cleanly. This approach reduces nested logic and makes flows easier to read and maintain, although it requires some familiarity with expression syntax. Ultimately, the tradeoff is between readability and compact logic, and experienced authors will find the balance that suits their teams.
Alireza Aliabadi’s video serves as a practical primer on the Do until loop in Power Automate, mixing clear explanations with useful tips about limits and formats. While Part 1 focuses on mechanics, loop parameters, and common pitfalls, the promised Part 2 will show a complete real-world implementation that ties these concepts together. For teams building automation that must wait for external events, this guidance helps them pick sensible intervals, avoid infinite polls, and design robust exit conditions. As a result, readers should be ready to apply these ideas and await the follow-up for a full example flow.
Power Automate Do Until loop, Do Until loop Power Automate tutorial, Power Automate loops example, Build real world Power Automate flow, Power Automate Do Until conditions, Power Automate loop best practices, Power Automate Do Until expressions, Power Automate retry loop example