Introduction
This article gives a brief idea about how to create folders and subfolders in the SharePoint document library using power automate.
Create folders/subfolders in the SharePoint document library using Power automate
Step 1
Go to https://flow.microsoft.com/
Click on Automated--from blank.
Step 2
Step 3
Click on next, find and select the “Initialize variables” action.
Initialize variables
Step 4
Expand the Initialize variable box and assign the variable as follows,
Step 5
Click on Next Step and find and select the “Apply to Each” action.
Step 6
Inside apply for each action box, click add action and find "Create new folder", choose variable SubFolderArray as an input of Apply each action.
Step 7
Configure Create new folder action as follows,
- Choose site Address
- Choose a Library name for where need to create a folder
- Folder path represents the folder structure /ID is a root folder and /current item refers to the value from the array(for subfolders)
Step 8
Click on Save Flow.
Step 9
To test the flow, insert a record in the list that you triggered.
Step 10
Expected output,
Conclusion
That's all -- we successfully automated the folder and subfolder creation process in SharePoint document library using power automate, Cheers.