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
Resolver II
Resolver II

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?

Resolver II
Resolver II

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? 

Resolver II
Resolver II

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. 

View solution in original post

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (29,340)