cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
theisogunro
Frequent Visitor

Creating a folder in a library based on User name entered in another list

I have a list and a library.  The list has a People and Groups field for a new user.  When a new user in entered in the list, I want a folder using the new user's name created in the document library.

I'm stuck on the URI part.  Any help would be much appreciated.

 

MicrosoftFlow.JPGFLow HTTP Request

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Creating a folder in a library based on User name entered in another list

Hi @isogunro ,

 

Try the below step to create an empty folder.

 

1. Use flow step Send an HTTP request to SharePoint

2. Set the site address: eg: https://yoursite.sharepoint.com/

3. Set method: 'Post'

4. Set Uri : _api/web/Folders/add('yourdocumentlibraryname/foldernametocreate')

 

s1.pngsp

 

I did tried and it did created a blank folder in SharePoint.

 

If you find this useful then please accept this as solution.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

8 REPLIES 8
Dual Super User
Dual Super User

Re: Creating a folder in a library based on User name entered in another list

Hi @theisogunro 

 

As we do not have an action to create a folder in sharepoint with flow right now, though HTTP request is a way to create one but there is a work around too. 

 

https://medium.com/@thomasgranheim/work-around-create-folder-in-sharepoint-library-using-microsoft-f...

 

Refer to this blog and you should be able to create folders with much ease. 

 

Hope this Helps!

 

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Super User
Super User

Re: Creating a folder in a library based on User name entered in another list

Well that's strange, we used to have an action to create a folder (see image below) but it doesn't seem to be there now.

Rob
Los Gallardos
createFolder.png

v-zhos-msft Solution Sage
Solution Sage

Re: Creating a folder in a library based on User name entered in another list

Hi @theisogunro ,

I have made a flow for your scenario, please check it for a reference.

In the 'File name' and 'File content' you can just enter any value you want.

Capture1.PNGCapture3.PNGCapture2.PNG

Best Regards,

Community Support Team _ Zhongys

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

isogunro
New Member

Re: Creating a folder in a library based on User name entered in another list

@v-zhos-msft,

 

It sort of works.  I just want an empty folder to be created with no files.

Super User
Super User

Re: Creating a folder in a library based on User name entered in another list

Hi @isogunro ,

 

Try the below step to create an empty folder.

 

1. Use flow step Send an HTTP request to SharePoint

2. Set the site address: eg: https://yoursite.sharepoint.com/

3. Set method: 'Post'

4. Set Uri : _api/web/Folders/add('yourdocumentlibraryname/foldernametocreate')

 

s1.pngsp

 

I did tried and it did created a blank folder in SharePoint.

 

If you find this useful then please accept this as solution.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog

View solution in original post

theisogunro
Frequent Visitor

Re: Creating a folder in a library based on User name entered in another list

@abm ,

 

That did not work for me.  Does this look correct?

flow.PNG

Super User
Super User

Re: Creating a folder in a library based on User name entered in another list

Hi @theisogunro,

 

What's the error you getting?

 

From your screenshot above your document library name is called lib1.

 

I can see you have mentioned Uri as _api/web/Folers/add('Documents/Username')

 

Think there is a typo there change the Folers to Folders.

 

Make sure you need to user document library name correctly.

 

Any help please let me know.

 

Thanks

 

 

 



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
theisogunro
Frequent Visitor

Re: Creating a folder in a library based on User name entered in another list

Thank you!  I see what I did wrong.  That worked.

Helpful resources

Announcements
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,157)