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
Impactful Individual
Impactful Individual

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
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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

PA Survey Carousel Image.png

We want to hear from you!

If you are a small business ISV/Reseller, share your thoughts with our research team.

Users online (2,798)