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 list all files ...
Power Automate
Unanswered

How to list all files from Sharepoint folder tree?

(0) ShareShare
ReportReport
Posted on by 6

Hey all,

 

Unfamiliar with Power Automate up until now, I'm trying to create a relatively basic workflow, but I'm running into a few issues.

 

What I want: 

I want to create a scheduled flow that, once every day, creates a list of all the recently created files with 'invoice' in the filename on Sharepoint, then mail that list to one of the mailboxes of the finance department.

 

What do I have so far:

Based on an example I googled, I've come up with the following so far:

I have a flow that begins with List Folder with the finance dept folder on our Sharepoint selected. This feeds into a Filter Array which does From: Body, isFolder equals False. In short, this removes all the folders and leaves only the files.

This then feeds into a Create HTML Table which lists the Path and Name of each file. This is then sent in an email.

 

The result of this is an email with a neat HTML table containing ONLY the files in the root of the folder I selected. Subfolders aren't crawled through. 

So my question is: Is there any way to list ALL the files in a Sharepoint folder tree and filter said list based on file name and/or filetype?

 

Screenshot 2022-09-21 at 11.20.38.png

 

 

 

Categories:
I have the same question (0)
  • JonDoesFlow Profile Picture
    1,304 on at

    Isn't it just a matter of setting the correct place to start to filter ? i.e. at the root document level of the SharePoint site ?

  • JonDoesFlow Profile Picture
    1,304 on at
  • mm_Jeff Profile Picture
    6 on at

    Thanks for the suggestions so far @Jondoesflow.

    Sadly, changing the List Folder part of the flow doesn't change anything. That command only takes the content of the toplevel folder you select, no options to go through subfolders.

     

    I think I'm getting a little closer by using Get Files (properties only) with Include Nested Items active. If I add a Filter Query of File_x0020_Type eq 'pdf' to that I get just PDF files.

    The problem I'm running into now is that I don't get all the PDF files. I get a subset even though I never specified a maximum nr of results to gather.
    Also, if I try to limit the entries to a specific folder I don't get any results anymore, even though I know there are PDF files in both the root of that specific folder as well as in a subfolder.

     

    This is the flow that results in *some* PDFs shown in the HTML table:

    Screenshot 2022-09-21 at 15.47.57 copy.png


    Anyone got any idea where I'm going wrong with this?

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!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 589

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 284 Super User 2026 Season 1

Last 30 days Overall leaderboard