cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

OneDrive Error 404

Creating a flow, connecting to OneDrive, I am creating a "List Files in Folder'. If I choose an exact subfolder of my folder "Events', it works fine. However, the subfolders of my folder 'Events' are dynamic. So using "List Files in Folder", I pick the folder "Events", then add expression "addHours(utcNow(),-6,'yyyy-MM-dd')". When it runs, I get a 400 error. However, the inputs are right (aka, the formula tells PA to look at the right folder. 

 

Here is the output when I choose the subfolder manually (works fine)

2021-01-21 (1).png

 

Here is what the output looks like when I used the folder and expression for subfolder (error 400)... 

2021-01-21 (2).png

 

The inputs for both are identical, but one works, one fails.

 

Anyone know why?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

I actually went a different route. I used the first List Files by Folder. I added a condition to the list of folders, the folder that = my Date condition. I used the matching folder ID, which worked and returned the List of Folders I wanted. So this was my work around to determining the name of a dynamic folder, then using that name to get a list of files from that folder. 

 

Thanks for the ideas. 

View solution in original post

6 REPLIES 6
jdoss
Resolver III
Resolver III

Try wrapping the add hours function inside of string().

Anonymous
Not applicable

Thanks, I just tried. It produced the same result, 400 error. Any other ideas?

jdoss
Resolver III
Resolver III

I think you'll need to include the full file path when you are putting it in dynamically. It will probably look something like this. Try typing it into your address bar to make sure it opens the correct folder beforehand.

https://COMPANY-my.sharepoint.com/personal/YOURID/Documents/DYNAMIC-CONTENT-HERE  

 

Try typing it into your address bar to make sure it opens the correct folder beforehand.

Anonymous
Not applicable

This is on OneDrive. How do you get the full file path to folders? 

jdoss
Resolver III
Resolver III

Log in to your onedrive and navigate to the folder. You should see something like what I posted at the beginning. Just substitute your information in the URL with what I put in the previous post and type it into your browser. It should pull up the correct folder. Then use that for your flow. 

If you'd like to take a screenshot of the URL when you are in the folder and mark out any company/personal information.

Anonymous
Not applicable

I actually went a different route. I used the first List Files by Folder. I added a condition to the list of folders, the folder that = my Date condition. I used the matching folder ID, which worked and returned the List of Folders I wanted. So this was my work around to determining the name of a dynamic folder, then using that name to get a list of files from that folder. 

 

Thanks for the ideas. 

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,176)