cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JohnOReilly34
Helper I
Helper I

Create multiple sharepoint folders by sending http request to sharepoint

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?

 

Post.jpgPost.jpg

 

Also the flow always runs about 3 or 4 times. Is there a nice way to stop this? My trigger is as follows:

Post01.jpg

 

Thanks. 

1 ACCEPTED SOLUTION

Accepted Solutions

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.Annotation 2019-08-13 152830.png

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.

 

View solution in original post

4 REPLIES 4
RezaDorrani
Dual Super User
Dual Super User

Hi @JohnOReilly34 

 

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

v-litu-msft
Community Support
Community Support

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.Annotation 2019-08-13 152830.png

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.

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,428)