Power Automate: Ditch Loops, Speed Flows
Power Automate
Mar 30, 2026 9:13 PM

Power Automate: Ditch Loops, Speed Flows

by HubSite 365 about Reza Dorrani

Principal Program Manager at Microsoft Power CAT Team | Power Platform Content Creator

Avoid loops and speed up Power Automate flows with SharePoint Excel and Graph API to cut actions and boost performance

Key insights

  • Apply to each: The video shows that heavy use of Apply to each loops in Power Automate slows flows, raises action counts, and hits service limits.
    Loops work for small sets but cause minutes-to-hours delays with large data.
  • Alternatives to loops: Use parallel processing, expressions, and Data Operation actions (Select, Filter, Compose, Join) to handle items in bulk without iterating one-by-one.
    These patterns reduce actions and simplify logic.
  • Optimized data retrieval: Query sources with server-side filters and pagination to return only needed rows.
    When writing large sets to Excel, prefer Graph API or batch methods to save data in one request instead of looping.
  • Real-world result: A demo flow that originally ran for about five hours was redesigned to finish in roughly 30 seconds by removing loops and using bulk operations.
    This highlights the scale of gains possible with better patterns.
  • Best practices: Minimize actions, enable pagination with sensible limits, use concurrency only when safe, and apply filtering at the source.
    Monitor run time and action counts to detect performance issues early.
  • Target audience: Makers and teams building enterprise automations or handling large datasets should adopt these techniques to improve speed, cost, and scalability.
    Test flows with realistic data volumes before production rollout.

Overview of the video

The YouTube video by Reza Dorrani argues that engineers and makers should stop relying on loops when building automation with Power Automate. The central claim is simple and striking: flows that use heavy looping, especially Apply to each, often become slow, expensive, and difficult to scale. In the video, the author demonstrates a real-world transformation where a flow that once took hours is redesigned to run in seconds by avoiding inefficient iteration patterns.

Along the way, the video highlights several concrete techniques that reduce action counts and improve throughput. These techniques include parallel processing, using expressions instead of per-item iteration, bulk-oriented data operations, optimized data reads from sources like SharePoint and Excel, and writing data in bulk with the Graph API. Together, those tactics aim to move basic flows toward production-ready automation with better performance characteristics.

Why loops can become a bottleneck

Loops such as Apply to each perform an action for every item in a dataset, which may be fine for small lists but problematic at scale. As flows process more items, the number of actions grows linearly or worse, causing longer run times, higher API calls, and increased costs tied to action limits and licensing. Consequently, long-running flows can become unreliable in production because they are more likely to hit throttling or quota limits during periods of heavy use.

Moreover, iterative processing complicates error handling and observability. When a flow performs dozens or thousands of similar actions, pinpointing the root cause of a failure requires more logging and checks, which further increases the action count. Therefore, reducing reliance on per-item loops not only speeds execution but can simplify maintenance when suppliers and data shapes change.

Techniques shown to avoid loops

First, the video emphasizes parallel processing where possible, which rethinks tasks so multiple records are handled concurrently rather than sequentially. Then, Reza Dorrani recommends using expressions and array operations to transform and filter data in memory instead of iterating item by item. These approaches reduce the number of actions and let the platform process larger batches at once.

Second, leveraging built-in data operations such as Select, Filter array, and similar actions enables bulk manipulation without explicit loops. For storage targets, the video suggests optimized retrieval from SharePoint and Excel and using the Graph API to write data in a single request where supported. Each tactic trades some ease of authoring for fewer actions and faster end-to-end latency.

Tradeoffs and challenges of moving away from loops

Although bulk patterns improve performance, they bring tradeoffs that teams must consider carefully. For example, batching and parallelization increase complexity in error handling because failures affect larger groups of items and require compensating logic or retry strategies. Consequently, developers must design idempotent flows and clear rollback or retry behavior to protect data integrity.

Also, some approaches rely on additional platform capabilities or APIs that may have their own limits and governance constraints, such as throttling on the Graph API or permission and licensing considerations within the Power Platform. Therefore, teams should balance raw performance gains with maintainability, observability, and compliance to avoid trading one bottleneck for another.

Practical takeaways for makers and teams

The video’s practical message is that loops are acceptable for small datasets, but teams working with larger volumes should adopt different patterns to remain performant. In practice, that means measuring current flow run times, identifying hot spots where action counts balloon, and refactoring those sections to use array operations, parallel paths, or bulk APIs where possible.

Finally, creators should treat these changes as iterative improvements: prototype, test with realistic data, and add robust error handling and monitoring. By doing so, organizations can move from simple automations to production-ready solutions that scale, while remaining mindful of the tradeoffs involved in complexity, cost, and platform limits. Overall, the video by Reza Dorrani offers a clear, actionable roadmap for improving Power Automate performance without sacrificing reliability.

Power Automate - Power Automate: Ditch Loops, Speed Flows

Keywords

Stop using loops Power Automate, Avoid loops Power Automate, Faster Power Automate flows, Reduce actions Power Automate, Improve Power Automate performance, Power Automate parallel processing, Power Automate array processing tips, Optimize flows Power Automate