A few days ago, I worked on a flow that required creating multiple SharePoint lists and libraries automatically from a single JSON file. Instead of creating each one manually, I used Power Automate to read the JSON and create the SharePoint lists.
In this Power Automate tutorial, I will show you how to create SharePoint lists from JSON using Power Automate. Additionally, I will tell you how to create multiple libraries from a JSON file using Power Automate.
Create Multiple SharePoint Lists From JSON
In this flow, we will use a manual trigger that prompts the user to upload a JSON file. The uploaded file contains all the required details to create SharePoint lists or libraries, such as:
- List Name
- List Description
- Base Template
Here’s an example of the JSON data we’ll use:
{
"List Information Details": [
{
"Title": "SharePoint Team",
"Description": "This List Contains SharePoint Team Details",
"BaseTemplate": "100"
},
{
"Title": "Python Team",
"Description": "This List Contains Python Team Details",
"BaseTemplate": "100"
},
{
"Title": "Database Team",
"Description": "This List Contains Database Team Details",
"BaseTemplate": "100"
},
{
"Title": "Common Library",
"Description": "This Library Contains",
"BaseTemplate": "101"
}
]
}Now follow the steps below:
- Create an instant cloud flow. Once the flow opens, click on ‘Manually trigger a flow’. Then click on + Add an input Parameter -> Choose File that triggers manually.

- Add a Compose action and then pass the below expression to read the file content value.
base64ToString(triggerBody()?['file']?['contentBytes'])
- Click on ‘+ New step‘ and search for the ‘Parse JSON‘ action. Select it. In the Content field, click inside the box and select Outputs from the Compose action (which you used to read the file content).
- In the Schema, pass the sample JSON object value and choose Done. It will automatically generate the JSON schema as below:

- Add an Apply to each action. Select an output from the previous steps field (From the dynamic content pane, select List Information Details, which comes from the Parse JSON action output.)

Note:
This will allow you to loop through each list or library definition (Title, Description, BaseTemplate) from your uploaded JSON file.
- Add an action ‘Send an HTTP request to SharePoint‘ from action triggers and provide the SharePoint site address.
- Method: POST
- Uri: _api/web/lists
- Headers:
- Accept: application/json;odata=verbose
- content-type: application/json;odata=verbose
- Body: Add the below JSON code to create a new list using Rest API and dynamically pass the JSON content values for Title, Description, and Base Template.
{
"__metadata": {
"type": "SP.List"
},
"AllowContentTypes": true,
"BaseTemplate": @{items('Apply_to_each')?['BaseTemplate']},
"ContentTypesEnabled": true,
"Description": "@{items('Apply_to_each')?['Description']}",
"Title": "@{items('Apply_to_each')?['Title']}"
}
- Click Save in the top-right corner of the flow editor. Click Test -> Choose Manually -> Then click Run flow. When prompted, upload your JSON file containing the list information and click Run. After the flow completes, go to your SharePoint site.

You will now see that the SharePoint lists have been created automatically, based on the details in your JSON file.
Create Multiple SharePoint Libraries From JSON
Just like we created multiple SharePoint lists using BaseTemplate 100, you can also create multiple document libraries by using BaseTemplate 101 in your JSON.
Here’s how your JSON can include libraries:
{
"List Information Details": [
{
"Title": "Common Library",
"Description": "Stores financial reports and statements",
"BaseTemplate": "101"
}
]
}
Conclusion
With just a few flow actions, you can easily create SharePoint lists and document libraries from a JSON file using Power Automate.
In this tutorial, I explained to you how to create a flow that reads JSON input, parses it, and dynamically creates SharePoint lists or libraries based on the provided configuration.
You may also like:
- Send Teams Messages using Power Automate
- Create an array from a string using Power Automate
- Create an array from JSON objects using Power Automate
- Schedule Meetings in Microsoft Teams using Power Automate
- Create an Array from SharePoint list Items using Power Automate

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.
Interesting content.