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 Get Count of It...
Power Automate
Answered

How to Get Count of Items in SharePoint List

(0) ShareShare
ReportReport
Posted on by 11
Hi,
 
I'm a Power Automate newbie, and i'm trying to learn Power Automate by doing.
Im tying to count the number of rows in a Sharepoint List by using the HTTP Rest Sharepoint API. I'm following this tutorial : https://www.powertechtips.com/count-sharepoint-list-items-power-automate/.
 
Here's the result i get:
 
 
 
Does anyone know why i get this kind of outputs and not a proper Json format result ? Here's my Flow :



 
In the Uri i actually wrote : /_api/web/lists/getbytitle('Mylist')/itemCount
 
In the weird output i found the result but in a weird shape: 
 
 
 
 
Thanks in advance.
Categories:
I have the same question (0)
  • YM-06112112-0 Profile Picture
    11 on at
    any help is welcome because I can't figure out what's going on.
  • Suggested answer
    Ellis Karim Profile Picture
    12,059 Super User 2026 Season 1 on at
    Try:
     
     
    The header:
    
    Accept: application/json;odata=nometadata
    
    Here is the runtime output of my flow. The List has 16,716 items:
     
     
     
    Ellis
     
  • Verified answer
    YM-06112112-0 Profile Picture
    11 on at
    @ekarim,
     
    Thanks for your answer. But sadly it didn't work. Must be a bigger issue within my organization.
     
    Thnaks.
  • Suggested answer
    Ellis Karim Profile Picture
    12,059 Super User 2026 Season 1 on at
    I think the problem is with the Site Address in the Send an HTTP request to SharePoint.
     
     
    You must specify the SharePoint Site Address only - you have included a URL pointing to a webpage:
     
     
    Your Site Address seems to be pointing to a List stored in your OneDrive. The HTTP may likely still work, but I haven't had a chance to test it.
     
     
     
     
    Ellis
  • Suggested answer
    David_MA Profile Picture
    14,605 Super User 2026 Season 1 on at
    I didn't bother reading what is in the link you provided since you're saying it doesn't work. If you just want to get the total count of items in a SharePoint list, your flow will look like this:
    • Configure the HTTP request as follows being sure to change 'Display Name of List' to the display name of your list. I see other things in the site address in prior replies. You only want what comes after sites/ up to and excluding the next / (essentially, the internal name of your site). Be sure to configure the Uri as shown below but with your list name. The Uri does not begin with a / as you show you your request.
    • Put the body of the HTTP request into the Compose action.
    • Run the flow and then copy what is returned in the body of the compose action for the Parse JSON action. Note: DO NOT add the other actions until your run your flow from this point!
    • For the Parse JSON action, click Generate from sample and then paste in what you copied from the Compose action in a successful run:
    • Initialize an integer variable and insert the ItemCount from the Parse JSON action:
    You can then use the variable wherever you need the value.

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 801

#2
Valantis Profile Picture

Valantis 602

#3
Haque Profile Picture

Haque 581

Last 30 days Overall leaderboard