cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarcusZ
New Member

String variable as parameter for 'list files in folder' throwing a BadRequest error

Hi,

simple question: why is 'list files in folder' (OneDrive for Business) not accepting a variable in its parameter? Or what is it expecting actually?

As for the documentation it requires a string: https://docs.microsoft.com/en-gb/connectors/onedriveforbusiness/#list-files-in-folder

 

What I get though is a "BadRequest" error.

In case I add the path manually, everything works fine.

 

Screenshot 2021-06-13 at 23.20.16.png -> Screenshot 2021-06-13 at 23.21.00.png

 

Background: 

  • I want to move files from one OneDrive for Business folder to another.
  • I built a simple flow and made it work.
  • For different reasons I want to introduce a variable now, e.g. so that the notifications in a teams channel are more meaningful by mentioning the root path of the files mentioned above.

Having the variable at hand, I was hoping to also make use of it in the 'list files in folder' step, so that the flow is more flexible and scalable.

1 ACCEPTED SOLUTION

Accepted Solutions
v-bofeng-msft
Community Support
Community Support

Hi @MarcusZ :

The point is that:

List files in folder required the folder id not the path

You would need to first get the folder id in order to get the files

please try:

v-bofeng-msft_0-1623636038827.png

I think this link will help you a lot:

Best Regards,

Bof

View solution in original post

2 REPLIES 2
v-bofeng-msft
Community Support
Community Support

Hi @MarcusZ :

The point is that:

List files in folder required the folder id not the path

You would need to first get the folder id in order to get the files

please try:

v-bofeng-msft_0-1623636038827.png

I think this link will help you a lot:

Best Regards,

Bof

View solution in original post

Ah, sure thing. And obviously the docu is also stating that, mentioning the the ID as the key.

Misunderstood that. 

 

Thanks so much, it worked now as I was hoping for!

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Kudoed Authors
Users online (2,077)