Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Flow takes HOURS to run

(0) ShareShare
ReportReport
Posted on by 14

Hello everybody, 

I'm fairly new with Microsoft Power Automate. I want to apply this office script to multiples Excel sheets in my Onedrive folder. This is the flow that I create, not sure why but it takes HOURS to run/test and I ended up canceling all of them because it took too long. I have a slight idea that it might be because of my license (I don't really understand about what licenses out there that allow me to run my script in about 30 Excel sheets). I have Microsoft 365 Business plan but Power Automate plan free.

Do I really have to upgrade my license to have flow run faster? Is there anyway I can improve this? For example replace "Apply to each" by another function? Thank you!

Flow.png

Categories:
  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Flow takes HOURS to run

    That output seems correct. Could you try to test the following?

    1. Replace the run script action, e.g., with sending an email to yourself (or no action at all), and verify that the flow successfully loops through all the files in a reasonable time
    2. Create a flow that runs the script on a single workbook and verify that the script succeeds

    I'm hoping that can help us narrow down the issue.

  • Kuromi102 Profile Picture
    14 on at
    Re: Flow takes HOURS to run

    For some reasons my replies disappeared even if I tried to repost. But this is the expanded "list files in folder". I appreciate your help! 


    Screenshot 2023-09-13 145824.png

  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Flow takes HOURS to run

    That's strange... Is there any error? Can you expand "list files in folder" and share the full output of that action (sensitive data removed as needed)?

  • Kuromi102 Profile Picture
    14 on at
    Re: Flow takes HOURS to run

    I'm not sure why but "apply to each" can't be expanded from my end. I tried to click multiple times but it just doesn't expand. 😞

  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Flow takes HOURS to run

    Can you expand "apply to each" to see how many times the script runs?

     

    Unfortunately, I don't think there's a way to avoid using apply to each because a script can only run on a single workbook at a time.

  • Kuromi102 Profile Picture
    14 on at
    Re: Flow takes HOURS to run

    Yes, so it looks like it always stuck at "Apply to each". That's why I wonder if there is any better solution to replace "Apply to each" function. 

     

    Screenshot 2023-09-13 143357.png

  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Flow takes HOURS to run

    Could you select a specific run (from the timestamp) and share a screenshot of that? That should show which actions were executed and how long each one took.

  • Kuromi102 Profile Picture
    14 on at
    Re: Flow takes HOURS to run

    Thank you and sure, I can share! 
    This is the flow run history. As you see, I canceled all the time because it took too long. The "test failed" and "failed" status were when I tried to make the Concurrency Control on with 20 degree of parallelism. Please let me know if you had any idea or solution! thank you very much!

     

    Screenshot 2023-09-13 130421.png

  • MichelleRanMSFT Profile Picture
    Microsoft Employee on at
    Re: Flow takes HOURS to run

    Could you share a screenshot of an execution from the flow's run history? I'm wondering whether the script ever runs successfully, or if the flow is just taking a long time because there are a lot of files to run the script on.

  • Kuromi102 Profile Picture
    14 on at
    Re: Flow takes HOURS to run

    Thank you very much for your help! I really appreciate your fixed script! It looks really clean now!!

    However, I've tried with the flow but unfortunately it doesn't improve the consumed time. It has been an hour but still running. I wonder if there is any other way to fix this issue? 

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,618 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,957 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow