web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to increase pagina...
Power Automate
Unanswered

How to increase pagination to >5000?

(0) ShareShare
ReportReport
Posted on by 28

I have a flow that looks at a folder on our sharepoint, runs the get files (properties only) command and then filters for any files created since yesterday and emails a list to my team. The folder on our sharepoint contains roughly 1,700 files and the pagination setting seems to have a threshold of 5,000. Down the road we are going to exceed 5k files and then I suspect the flow will break. Is there any way to avoid this, besides clearing out files from the sharepoint folder? 

 

BrianQW_0-1657632628733.png

 

Categories:
I have the same question (0)
  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @BrianQW 

    If you purchase a premium Power Automate license, you can increate the threshold to the hundreds of thousands. 

    However, you almost never want to loop through a large number of files.  A much more efficient way is to use a filter query in your GetFiles properties only action so that only the files that meet your criteria are returned - no need for the condition.

    See my example below and note the single quotes around the expression.

    image.png

     

  • MarconettiMarco Profile Picture
    3,812 Super User 2024 Season 1 on at

    Hello @BrianQW ,

    you can do it by following these guides:

     

    https://www.tachytelic.net/2020/04/get-more-5000-items-sharepoint-power-automate/

    https://tachytelic.net/2020/04/use-rest-api-power-automate-get-over-5000-items-from-sharepoint/

     

     

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

    BR,

    Marco

  • Shujaath_Khan Profile Picture
    1,111 Super User 2024 Season 1 on at

    Hi @BrianQW 

     

    You can try below

    Filter Query => $skiptoken=Paged=TRUE&p_ID=2&$top=5000

    Thanks
    Please click Accept as Solution on this reply if it helped to solve your issue, and thumbs-up if you feel this is useful or important in other ways as a boost.

     

     

  • BrianQW Profile Picture
    28 on at

    Cheers I will try this. Just getting our IT guy to upgrade us to premium. This will be the exact string in case I have it wrong (I'm a finance guy so this is all new to me; trying to build a population of files created in the past 7 days and then I'll filter down from there):

     

    Created ge 'formatdatetime(adddays(utcnow(),-7),'yyyy-MM-dd')

     

    BrianQW_0-1657645736542.png

     

    I'm guessing the "apply to each" box will pop up once we have our premium subscription.

     

  • BrianQW Profile Picture
    28 on at

    Getting expression not valid.

     

    BrianQW_2-1657645966107.png

     

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @BrianQW 

    You need to enter your expression in the expressions window.

    You also need to add a single quote at the end of the expression.

    Please refer to my screen shot above.

     

  • BrianQW Profile Picture
    28 on at

    When I make these changes and check the output it's not pulling any files, but I know for certain we've been creating files every week day so it should be pulling something. I used an adddays to filter the initial 'get files (properties only)' pull to grab files created the last 7 days. The filter array 2 filters than down to files created since yesterday, so some redundancy there oh well. 

     

    Are you able to see what I'm doing wrong?

     

    formatdatetime(adddays(utcnow(),-7),'yyyy-MM-dd')

    BrianQW_0-1658166086348.png

     

     

     

  • ScottShearer Profile Picture
    25,290 Most Valuable Professional on at

    @BrianQW 

    Can you show me the full formatDateTime expression that you are using?

    Can you post a screen shot of the output of the Get files (properties only) 2 action after a run?

     

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 784

#2
Valantis Profile Picture

Valantis 589

#3
Haque Profile Picture

Haque 522

Last 30 days Overall leaderboard