Hi,
I've a flow where I need to create 10 folders upon creation of a file. I'm able to create a folder via the http request but do I need 10 steps for 10 folders or is there an easier way to do this?
Also the flow always runs about 3 or 4 times. Is there a nice way to stop this? My trigger is as follows:
Thanks.
Solved! Go to Solution.
Hi @JohnOReilly34,
If so, there is a way you can have a reference:
You could arrive your purpose though add a Compose Action to split the file name:
split(outputs('Compose'),'.')[0]
Then Add Create file action, in the Folder path append on the output of file name without extension. Then you can create a Delete action to delete the original file.
Please have a try, I hope it can help you.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
You can create an array in flow and specify all your folder names
example : ["folder1","folder2","folder3"] and so on
the do a for loop of the array and then create the folder using the same approach of yours
Although please note there is a new flow action to create folder in SharePoint
Next wih respect to your trigger, looks like you are creating a Flow when a file is created in some Location library
every time file is added it will trigger the Flow
Regards,
Reza Dorrani
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @JohnOReilly34,
Cause according to your Flow configuration, I assume your purpose is creating a subfolder once a file created in a folder and put the file into the subfolder, right?
Such as, When a file created -> create a subfolder named filename without extension -> put the file into the subfolder.
If not, never mind.
Best Regards,
Community Support Team _ Lin Tu
Yes, that's correct.
@v-litu-msft wrote:Hi @JohnOReilly34,
Cause according to your Flow configuration, I assume your purpose is creating a subfolder once a file created in a folder and put the file into the subfolder, right?
Such as, When a file created -> create a subfolder named filename without extension -> put the file into the subfolder.
If not, never mind.
Best Regards,
Community Support Team _ Lin Tu
Hi @JohnOReilly34,
If so, there is a way you can have a reference:
You could arrive your purpose though add a Compose Action to split the file name:
split(outputs('Compose'),'.')[0]
Then Add Create file action, in the Folder path append on the output of file name without extension. Then you can create a Delete action to delete the original file.
Please have a try, I hope it can help you.
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.