Creating Folder And Sub Folder In SharePoint Library Using Power AutomatešŸŽ

Introduction

This article gives a brief idea about how to create folders and subfolders in the SharePoint document library using power automate.

Step 1

Go to https://flow.microsoft.com/

Click on Automated--from blank.

Creating folder and sub folder in Sharepoint library using power automate

Step 2

Creating folder and sub folder in Sharepoint library using power automate

Step 3

Click on next, find and select the “Initialize variables” action.

Initialize variables

Creating folder and sub folder in Sharepoint library using power automate

Step 4

Expand the Initialize variable box and assign the variable as follows,

Creating folder and sub folder in Sharepoint library using power automate

Step 5

Click on Next Step and find and select the “Apply to Each” action.

Creating folder and sub folder in Sharepoint library using power automate

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.

Creating folder and sub folder in Sharepoint library using power automate

Step 7

Configure Create new folder action as follows,

  1. Choose site Address
  2. Choose a Library name for where need to create a folder
  3. Folder path represents the folder structure /ID is a root folder and /current item refers to the value from the array(for subfolders)

Creating folder and sub folder in Sharepoint library using power automate

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,

Creating folder and sub folder in Sharepoint library using power automate

Conclusion

That's all -- we successfully automated the folder and subfolder creation process in SharePoint document library using power automate, Cheers.