Introduction
One of the most common challenges while working with Microsoft SharePoint and Microsoft Power Automate is efficiently handling large SharePoint lists containing more than 5000 records.
Although the Get items action supports pagination, enterprise-level solutions often require significantly better control over large data processing, including batching, logging, filtering, performance optimization, and error handling. In such scenarios, implementing a Do Until loop with incremental ID-based batching logic becomes a scalable and reliable solution.
In this article, we will implement a batching approach to efficiently retrieve more than 5000 SharePoint records using Power Automate. Instead of fetching all records in a single execution, the flow will retrieve records in batches of 5000 items at a time, process each batch, and then continue retrieving the next set of records sequentially until all items are processed.
This approach helps
Improve overall performance
Reduce timeout and throttling risks
Optimize memory consumption
Provide better control over large-scale data processing
Build more scalable and enterprise-ready automation solutions
By the end of this article, you will understand how to design a reliable batching mechanism for processing large SharePoint datasets efficiently in Power Automate.
Steps for implementation

Step 1 : Create the Flow
Create a new flow:
Instant Flow / Scheduled Flow
Add trigger:
Manually trigger a flow
Step 2 : Initialize Variables
Variable 1 - LastRecordID
| Property | Value |
|---|---|
| Name | LastRecordID |
| Type | Integer |
| Value | 0 |
Variable 2 - LastRetrievedNoOfRecords
Join the conversation! Your thoughts help the community grow.