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 / Power Automate flow to...
Power Automate
Unanswered

Power Automate flow to list all files in a folder -

(0) ShareShare
ReportReport
Posted on by 16
Hi, 
I am a complete newbie to this and wondered if someone would be able to offer a suggestion to this problem?
Apologies for the length of this - I thought the more info the better?
 
I've been trying to build a flow on and off for the past couple of weeks that lists all the files and subfolders in a Sharepoint communication site and then send this information to an excel file and google sheet - both of these files have tables set up to receive the information - see flow structure below and screenshot of excel file.
 
This is the sharepoint communication site:
 
 
 
 
I am using a small test folder in the 'Sharepoint Communication Site/Documents' to get the flow working properly.
..hence the random folder names eg,
Shared Documents/1/2/3/4/5/6/7/8/9/10/
 
I just wanted to make sure that the Flow looked inside subfolders etc, so I created a simple file structure with a couple of files in each subfolder.
 
The folder I am trying to list is located in a Sharepoint Communication Site > Documents with this file path:
 
 
 
 
Once the flow is working, I will then list all of the files and folders in the 'OneDrive Sync' area which contains many more files (teaching resources)
 
 
Flow structure at present:
 
The output in the Excel file - There are 7 column headers:
Folder Name,
Folder Path,
File Name
File Size
Created At
File Link
Folder Link
 
This is what is returning in the Excel sheet - happy days!
The 'File Link' and 'Folder Link' both work and open the file via hyperlinks which is what I was after - so great, however, I keep getting this error in the Flow
 
 
 
 
 
Here are screenshots of each of the stages of the flow - 
 
 
 
 
 
 
 
 
 
I've used AI (chatgpt) to try and debug it and it suggests my issue is:

I've tried these suggestions but issue still remains.
 
I'm not sure what I've done wrong, possible referenced the file path incorrectly in one of the action steps?
I think it is something so simple, but I just don't have the knowledge to spot it!
 
 
The file path of the folder I'm trying to list is:
 
Any suggestions would be greatly appreciated!
 
Kind regards, 
 
Matt

 
 
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,090 Super User 2026 Season 1 on at
    Why are you using an expression for the file identifier? Instead, populate the action with the file identifier from the get files (properties only) action:
     
  • CU25032323-0 Profile Picture
    16 on at
    Hi David, 
     
    I've tried what you suggested but it did not work:
    The reason I was using an expression was from chat gpt suggestion to debug!!
     
    ..something to do with verifying the path?
     

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
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard