web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Concurrency in an Appl...
Power Automate
Answered

Concurrency in an Apply To Each that calls external web service

(0) ShareShare
ReportReport
Posted on by 313

I'd like help understanding concurrency in a Power Automate flow's Apply to Each operation when it makes an external HTTP call and processes its response, please.

I have a PowerApps-triggered flow which

  • takes an incoming list of records with unique ID 'MyID' and puts them in an array variable, 'JSONIn'
  • initializes an output array variable, 'JSONOut'
  • performs an Apply to Each operation on the records in JSONin. This operation..
  • calls an external web service (using SOAP) with the record. The web service does stuff and creates its own record, with unique ID 'TheirID'. It returns a response including its TheirID (but nothing else to uniquely identify back to the the calling record and MyID)
  • Apply to Each then takes this response and creates a record that includes TheirID and MyID, derived from items()?['MyID'], and
  • appends this record to JSONOut
  • after Apply To Each the main flow then Responds with JSONOut

I therefore end up with a table that allows me to link MyID and TheirID. Any variables within the Apply To Each loop are Composed, and its only external references are to JSONOut and JSONIn.

 

I have the Apply To Each operation set with Concurrency Control on and Degree of Parallelism 1. This all works fine, but could do with speeding up. Can I safely increase the parallelism to improve speed, or does this risk getting a wrong TheirID for a MyID?

 

I'm a bit hazy about the Apply To Each operation, and whether each iteration is safely scoped such that the response from the external web service is always aligned with that iteration's item()?['MyID'], no matter how long it takes. The order in which records are created in JSONOut doesn't matter.

Categories:
I have the same question (0)
  • Verified answer
    cmertz Profile Picture
    43 on at

    If I am correct in my understanding that there is no locally held variables in the Apply to Each loop, you should be able to safely increase parallelism within the loop. If you are using the index of the original value in JSONin to find values in JSONout at any later point then issues may arise, but if the order of the values in the output is irrelevant than increasing parallelism would safely speed up your process. You may need to tweak the retry policy on your HTTP call as you're more likely to encounter a 5XX error calling the service multiple times simultaneously.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard