Generate Document Libraries

up:: PowerAutomate

Let's say that you need to create folders for each customer and store documents inside based on the Excel file content. Later on, there will be some additional needs like the Library name or guid, so you need to store this information somewhere. In this case, use SharePoint list.

Create a SharePoint list - Companies

Create a SharePoint list with the following columns:

Starting list - Companies

Above you can see the list with the default Title column and two additional columns. The GUID and folder name will be used in Power Automate flows, e.g. to create a file for specific customer.

Create Power Automate flow - Generate Document Libraries

Create a new flow and select SharePoint as a trigger - "When an item is created". Select the list you created in the previous step. The flow will be triggered when a new item is added to the list. Additionally, you can add a condition to check if the item is not empty:

@not(equals(true, empty(item()?['Title']))

Pasted image 20230120160025.png