0

I have a document library inside SharePoint where the document library contains 1 million documents. Each document has an expiry date.

Now I want to create a scheduled flow which runs daily and get all the documents which have their expiry date = Today.

Now it is expected that the documents which have their expiry date = Today will be more than 5,000 items.

So can anyone guide me on how can I implement this inside the scheduled flow? If I want to do so using CSOM, I would do these steps:

  1. CAML query to get the document which have their expiry date = Today + Implement paging to avoid the 5,000 threshold issue.

So inside Power Automate, how can I implement this?

1

SharePoint REST API returns maximum 5000 items in one API call. In Power Automate flow, there are few ways to get more than 5,000 items:

  1. Using Pagination (from action settings) - This setting is specific to few actions
  2. Using the Do Until method

You can find detailed steps for above methods in below articles:

  1. How to get more than 5000 items from SharePoint Online in Flow
  2. Get more than 5000 items from SharePoint with Power Automate

Also, there is limitation on how many items will be returned using pagination. It is based on the license/plan profile you are using:

enter image description here

For detailed limitations of Power Automate flows, check below documentation: Limits for automated, scheduled, and instant flows

6
  • thanks for the helpful reply.. so since we have 1 million records, so what i am trying to achieve is not supported inside Power automate.. and it will be easier to writ CSOM code inside console application that run daily i do the data retrieval and checking ?
    – john Gu
    Jul 4 at 7:42
  • any advice on my above comment?
    – john Gu
    Jul 4 at 7:53
  • (Maximum) How many expired items/documents will be returned at a time? And Yes, it should be easier to retrieve more items using CSOM/console application as you will have more control using programming. Jul 4 at 7:59
  • 1
    in the near future we could have 5,00,000 items in one report..
    – john Gu
    Jul 4 at 8:11
  • Please Upvote(^) and accept as an Answer if it helped you in any way. Jul 9 at 18:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.