cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
288088
Post Partisan
Post Partisan

How will MS flow work with a sharepoint list with thousands of objects?

So I got this list that will in the future get thousands of objects, and I got this flow that works:

 

flowsovtid.PNG

But it checks all objects I have in the list and it takes about 5 seconds.. But when I have 2000 objects is will take a very long time right? Is these anyway to avoid this?

1 ACCEPTED SOLUTION

Accepted Solutions

I solved it and I would like to share:

 

I just did an expression in filter query in "Get item". Now is only search for items for the last 2 days.

 

solved adddays.PNG

View solution in original post

9 REPLIES 9
efialttes
Super User
Super User

Hi!

You can apply some strategies to optimize your flow

For example, instead of an Apply to each + Condition inside, my suggestion is to use a 'Filter array', or implement an ODATA Filter in your 'Get items'... then Apply to each (no need to keep Condition inside),

 

Also, depending on your requirements, you can configure your 'Apply to each' to execute iterations in paralel (max 50) instead of sequential. More info here:

https://powerusers.microsoft.com/t5/Power-Automate-Community-Blog/Degree-of-Parallelism-in-Power-Aut...

Finally, adding Select action block can improve your performance in specific scenarios, es explained here:

https://sharepains.com/2018/10/15/microsoft-flow-improve-your-flows-performance-in-a-few-easy-steps/

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



This flow I got works fine, the only problem I got now is that it will only check the 100 first items in my sharepoint list which contains 1900 items. I would like it to check the newest 100 items instead, is that possible somehow?

microsoft flow 100 recent items.PNGmicrosoft flow 100 recent items2.PNG

Hi!

"The only problem I got now is that it will only check the 100 first items"

Oops! I had the same problem some time ago. My suggestion is to increase current  default limit by adding a value to 'Top Count' input fom 'Get items'... up to 5,000 items. You an even increase it more by activating pagination

More info here

https://alextofan.com/2019/08/22/how-to-get-more-than-5000-item-from-sharepoint-online-in-flow/

Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Alright.. But isnt there a better solution for this? Because this list in a couple of years might contain many thousands of items.

I solved it and I would like to share:

 

I just did an expression in filter query in "Get item". Now is only search for items for the last 2 days.

 

solved adddays.PNG

View solution in original post

HURRAY!

IT WORKS!

 

Thanx for sharing the details of how you fixed the problem, and also for marking this topic as "Solved" by clicking "Accept as a solution". This way other community members facing this same problem in the future have the chance to find a solution faster!

Flow_AcceptSolution.png

My humble suggestion (OPTIONAL) is to please click on 'Thumbs up' in any answer you found valuable.

Flow_thumbsUp.png

Even though this step is OPTIONAL, please remember it is the cheapest, easiest way to say thanks to somebody that simply tried to help. And just between you and me, everytime an inspiring answer receive a kudo, an ewok escapes from The Emperor menace  😉

 

Thanx for your contribution to keep this community great!

 



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



@288088 you said "But isn't there a better solution for this? Because this list in a couple of years might contain many thousands of items." Yes there is. Go to the setting s for the Get items action (the 3 dots at the top right of the action then select Settings). Turn the toggle for Pagination on and change the threshold to 10000 or some figure which is well above the number of items you'll have in the list.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Well, it could work for the beginning but in a couple of years this list might even get over 100k items. And I want the flow to only take about 5 minutes, I cant imagine how long it would take with 100k items. I only need to check the last day 🙂 

That's why you must use a filter query as that is the most efficient method of the Get items bringing back just the items you want.

Rob
Los Gallardos

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Users online (1,048)