I'm trying to do the workaround for creating folders within a library, but my Flow is failing when trying to create a .txt file. I have access rights to the Sharepoint site and subsite, but it keeps giving me a 403.
Headers are here:
That's correct. According to various people, it should be fine as it creates the folder then the file (in that order). I've seen multiple people achive the correct result. Any ideas?
Please find the full set of steps here:
Try adding a trailing '/' to the folder path in action 'Create file'. I use a '/' to start the folder path as well.
Please check if the url of the document library is correct. I need to add 2 spaces in the URL for shared documents.
Works on my
Using the fcreate file to ceate a folder isn't really right. Yes you could delete the fiel afterwards, but using the REST API would be better as it just does what it needs to do: Create the folder.
I totally agree that the REST API solution is the elegant one if the only thing you want to do is to create a folder. For some power users that would probably be a bit too advanced.
An empty folder on the other hand, to me does not really make sense. This makes me think of a few years back where file shares got really poluted by useless empty folder structures.
I tend to create solutions where document templates replace the dummy file and then there is no need to delete the file afterwards.
There are a few scenarios where it really makes sense to have predefined folder structures, but that is really off topic here 😉
A little to advanced for me indeed, I'll be trying your '/' Idea shortly as I need to recreate the flow 🙂
Thing of it from a user point of view, having a subsite created with a standard set of folders already in place is one less thing for them to do. You know what users are like when they have to do ANYTHING they don't need to do...
Unfortunately, Still getting 403 - despite it creating the folders (which I'm happy with) but error checking becomes impossible if it's always going to be erroring. I'll see if I can find another solution, or figure out the alternative API listed above 🙂
Hi Mike, did you check the '/' at the beginning and the end of the target path?
Did you also use a double space in 'Shared Documents'? Otherwise try to create a folder in a 'test' library to rule that out first.
I tested it on my environment to make sure nothing was changed, and it tested out fine without any 403's.
I did use before and after - I'm going to be doing some tests today to figure it out - I'll let you know when and how I find out what it is 🙂
I hope you already managed to get it working.
If not, this is my configuration for testing it. Sorry it's in dutch. Please notice the double space in 'Shared Documents' (red)
Erik de Rooij
Check out the News & Announcements to learn more.
Participate in the Power Virtual Agents Community Challenge
Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.
DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.