cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Yvonzim
Resolver I
Resolver I

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 blog
Power 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 blog
Power Automate Video Tutorials
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
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 (1,325)