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.