2 Simple Ways to Count Rows in a SharePoint List Using Power Automate

You’ve built a SharePoint list, it’s grown to a few hundred rows, and now you need to pull that row count inside a Power Automate flow — maybe to send a daily summary, trigger logic based on how many items exist, or just track how full a list is getting.

The good news: there are two solid ways to do this. The not-so-obvious news: one of them silently gives you the wrong answer if your list has more than 5,000 items. I’ll show you both methods, tell you exactly when to use which, and point out the gotcha before it bites you.

What You’ll Learn

  • How to count rows using the Get Items action + a simple expression
  • How to count rows using the SharePoint REST API (faster, and works for any list size)
  • When to use each method (including the 5,000-row limit you need to know about)
  • How to count only filtered rows (e.g., only active items, only items from this week)
  • Common errors and how to fix them

Before You Start

You’ll need:

  • Access to Power Automate (make.powerautomate.com)
  • A SharePoint list you want to count rows in
  • Basic familiarity with creating flows (if you’ve added a “Get Items” action before, you’re good)
Power Automate Count SharePoint List Items

Count Rows in a SharePoint List Using Power Automate

Here, I will show two ways to count rows in a SharePoint List Using Power Automate

Method 1: Get Items + length() Expression

This is the quickest method to set up. It uses the Get Items action to pull list items, then counts how many came back using a length() expression.

Step 1: Create an Instant Cloud Flow

  1. Go to make.powerautomate.com
  2. Click + Create → Instant cloud flow
  3. Give it a name, select Manually trigger a flow, and click Create

Step 2: Add the Get Items Action

  1. Click + New step
  2. Search for Get items and select the SharePoint Get items action
  3. Set the Site Address to your SharePoint site
  4. Set the List Name to the list you want to count
Power Automate Count rows in a SharePoint list using the Get items

Important — read this before you move on: By default, Get Items only returns 100 rows, even if your list has 500. To count all rows accurately with this method, go into the action’s Settings (click the three dots → Settings), turn on Pagination, and set the Threshold to 5000. This tells Power Automate to keep fetching until it has up to 5,000 items.

Power Automate - How to find total number of records from a Sharepoint list

If your list has more than 5,000 rows, stop here and use Method 2 instead. The length() approach cannot go beyond 5,000 — even with pagination enabled. You won’t get an error; you’ll just get a count of 5,000 when the real number might be 8,000. Method 2 handles this correctly.

Step 3: Add a Compose Action to Count the Rows

  1. Click + New step
  2. Search for Compose and select it
  3. In the Inputs field, click in the box, go to the Expression tab, and enter:
length(outputs('Get_items')?['body/value'])
SharePoint online Get List Item Count using Power Automate
  1. Click OK

This expression counts the number of items returned by the Get Items action. The output will be a plain number — like 47.

Step 4: Use the Count in Your Flow

Now you can use the output of that Compose action anywhere in your flow. A few practical examples:

  • Send an email: Add a Send an email (V2) action. In the body, insert the Compose action’s output from dynamic content. Your subject could be something like “EmployeeList currently has X rows.”
  • Send a Teams notification: Use the Post message in a chat or channel action to ping a channel with the count.
  • Store it in a variable: Add an Initialize variable action before Get Items, set type to Integer, then use Set variable after the Compose to store the count for use later in the flow.

Step 5: Save and Test

Click Save, then Test → Manually → Run flow.

Check the flow run history. Expand the Compose action — you’ll see the row count in the Outputs section.

Count Rows in a SharePoint List Using Power Automate

That means this list has 5000 or more; let’s see the next method.

Method 2: SharePoint REST API (ItemCount)

This is the method I’d recommend for most people, especially if your lists might ever grow beyond 5,000 rows. It’s faster, lighter, and doesn’t pull all the items into memory — it just asks SharePoint for the count directly from its metadata.

The trade-off: this always gives you the total count of the list. It can’t be filtered (you can’t use it to count only “Active” items, for example). For filtered counts, see the section below.

Step 1: Create an Instant Cloud Flow

Same as before — create an Instant cloud flow triggered manually (or whatever trigger fits your scenario).

Step 2: Add the Send an HTTP Request to SharePoint Action

  1. Click + New step
  2. Search for Send an HTTP request to SharePoint and select it
  3. Fill in the following:
    • Site Address: Your SharePoint site URL
    • Method: GET
    • Uri:
/_api/web/lists/getbytitle('YourListName')/ItemCount

Replace YourListName with the exact name of your list (case-sensitive, and if the list name has a space, include the space — e.g., 'Employee List').

Headers:

KeyValue
Acceptapplication/json;odata=verbose
Content-Typeapplication/json;odata=verbose

Leave the Body empty.

