Official Site
Microsoft Most Valuable Professional M365 Apps & Services
Microsoft Most Valuable Professional Business Applications
Consultant & Sr Cloud Solution Architect Modern Wokrplace
Find hereMore than 150 Articles about Microsoft Technologies on Modern Workplace
21 April 2024
In today's article, we will see how to create a folder on SharePoint Library using HTTP POST and Power Automate.
First, you need to have an active M365 subscription and navigate to the Power Automate homepage. Then, select "Create" from the left menu and choose "Instant cloud flow."
Select the first action "Manually trigger a flow" and give your flow a name.
In the initial trigger action, we select the condition to activate our flow.
In the second action we need, which is of type "send HTTP request," we set the site address to the address of the site hosting our library. The method we will use is POST, and in the Uri, we set _api/web/folders. Here, I should note that we need to add headers to our request, which are Content-Type application/json;odata=verbose and Accept application/json;odata=verbose. In the body of the request, we need to set the following code:
{
"__metadata": { "type": "SP.Folder" },
"ServerRelativeUrl": "/Bank%20Templates/DemoFolder"
}
The next step is to save our automate.
In the next step, we need to select manually test flow.
We allow all necessary connections.
And in the next step, we select run flow to execute it.
The flow starts executing.
And as you can see, it has completed successfully.
And finally, it has created the folder in the library we specified.
Visit Archives below to find more articles about Microsoft technologies on Modern Workplace