Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filter OData in SharePoint Get Files action by date

hi guys,


so I have a document library that is chokka blok full of documents(132k). I'm trying to get a way to move small ish blocks of documents into specific files. Im currently using the method below. My problem is that I know can only run a maximum of 5000 iterations of Apply to each, so to reduce the number of iterations I want to filter get files with an odata filter to pull out chunks of documents by the modified by or modified column. i just dont know how.


can anyone help - i've tried the documentation , by im obviously not tech enough to understand it


Currently the flow below works but never completes , it just runs and runs and runs




get files(Properties Only)


Apply to each


condition ( is eq to " text" )


get content


move file

Community Support
Community Support

Hi @Anonymous,

Do you want to use filter query to return files based on the Modified date?
Let’s say you want files that modified date greater or equals 7 days ago from Today.
Then you could try the following code:

Modified ge 'formatDateTime(addDays(utcNow(),-7),'yyyy-MM-ddThh:mm:ssZ')'

Note: Please make sure the formatDateTime is surrounded by a single quote.

More details about Odata filter query, please check the following doc for more details:
If you need more help, please feel free post back.


Best regards,

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

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (10,512)