cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Noah
Advocate II
Advocate II

Working with SharePoint lists larger than 5000 items?

I have built several flows that successfully use the "When existing item is modified" trigger for SharePoint. However in a list that exceeds 5000 items, the flow fails and returns the error below (output body of trigger action). Has anyone used a SharePoint list greater than 5000 items with Flow? How can I avoid the error below?

 

I'm not trying to query for the entire list, just simply triggering when any single item is updated.

 

{ "status": 502, "message": "The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.", "source": "https://workcycle.sharepoint.com/sites/hub/assetmgmt/_api/SP.APIHubConnector.GetUpdatedListItems", "errors": [ "-2147024860", "Microsoft.SharePoint.SPQueryThrottledException" ] }

 

 

6 REPLIES 6
v-monli-msft
Community Support
Community Support

Hi @Noah,

 

I thought there actually is a limitation in Flow when using the trigger, but I am not sure the exact number. I will report this to the pg and will update here when there is any answer.

 

Regards,

Mona 

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-monli-msft
Community Support
Community Support

Hi @Noah,

 

Yes, 5000 items is the limit for modified trigger since we run a complex query that needs to go through all items to find recently modified ones. And those get throttled when hit a list bigger than 5000 items.

 

So this is a known limitation, if you want to extend, please consider to submit an idea in the Flow Ideas forum, so it might be considered for future releases.

https://powerusers.microsoft.com/t5/Flow-Ideas/idb-p/FlowIdeas

 

Regards,

Mona Li

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

I see. Shouldn't there be a big red warning in this trigger description that tells users it will stop working the day they add item #5000? This seems to me a fundamental blocker to using Flow with SharePoint, if you run the risk of your entire process breaking without recourse after an arbitrary limit is reached. This is the conversation with the business: "You know that fancy automated workflow we created and came to rely on? Well the other day it stopped working and will never work again -- sorry!"

 

Hopefully webhooks can be used instead for this trigger? This is GA and seems like it wouldn't have this issue:

 

https://dev.office.com/blogs/sharepoint-webhooks-is-now-generally-available-build-service-oriented-p...

 

 

 

 

 

 

I can't even use a simple Filter if the list is above 5000 so nice job there limiting ALL operations withing Powerapps if the item count is greated than 5000.

You can use a filter if the returned number is lower than 5000 and you use indexes - just note that the order in your filter is important - e.g.:

 

If I have 10000 items in a list, and of these 7500 has "Status2" = "Active" + 500 has "Status1" not equal "Disabled" + both Status1 and Status2 are indexed columns

 

This will work:

(Status1 ne 'Disabled') and (Status2 eq 'Active')

 

This will fail (even though the combined filter is less than the 5000):

(Status2 eq 'Active') and (Status1 ne 'Disabled')

 

But really an issue with the trigger not working (not even with subfolders) -> Seems either a webhook or multiple lists is the solution here 😞

ohthreesixfive
Resolver I
Resolver I

*Posted this as a response elsewhere to a question, but putting it here in case someone stumbles onto this and finds it useful.

 

Hi @Noah,

 

I ran into this very issue recently after having gone live with a new document library to store a large number of files that were being hosted on a different (and costly) cloud platform. Of course, during testing the Flow was working great (picking up newly created and modified files) - but as soon as I brought everything over (73k+ files in total) and 'turned the lights on' the trigger would no longer trigger!

 

Anyways, I was able to resolve it by turning on indexing on the 'Modified' column. Since I hadn't seen this documented anywhere (and I did a lot of searching), I went ahead and created a post to walk you through the process in case you need more detailed guidance. Here's the link:

 

https://www.ohthreesixtyfive.org/2018/03/microsoft-flow-overcoming-the-list-view-threshold.html

 

Of course, if you have exceeded 20k items you'll need to trim it below that to be able to turn on indexing, but otherwise (Update: The 20k item limit to turn on indexing has, mercifully, been lifted! You can proceed to turn on indexing without needing to trim back your content now.) it should be pretty painless. Let me know how it goes!

 

Best regards,

 

Ramiro

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.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

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

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.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (5,133)