Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Create a folder structure in library using REST API


I need to create folder structure in doc library using flows.

List(foldermapping) contains items/folder structure like this in title colum


Based on this structture i need to create folders in doc library

I am achieving this CREATE NEW FOLDER in flow but through REST API nedd to create using send an http request.

Community Champion
Community Champion

@SBK52  below is example of rest api to create folder using Send HTTP request to SharePoint 




Uri: _api/Web/Folders/add('shared documents/flowfolder1/subfolder1')

here Shared Documents is url of library

flowfolder1 is parent folder - if parent folder does not exist then first create parent folder using the same rest api but URL as _api/Web/Folders/add('shared documents/flowfolder1')

subfolder1 is the new sub folder that will be created by this rest api



Anna Jhaveri

If I have answered your question, please mark the post as Solved to help other users to identify the correct answer
If you like my response, please give it a Thumbs Up.

Hi @annajhaveri , 

I am using the same API, but it's not working. getting time out error.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (4,199)