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)
Here is what the output looks like when I used the folder and expression for subfolder (error 400)...
The inputs for both are identical, but one works, one fails.
Anyone know why?
Solved! Go to Solution.
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.
Try wrapping the add hours function inside of string().
Thanks, I just tried. It produced the same result, 400 error. Any other ideas?
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.
This is on OneDrive. How do you get the full file path to folders?
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.
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.