Run Apply to each in parallel
Quiz question
When must you not raise the concurrency of a loop?
Solution
- A) When it has to process more than a hundred itemsWrong. Concurrency saves the most time precisely when there are many independent items.
- B) When it increments a variable or appends to an arrayCorrect. Parallel iterations read and write the same variable at the same time and overwrite each other.
- C) When it reads items from a SharePoint listWrong. The source does not matter. What counts is whether the iterations depend on each other.
What it is about
Apply to each processes items one after another by default. With hundreds of items that takes time, even when every iteration stands on its own. In the loop settings you turn on Concurrency control and raise the degree of parallelism to at most 50. Several iterations then run at the same time, and the loop often finishes in a fraction of the time. This only works when the iterations are independent. If the loop increments a counter or appends values to an array, the iterations overwrite each other. In that case build the result with Select or union() instead of variables. Too much parallelism against the same connector can also lead to throttling.
When to use it, when not
Use it
When every iteration stands on its own, such as one email per person or one update per record.
Better not
When iterations change the same variable or the order matters.
Most common mistake
Turning on concurrency and still using Increment variable inside the loop. The counter is wrong afterwards.
License
Standard Runs without a premium connector, so the license from Microsoft 365 is enough. Source on Microsoft Learn: Power Automate licensing FAQ. For your whole flow: License check.
Prefer to learn with guidance? The Power Automate live course of the Power Platform Academy takes you from the basics to error handling and scopes in four weeks.
Share
Short link: powerautomate.ninja/en/75
Source: PowerPlatformTip #75, Microsoft Learn: Limits of automated, scheduled, and instant flows.