Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Flow listing the folders on SharePoint and counting files in them



I would like to create a flow that would send an email with a list the subfolders of a certain folder on the SharePoint and count the number of files in those subfolders. The email would have the HTML table like this:


Path                             # files

Subfolder 1                    10

Subfolder 2                     2

Subfolder 3                     8

....                                    .....


I am struggling to find a way to count the files in the subfolders - if i use Get Files, I am getting a number of files in the Folder, not in Subfolders. The difficulty is that the number of Subfolders is growing, so it needs to be a variable that goes to each subfolder created and counts the files.


Could you help out how to approach this?


Thanks so much!


Helpful resources

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Users online (2,638)