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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Is there anyway to red...
Power Automate
Unanswered

Is there anyway to reduce the execution time of the flow that has variable within a loop?

(0) ShareShare
ReportReport
Posted on by 39

Hello everyone,
I am trying to extract the data from web API and copy that into the excel Tables. It is taking more than 30 minutes.
Basically, there are multiple loops in my flow and I have used 'Set' variable within a loop by keeping its value as "null". So that, data can be appended within the internal loop only. 
Similarly, using the concurrency and degree of parallelism, data is appended abnormally. I think this cannot be used within the loop that has Variables.

So, How can I reduce the execution time of the flow? Can we use compose action instead of variable in this workaround ?

Below is the part of flow. 

aakashmarasini_1-1716372436552.png

 

aakashmarasini_2-1716372500462.png

 

aakashmarasini_3-1716372590301.png

 


Thank You!
Regards,
Aakash

Categories:
  • jitheshk Profile Picture
    100 on at

    If you are using variables then Parallelism will create issue. Incase if the following action are not dependent you can add "Parallel branches" run the independent actions parallelly rather than running them sequentially... 

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    These topics can greatly speed up your flow by eliminating loops:

  • aakashmarasini Profile Picture
    39 on at

    Thanks @jitheshk for the response. 
    I cannot use the "Parallel branches" because there are many cases where one actions is dependent on another.
    Best Regards,
    Aakash

  • aakashmarasini Profile Picture
    39 on at

    @Chriddle Thanks for the your reply.
    I have gone through the documentation xpath . However, it looks like xpath will not work in my flow. I need to collect array of data under array. So, Loop is necessary.
    Regards,
    Aakash

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Maybe you can describe what you're doing and/or show your JSON.

    xpath could be a more powerful tool than it seems at first glance.

  • aakashmarasini Profile Picture
    39 on at

    @Chriddle Due to the privacy, I couldn't keep the JSON. However, I tried to explain what I am doing in the flow.

    aakashmarasini_1-1716516261132.png

     

    aakashmarasini_2-1716516654507.png

     

    aakashmarasini_3-1716517885420.png

     

    aakashmarasini_4-1716518184300.png

     

    aakashmarasini_5-1716520500890.png

     

    Similarly, There is Excel file for each company in SharePoint. Each file has 19 product tables and data needs to be pasted on the correct table on the correct file. I have a data mapping table that is used in mapping the file name, Product Table name of the Excel file with Web API.

    However, the data is pasted correctly.  
    The main issue is execution time of the flow.

    Thanks!

  • Chriddle Profile Picture
    8,729 Super User 2026 Season 2 on at

    Unfortunately, this doesn't tell me the structure of your data.

    Some JSON seems necessary.

  • Christ0f Profile Picture
    147 on at

    One can add filter queries in the list Excel action and try to use Switch actions instead of foreach to increase performance.  Link link2

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 377

#2
11manish Profile Picture

11manish 292 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 128

Last 30 days Overall leaderboard