cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Advocate II
Advocate II

List files in folder - Onedrive (Customize Path Not working) - Getting Bad Request

Hi...

i have created a flow integrated with PowerApp.. i am getting Folder Name from PowerApp (String Vaule)..

i used this folder name in Onedrive List files connector instead of selecting Last folder i used the string value (which i got from power apps), i am getting following error

 

BadRequest

{ "status": 400, "message": "API not found", "source": "127.0.0.1" }

 

the Same Folder Name(string value) used in FTP Server FTP works fine..

 

Item<Listfilesinfolder_Folder> contain string value PaulStreet

 

Capture.PNG

 

if i used the folder by selecting from Root Folder .. flow works fine..Capture2.PNG

 Please help me to resolve this...

Thnaks...

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

This is because the value that is required by the "List files in folder" action is actually an ID, not a path.  OneDrive has a unique ID for each file/folder, which is preserve when you rename/move the file/folder -- and which is what the connector uses to communicate through the OneDrive API.

For FTP, since there is no such thing, the connector uses the path as the ID.  That is why it is working for you.

 

The right thing to do, would be to browse the folder, so that you will get the File/Folder ID.  And then, use the ID to make the call to list the files in the folder.  That is automatically done by the Flow UI.

 

If you want to do this through PowerApps, you will have to first make a call to "Get file metadata using path", and then from the response you can use the "ID".

 

image.png

 

HTH

View solution in original post

3 REPLIES 3
Highlighted
Community Support
Community Support

Hi @Talha,

 

Thanks for reporting this.

It seems that currently the Folder input under OneDrive for Business "List files in folder" can't accept the dynamic content. I tested it and got the error message below:

"status": 404, "message": "The resource could not be found.", "source": "127.0.0.1"

Which indicates that it can't find the proper folder path based on the value input.

The error message you encounted should be related with the Parameter you specified, if you choose the "Ask in PowerApps" multiple times, it will generated the API error.

I have forwarded from my side, if I have any feedback, I will post here.

Regards

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted

This is because the value that is required by the "List files in folder" action is actually an ID, not a path.  OneDrive has a unique ID for each file/folder, which is preserve when you rename/move the file/folder -- and which is what the connector uses to communicate through the OneDrive API.

For FTP, since there is no such thing, the connector uses the path as the ID.  That is why it is working for you.

 

The right thing to do, would be to browse the folder, so that you will get the File/Folder ID.  And then, use the ID to make the call to list the files in the folder.  That is automatically done by the Flow UI.

 

If you want to do this through PowerApps, you will have to first make a call to "Get file metadata using path", and then from the response you can use the "ID".

 

image.png

 

HTH

View solution in original post

Highlighted

Thanks Sameer...

By using ID, List files in folder - Onedrive connected woking...

 

Thanks again..

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Kudoed Authors
Users online (3,942)