Showing results for 
Search instead for 
Did you mean: 
Level: Power Up

Is Flow a working alternative for SharePoint Retention Policy/365 Retention

I have a requirement to archive documents in a Library, older than 2 years to another Library.  


Just wandering if I can use flow. 


I've created a flow to do this, and have created a Get Files Filter Query to get old documents.  However, I read elsewhere that the Filter Query has a limit of 5000 documents.   Does that mean that Flow will crash if there are more than 5000 old documents, or does that mean that the Flow can only archive 5000 documents at a time?





Super User
Super User

Re: Is Flow a working alternative for SharePoint Retention Policy/365 Retention

@suthan :

It is not that the filter query has a limit of 5,000 items, the SharePoint Get Items action can retrieve a maximum of 5,000 items unless you have an upgraded Flow license and not the license that comes with Office 365.  The Filter Query actually helps you mitigate the 5,000 item limit by filtering the items returned to only those that meet your criteria.


Also, Get Items will retrieve a maximum of 100 items by default.  If you want more, you need to click on Settings for the get items action and configure it for up to 5,000 items as in the image below:



If you have more than 5000 documents that need to be archived, you'll need to run the Flow more than once.  You may also consider running the Flow with a recurrence trigger so that documents get moved as they age out.


If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.


Helpful resources


Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!


Incoming: New and improved badges!

Look out for new contribution recognition badges coming SOON!


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Users online (5,394)