cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
RicardoJC_23
Frequent Visitor

How to optimize a Flow?

Hello guys! I'm currently working on a flow to update/create a sharepoint item inside a list based on an excel table. 

 

Basically, the flow scans the Excel table for all records (aprox. 4500 records) once per day. Then, if the record exists within the sharepoint List, it updates the item. If it doesn't, then it created a new one. On average 99% of the records are updated and the remaining 1% is created. 

 

My issue is, it takes too long to run. About 1 hour and 30 minutes on average. Even with Concurrency Control activated on the 'Apply0' action (look image below).

 

The flow looks something like this:

screencapture-us-flow-microsoft-manage-environments-Default-bf40401a-6dbb-4830-b9ba-8af990a4545f-flows-shared-265783c1-1a05-4e17-8adc-a467c9619ef6-2020-07-13-16_51_47.png

 

Is there anyway I can make my flow run more efficiently and take less time to complete this whole action?

 

Any tips, even different approaches to reach my needs, are deeply appreciated.

 

Thank you very much in advance.

1 ACCEPTED SOLUTION

Accepted Solutions
Mike2500
Super User
Super User

I'd go back to the requirements and ask why you're trying to keep a sharepoint list in sync with an excel spreadsheet. Why not just use one or the other? 

 

If for some reason it really was a requirement to keep data in two places, which again is almost never a good thing, I'd turn to powershell or similar, pehaps via Azure Runbooks. Download the entire list and data from the spreadsheet, do the comparison, and then use the SharePoint client API (via SharePoint PnP) to do batch updates. 

View solution in original post

2 REPLIES 2
Mike2500
Super User
Super User

I'd go back to the requirements and ask why you're trying to keep a sharepoint list in sync with an excel spreadsheet. Why not just use one or the other? 

 

If for some reason it really was a requirement to keep data in two places, which again is almost never a good thing, I'd turn to powershell or similar, pehaps via Azure Runbooks. Download the entire list and data from the spreadsheet, do the comparison, and then use the SharePoint client API (via SharePoint PnP) to do batch updates. 

takolota
Memorable Member
Memorable Member

It’s also possible to use some Filter array actions, SharePoint batch create, & SharePoint batch update set-ups in flow to greatly reduce API calls & run-times.

 

https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Batch-Update-SharePoint-List-With-Extern...

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (4,266)