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 / Flow to count items in...
Power Automate
Answered

Flow to count items in SharePoint library not counting correctly

(0) ShareShare
ReportReport
Posted on by 105

I  am new to PowerAutomate so i'm really learning on the fly. I am building a flow that counts the total # of files in a SharePoint Library folder, but its counting 1 too many. I think its counting the main folder also

 

The folder that I want to count the files currently has 3 files in it, but my flow is returning a count of 4

 

Flow as follows (the flow is on my work computer so I cant  post screen shots:

 

1)Get Files Properties only

  • site address is correct
  • Library name: Manager attestations 
  • Limit to entries : March Manager Attestations ( currently has 3 files in it)
  • Include nested items: yes (if i click "no" it only returns a count of 1 file)

2) Compose

  • Input: length(outputs( 'getfiles properties only)')?['body/value'])

3)send email to myself (testing purposes)

  • Subject: Outputs
  • Body: Outputs

 

Any help  would be greatly appreciated

 

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    69,383 Most Valuable Professional on at

    Between step 1 and 2 add a Filter Array action and Filter based on isFolder property being false.  That will filter out all the folders and you can do your Compose based on the output of the Filter Array.

  • Earl20 Profile Picture
    105 on at

    Should  "Include nested items be  set to yes or no? 

     

    I will try the is folder solution and report back

  • Earl20 Profile Picture
    105 on at

    @Pstork1 thanks. that did the trick. I will accept this as the solution, 

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard