Count SharePoint List Items by Column Value in Power Automate
Question details
Count SharePoint list items that match a column value while addressing possible Get items errors.

- Product
- Microsoft Power Automate and SharePoint
- Device & OS
- not provided
- Scenario
- A flow needs to retrieve and count only SharePoint list items with a specified column value.
- Observed behavior
- The Get items action may return a 503 error as the list grows, and pagination alone may not resolve it.
Identify the SharePoint list, the column's internal name, and the value you want to count. Check the failed Get items action in the flow's run history for its error details.
Filter and count matching SharePoint items
Use an OData filter to retrieve only matching rows, then count the returned items.
In Power Automate, open your flow and add or edit the SharePoint Get items action. Select the Site Address and List Name.
Under Advanced parameters, enter an OData expression in Filter Query, such as Status eq 'Open'. Replace Status with the column's internal name and Open with the value to match.
Open the Get items action's menu, select Settings, and turn on Pagination. Set the threshold high enough to include the expected matching items, subject to applicable limits.
Add a Compose action and enter the expression length(body('Get_items')?['value']). If your action has a different internal name, use that name instead.
Save and run the flow, then open its run history and check the Compose output against the expected number of matching items.

Index the filtered column and reduce retrieval size
Use this approach when a large list or a broad query makes Get items unreliable.
Investigate a persistent Get items 503 error
Use run details and service status to investigate errors that continue after filtering and pagination.
Review SharePoint List Data in WPS Spreadsheets
WPS Office is a free, lightweight Office alternative with a familiar interface. Open exported list data in WPS Spreadsheets to review and count values, with compatible file formats that make migration easier. WPS does not fix Power Automate connector errors.

Frequently Asked Questions
How do I count only items with a particular status?
In Get items, set Filter Query to an expression such as Status eq 'Open'. Add a Compose action with length(body('Get_items')?['value']) to count the returned matches.
Why is my count lower than the number of matching items?
The flow may not have retrieved every match. Check the Get items pagination setting and threshold, the filter expression, and the action output in run history.
Does enabling pagination fix a 503 error?
Not necessarily. Pagination helps retrieve multiple pages, but a 503 can also involve a connector or service issue. Check the failed action's run details and service health.
Where can I index a SharePoint column?
Open the list's Settings, select List settings, and choose Indexed columns. Create an index for the filtered column if its type supports indexing.




