Last week, while working on a digital product called “Create SharePoint list and columns dynamically from an Excel file using Power Automate“, I needed to automatically create a Location column in a SharePoint list.
Normally, we can manually create a Location column from the SharePoint list settings. However, in automated provisioning solutions, especially when generating SharePoint lists and columns dynamically from Excel or JSON configurations, we may need to create the Location column programmatically using the REST API.
After some research and testing, I found that the modern SharePoint Location column can be created using the CreateFieldAsXml REST API endpoint.
In this tutorial, I will explain step by step how to create a Location column in SharePoint list using Power Automate REST API.
Create a Location Column in SharePoint List Using Power Automate REST API
Now, let’s see how to create a Location column in a SharePoint list using the Send an HTTP request to SharePoint action.
For this example, I have a SharePoint list named: Employee Information
Now, I want to create a Location column named: Office Location

To create the Location column, follow the steps below:
- Go to Power Automate. Select Create and then choose Instant cloud flow.
- Enter a flow name, such as: Create Location Column in SharePoint List.
- Select the Manually trigger a flow trigger
- Click Create.

Next, add the SharePoint action:
- Add a Send an HTTP request to SharePoint action, provide the information below:
- Site Address: Select your SharePoint site address.
- Method: POST
- Uri:
_api/web/lists/GetByTitle('Employee Information')/fields/createfieldasxml
- Headers:
{
"Accept": "application/json;odata=verbose",
"Content-Type": "application/json;odata=verbose;charset=utf-8"
}
- Body:
{
"parameters": {
"__metadata": {
"type": "SP.XmlSchemaFieldCreationInformation"
},
"SchemaXml": "<Field DisplayName='Office Location' Format='Dropdown' IsModern='TRUE' Name='OfficeLocation' StaticName='OfficeLocation' Title='OfficeLocation' Type='Location'></Field>",
"Options": 12
}
}

Here, we are using the CreateFieldAsXml REST API endpoint to create the Location column.
- In the SchemaXml, the important property is: Type=’Location’. This creates the modern SharePoint Location column.
- The column display name is Office Location, and the internal name is OfficeLocation
- The property: Format=’Dropdown’ is used to show the location field with the modern location picker experience.
- The property: IsModern=’TRUE’ is used to create the modern Location column behavior in SharePoint Online.
After configuring the action, save the flow and click Test.
Then run the flow manually.
Once the flow runs successfully, go to the SP List Column Testing SharePoint list and open List Settings.
Under the Columns section, you can see the newly created Location column named:
Office Location

Now users can add location-based information directly from the SharePoint list item form.
Conclusion
This is how we can create a Location column in a SharePoint Online list using Power Automate REST API.
In this tutorial, we used the Send an HTTP request to SharePoint action along with the CreateFieldAsXml REST API endpoint to dynamically create the Location column.
This approach is useful when you are creating SharePoint lists and columns dynamically from Excel, JSON, or any automated provisioning process.
You may also like:
- Power Automate saves email attachment to SharePoint
- Delete all files in a SharePoint folder using Power Automate
- Send an Approval to a Microsoft 365 Group in Power Automate
- Send Approval to SharePoint Group Members Using Power Automate
- Copy List Items To Another List In SharePoint Using Power Automate

Hey! I’m Bijay Kumar, founder of SPGuides.com and a Microsoft Business Applications MVP (Power Automate, Power Apps). I launched this site in 2020 because I truly enjoy working with SharePoint, Power Platform, and SharePoint Framework (SPFx), and wanted to share that passion through step-by-step tutorials, guides, and training videos. My mission is to help you learn these technologies so you can utilize SharePoint, enhance productivity, and potentially build business solutions along the way.