Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Answered

Flow taking too long

(0) ShareShare
ReportReport
Posted on by 9
Hi all Bit concerned about transitioning to flow. I have a batch process I run every night it uses fetchxml to grab an array of assets in dynamics field service. It then runs a workflow on all cases (incidents) via fetch that counts breakdowns in last x months and updates a field on the asset. It pulls around 1500 assets and goes for just under 2 minutes however lately may be once a month I have a failure when it breaches 2 minutes otherwise it works well. I have tested in sandbox with flow however can take approximately 15minutes to complete, basically it: 1. Reccuring schedule trigger 2. List Records with fetch for customer asset and gets customerassetid 3. Apply for each 4. List Records using fetch for incidents (cases) by dynamically passing customerassetid to fetch statement and filter on incident type and date. 5. Update Record by doing length on List Records. It works however is very slow compared to my batch / workflow method. Am I using a poor flow method to complete task? Thanks Antc
  • sukanya28 Profile Picture
    4 on at
    Re: Flow taking too long

    I have turned on Concurrency control, but still it takes too long. It's 19 minutes, the flow is still running.

  • ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Flow taking too long

    @antc 

    No issues if which I am aware.

  • antc Profile Picture
    9 on at
    Re: Flow taking too long

    @ScottShearer 

     

    Fantastic solution went from 17 minutes to 1.2 minutes.

     

    Any issues with setting parallelism t0 50 default seems to be 20?

     

    Thanks Scott 😁

  • Verified answer
    ScottShearer Profile Picture
    25,208 Most Valuable Professional on at
    Re: Flow taking too long

    @antc 

    Go to the settings for each of your loops and turn on Concurrency control - this will allow the loops to run concurrently rather than sequentially.

     

     

     

     

  • antc Profile Picture
    9 on at
    Re: Flow taking too long

    I don't think I can as it needs to be in a loop as "List Assets" returns around 700 assets.

  • v-alzhan-msft Profile Picture
    on at
    Re: Flow taking too long

    Hi @antc ,

     

    Please move the List cases action outside the Apply to each, it would faster your flow.

    1.png

     

    Best Regards,

    Alice

     

    Community Support Team _ Alice Zhang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

  • antc Profile Picture
    9 on at
    Re: Flow taking too long

    Hi Alice

     

    Thanks for answering!

    Basically in:

    • List assets is a fetch for certain assets ~ 1000 results
    • List cases is another fetch that gets passed the GUID and the returns those related cases that meet 1 of 3 conditions
    • Then the last action is update the asset with total cases per asset.

    I don't think ODATA will help any more than my fetch as assets to cases is 1:M.


    flow_1.JPG

     

  • v-alzhan-msft Profile Picture
    on at
    Re: Flow taking too long

    Hi @antc ,

     

    Could you please share a screenshot of the configuration of your flow?

    I suggest that you could add the filter query in the "Get items" action, it would take less time when run the flow.

    The link below for the Filter query for your reference:

    https://www.c-sharpcorner.com/article/apply-filter-query-with-get-items-sharepoint-action-in-microsoft-flow/

    https://sharepains.com/2018/11/12/sharepoint-get-items-odata-filter-query/#:~:text=An%20OData%20filter%20query%20can%20optimize%20your%20flows,find%20yourself%20many%20times%20dealing%20with%20list%20items.

     

    Best regards,

    Alice

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard

Featured topics

Restore a deleted flow