Power Automate Flow to count items in a SharePoint List item

Step 3: Extract the Count with a Compose Action

  1. Add a Compose action
  2. In the Inputs field, switch to the Expression tab and enter:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['ItemCount']
Count list items in Power Automate Flow
  1. Click OK

This pulls the ItemCount value from the REST API response. The output is a number you can use anywhere in your flow.

Step 4: Use the Count

Same as Method 1 — pass the Compose output into an email, a Teams message, a condition, whatever you need.

Step 5: Save and Test

Run the flow and check the Compose action output. You’ll see the total item count for the list.

How to Count Rows in a SharePoint List Using Power Automate

Which Method Should You Use?

Here’s the honest breakdown:

Method 1: Get Items + length()Method 2: REST API (ItemCount)
Works for lists under 5,000 rows✅ Yes✅ Yes
Works for lists over 5,000 rows❌ No — returns wrong count✅ Yes — always accurate
Can count only filtered rows (e.g., Status = “Active”)✅ Yes (with OData filter)❌ No — total count only
SpeedSlower (loads all items)Fast (metadata call only)
Setup complexityLowLow-medium
Needs premium connectorNoNo (standard connector)

My recommendation:

  • Use Method 2 (REST API) if you just need a total count, especially for larger lists.
  • Use Method 1 (Get Items) if you need to count rows that match a specific condition.

Bonus: Count Only Filtered Rows (e.g., Status = “Active”)

Sometimes you don’t want a total count — you want to know how many rows match a condition. For example, how many tasks are still “In Progress”? How many employees joined this year?

For this, Method 1 is your only option, but you need to add an OData Filter Query.

In the Get Items action, expand Show advanced options and find the Filter Query field. Here are some common examples:

Count items where Status equals “Active”:

Status eq 'Active'

Count items where a date column is after Jan 1, 2026:

Created ge '2026-01-01T00:00:00Z'

Count items where a number column is greater than 100:

Quantity gt 100

Count items where two conditions must both be true:

Status eq 'Active' and Department eq 'Sales'

After adding the filter, the length() expression in your Compose action will count only the matching rows.

Tip: OData filter queries use the internal column name, not the display name. If your column is called “Start Date” in SharePoint, its internal name might be Start_x0020_Date. To find the internal name, go to your list → List Settings → click the column name — the internal name appears in the URL.

Practical Use Cases

Here are a few real scenarios where I’ve seen this pattern come in handy:

Daily summary report: Set up a scheduled flow that runs every morning, counts rows in your project tracker list, and emails the team: “You have 23 open tasks today.”

Approval gate: Use a Condition action after the count. If the list has more than 50 pending items, send a high-priority alert to the manager. If it’s under 10, send a routine digest.

Onboarding tracker: Count new employee records added in the last 7 days using an OData date filter, and post the weekly summary to a Teams channel automatically.

List health check: Run a flow weekly that counts rows in a large master data list using the REST API method. If the count drops unexpectedly (someone may have deleted items in bulk), trigger a notification.

Troubleshooting

The flow returns 0 rows

  • Double-check the List Name is spelled exactly as it appears in SharePoint (it’s case-sensitive in some contexts)
  • Make sure the account running the flow has at least Read access to the list
  • Check that the Site Address matches your SharePoint site URL — a trailing slash or incorrect subdomain can cause this

Get Items only returns 100 items

  • This is the default behavior. Go to the Get Items action → three dots → Settings → turn on Pagination and set Threshold to 5000

The REST API returns an error: “list does not exist”

  • Your list name in the URI may not match exactly. Check for spaces, special characters, or a different display name. Try navigating to /_api/web/lists in your browser (appended to your SharePoint site URL) to see the exact list names available.

ItemCount is higher than the number of items I can see

  • SharePoint’s ItemCount includes items in the list’s Recycle Bin in certain configurations, and it counts folders as items too. If you need to exclude folders, use Method 1 with a filter like FSObjType eq 0 (which returns only files/items, not folders).

The Compose expression throws an error

  • If the action name in your flow has spaces or special characters, the expression reference changes. For example, if your action is called “Get items 2”, the expression becomes outputs('Get_items_2')?['body/value']. Check the action name and update accordingly.

Summary

To count rows in a SharePoint list using Power Automate:

  • For most scenarios (especially large lists): Use the Send an HTTP request to SharePoint action with the /_api/web/lists/getbytitle('ListName')/ItemCount URI. It’s fast and accurate for any list size.
  • For filtered counts: Use Get Items with an OData Filter Query, then wrap the output in a length() expression inside a Compose action. Enable pagination and set the threshold to 5,000.
  • Always be aware of the 5,000-row default limit — it’s the most common source of wrong results in this scenario.

You may also like:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…