Based on the search results and current best practices, here's a comprehensive solution for creating a new SharePoint list with custom columns using Power Automate and HTTP requests:
Complete Solution for Creating SharePoint Lists with HTTP Requests
Step 1: Create the List Structure
Use the "Send an HTTP request to SharePoint" action with these settings:
Action Configuration:
- Site Address: Your SharePoint site URL
- Method:
POST
- Uri:
_api/web/lists
Headers:
json
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}
Body for Creating the List:
json
{
"__metadata": {
"type": "SP.List"
},
"Title": "Your New List Title",
"Description": "Description of your new list",
"BaseTemplate": 100,
"AllowContentTypes": true,
"ContentTypesEnabled": true
}
Step 2: Add Custom Columns
After creating the list, you'll need separate HTTP requests for each column. You need to send POST requests to add fields to your newly created list Power AutomateTom Riha.
For Text Columns:
- Method:
POST
- Uri:
_api/web/lists/getbytitle('Your New List Title')/fields
json
{
"__metadata": {
"type": "SP.Field"
},
"Title": "Column Display Name",
"FieldTypeKind": 2,
"Required": false,
"MaxLength": 255
}
For Choice Columns:
json
{
"__metadata": {
"type": "SP.FieldChoice"
},
"Title": "Status",
"FieldTypeKind": 6,
"Required": false,
"Choices": {
"__metadata": {
"type": "Collection(Edm.String)"
},
"results": ["Active", "Inactive", "Pending"]
},
"DefaultValue": "Active"
}
For Date/Time Columns:
json
{
"__metadata": {
"type": "SP.Field"
},
"Title": "Due Date",
"FieldTypeKind": 4,
"Required": false
}
For Number Columns:
json
{
"__metadata": {
"type": "SP.Field"
},
"Title": "Priority",
"FieldTypeKind": 9,
"Required": false
}
For Person/Group Columns:
json
{
"__metadata": {
"type": "SP.FieldUser"
},
"Title": "Assigned To",
"FieldTypeKind": 20,
"Required": false,
"SelectionMode": 0
}
Step 3: Complete Power Automate Flow Structure
Here's the recommended flow structure
- Trigger (Manual or scheduled)
- Send HTTP Request - Create List (using the list creation JSON above)
- Parse JSON (to extract the list ID if needed)
- Send HTTP Request - Add Column 1
- Send HTTP Request - Add Column 2
- Send HTTP Request - Add Column 3 (repeat for each column)
- Step 4: Parse JSON Schema for List Creation Response
After creating the list, use this schema to parse the response:
json
{
"type": "object",
"properties": {
"d": {
"type": "object",
"properties": {
"__metadata": {
"type": "object"
},
"Id": {
"type": "string"
},
"Title": {
"type": "string"
},
"Created": {
"type": "string"
}
}
}
}
}
Step 5: Field Type Reference
For different column types, use these FieldTypeKind values
- Text: 2
- Note (Multi-line): 3
- DateTime: 4
- Choice: 6
- Number: 9
- Boolean: 8
- User: 20
- Lookup: 7
Step 6: Error Handling Best Practice
- Add Configure run after to handle failures
- Use Compose actions to test your JSON before sending
- Add Condition checks to verify successful creation before adding columns
Common Issues and Solutions:
- List already exists: Check if the list exists first using a GET request
- Column creation fails: Ensure the list is fully created before adding columns
- Permission issues: The Send HTTP Request to SharePoint action uses the permissions of the flow creator Power Automate With SharePoint - 'Update Item' Action - Working With M
Alternative Approach - Using Microsoft Graph API
If you prefer using Microsoft Graph API instead of SharePoint REST API:
- Method:
POST
- Uri:
https://graph.microsoft.com/v1.0/sites/{site-id}/lists
- Use "Send an HTTP request to Microsoft Graph" action
This approach provides a more modern API experience and better error handling.
If I have answered your question, please mark it as the preferred solution ✅ . If you like my response, please give it a Thumbs Up 👍.
Regards,
Riyaz