cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
theisogunro
Level: Powered On

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!



8 REPLIES 8
Super User
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
Level 10

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
Level: Powered On

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!



theisogunro
Level: Powered On

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!



theisogunro
Level: Powered On

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

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 287 members 3,916 guests
Please welcome our newest community members: