This is a quick tip that will show you how to create a SharePoint list automatically in PowerAutomate using the REST service.
As everybody knows, the anatomy of a request REST consists of 4 parts:
- The endpoint
- The method
- The headers
- The body
List creation request using SP REST API
The endpoint :
as you can see below in the following URL, it's divided into 2 parts, the first part consist of the url of your SharePoint site, while the second part is the uri where all the site's lists are located
The method :
Since we want to create a list, the method will be POST
The headers :
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose"
}
The body :
{
'__metadata':{'type':'SP.List'},
'BaseTemplate':100,
'Title':'Test List'
}
0 Comments