cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yvonzim
Helper IV
Helper IV

Delete a large number of rows in Sharepoint list, limitation

I have searched the internet but cant find out how to delete more than 1000 rows in a sharepontlist with flow.

I do read about a limitation of 5000 rows and a certain amount of API calls but in my case flow only deletes 1000 rows and then stops working.

 

This is the flow with an Odata filter :

addDays(utcnow('yyyy-MM-ddTHH:mm:ssZ'),-90)
it deletes all rows where Created date is older than 90 days.
 

Yvonzim_0-1632831727000.png

 

a) how can i prevent the flow to stop after 1000 rows.

b) the list can be far more than 5000 rows after a month, is this the best way to store data or should i try an other solution like Dataverse? I have an E5 license.

1 ACCEPTED SOLUTION

Accepted Solutions
abm
Super User
Super User

Hi @Yvonzim 

 

You can use the pagination method to retrieve more than 5000 records.  There are lots of articles already exists so I don't want to explain more on this.

 

Please have a look at the below links.

 

Get more than 5000 items from SharePoint with Power Automate (tachytelic.net)

 

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

 

Not sure why it stopping after 1000 rows. What error are you getting? If you run again what happens?

 

Try to implement the pagination method and see whether that resolves or not.  

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

5 REPLIES 5
Paulie78
Super User
Super User

I suspect the problem is that your Get Items action is only returning 1,000 rows, and therefore the delete action only delete's 1,000 rows.

 

This method will be very slow. I did a video and blog post about how to delete items quickly using only a single action. Check it out and see if it works for you:

 

https://www.tachytelic.net/2021/06/power-automate-delete-sharepoint-items/

 

Blog: tachytelic.net

YouTube: https://www.youtube.com/c/PaulieM/videos

If I answered your question, please accept it as a solution 😘

abm
Super User
Super User

Hi @Yvonzim 

 

You can use the pagination method to retrieve more than 5000 records.  There are lots of articles already exists so I don't want to explain more on this.

 

Please have a look at the below links.

 

Get more than 5000 items from SharePoint with Power Automate (tachytelic.net)

 

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

 

Not sure why it stopping after 1000 rows. What error are you getting? If you run again what happens?

 

Try to implement the pagination method and see whether that resolves or not.  

 

Thanks

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blogPower Automate Video Tutorials

View solution in original post

RobElliott
Super User
Super User

@Yvonzim by the way your filter query is wrong, it should be lt not gt if you are deleting items older than 90 days.

 

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.

@abm 

Tnx for the links.

 

It gives no error just stops after 1000 rows, i will follow @Paulie78 his adivice.

@RobElliott 

 

Tnx for the correction, weird thing it does delete the right rows untill now,  but i will keep this in mind if something goes wrong.

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!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,382)