Skip to main content

How to Create a SharePoint List with the REST API in Power Automate

· 6 min read
Jagdish Kumawat
Founder @ Dewiride

The SharePoint connector has no Create list action, but the REST API does it in one request. This guide creates a custom list from a flow with Send an HTTP request to SharePoint, and shows what a list created this way looks like, because it isn't quite the same as one created in SharePoint.

Prerequisites​

The example is Create the list in the setup flow from Part 11 of the Career Development Plan series. It runs in the True branch of If the list is missing, once per list.

Step 1: Set Up the Request​

Add a Send an HTTP request to SharePoint action called Create the list:

FieldValue
Site AddressThe site, here the trigger's Site URL
MethodPOST
Uri_api/web/lists
HeadersAccept: application/json;odata=nometadata
Content-Type: application/json;odata=verbose

Microsoft's REST examples create a list with a POST to lists. The verbose content type lets the body say what it is with __metadata.

Step 2: Write the Body​

Body
{
"__metadata": { "type": "SP.List" },
"BaseTemplate": 100,
"Title": "@{items('For_each_list')?['title']}"
}
PropertyMeaning
__metadataThe object is an SP.List
BaseTemplateThe list template: 100 is a custom list, the blank list you'd create in SharePoint
TitleThe list's name, here from the loop's current item

Type the body, and insert the title through the expression editor (How to Add an Expression). In the designer it shows as a title token:

The Create the list pane with Method POST, Uri _api/web/lists, the Accept and Content-Type headers, and the Body with __metadata type SP.List, BaseTemplate 100 and Title set to the title token

Step 3: Run It​

On an empty test site, the flow's runs created both lists, and the site's Site contents page lists them:

Site contents of the Career Development Plan Test site listing CompetencyResponses and RoleCompetencies as lists, with the two lists also in the site's navigation

The navigation links in that screenshot came from a later step: a list created with this request isn't on the site's navigation.

What a REST-Created List Looks Like​

I compared the new lists with the lists I had created by hand in Part 2 (How to Create a List and Add Columns). Straight after this request, three things differed:

SettingHand-built list from Part 2List created with this request
Title columnNot requiredRequired
Default viewIts own columns, with Title hiddenTitle only
Site navigationListedNot listed

Microsoft's REST article notes that properties you don't set in a POST get their default values. The setup flow sets what it needs right after creating each list:

Common Mistakes​

MistakeWhat happensDo this instead
No Content-Type: application/json;odata=verboseSharePoint can't read __metadataAdd the header
Creating without checking firstA second run tries to create it againCheck, and create only when it's missing
Assuming it's the same as a list made by handTitle is required and the list isn't in navigationSet those afterwards

Troubleshooting​

SymptomLikely causeFix
The step fails with 403The connection's account can't create listsGive it permission to manage lists, such as Edit, or use another connection
The list exists but has no columnsOnly this step ranRun the steps that add the columns

FAQ​

Can I set the description in the same request?​

Yes, SP.List has a Description property. The setup flow sets it in its settings step instead, so a re-run updates it too.

Does this need a premium license?​

No. It's the standard SharePoint connector.

Conclusion​

POST to _api/web/lists with Content-Type: application/json;odata=verbose and a body of __metadata SP.List, BaseTemplate 100 and the Title. Check first that the list is missing, and set the title column, the view and the navigation afterwards, because a REST-created list starts with different defaults.

Additional Resources​

Stay Updated

Subscribe to our newsletter for the latest tutorials, tech insights, and developer news.

By subscribing, you agree to our privacy policy. Unsubscribe at any time.