How to Create a Site Column in SharePoint Online Using Power Automate? [Text, Date, Choice]

When working in Power Automate, one of my team members recently asked, ‘Can we create a Site column directly using Power Automate?’ After some research, I found that it is possible by using the ‘Send an HTTP request to SharePoint’ action. This method can save time since Site columns can be used across multiple lists and libraries.

In this tutorial, I will tell you how to create a site column in SharePoint Online using Power Automate. I will cover different methods to create Site columns, including Single line of text, Multiple lines of text, Choice, Date, Person, Number, and Lookup columns. Additionally, I will explain how to delete a Site column using Power Automate.

Create a Site Column in SharePoint Online Using Power Automate

I will show you two approaches to creating a SharePoint Site column using Power Automate. Before following the steps, ensure you have Site Collection Admin permission.

Using SchemaXml in JSON

This approach is perfect when you need more control and customization over your column settings.

Using Simple JSON Code

This approach is quick, easy, and great for standard column creation.

Create a Single line of text Site Column in SharePoint Using Power Automate

I will explain how to create a single line of text for the Site column using SchemaXml and a simple JSON condition in Power Automate.

Create a Single line of text Site column using SchemaXml

1. In the Power Automate, click the Instant Cloud flow, enter the Flow name, and choose the trigger flow (i.e., manually trigger a flow).

power automate create column in sharepoint list

2. Add compose action and provide the below schema:

The Schema below will create a column named ‘Customer Name,’ but the internal column name will be ‘CustomerName.’ It will also create a group called ‘MyCustomFields.’

<Field Type="Text" DisplayName="Customer Name" Description="A Sample description field." Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="MyCustomFields" StaticName="CustomerName" Name="CustomerName"></Field>
Power Automate site columns in sharepoint

3. Then add a Send an HTTP request to SharePoint action from sharePoint Connector with the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields/createfieldasxml
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "parameters": {
    "__metadata": { "type": "SP.XmlSchemaFieldCreationInformation" },
    "SchemaXml": '@{outputs('Compose')}'
  }
}
Power Automate Create Single line if text site column in sharepoint

Save the flow and run it. Once it runs successfully, Verify the column by going to Site Settings > Site Columns under the MyCustomFields group.

Create Single line if text site column in sharepoint using Power Automate

Create a Single line of text Site column using Simple JSON

In the same way, please create a new instant cloud flow that will manually trigger, as we created for the first method. Then add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields
  • Header: Use the below headers to make REST API calls to SharePoint:
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "__metadata": {
    "type": "SP.FieldText"
  },
    "Title": "Customer ID",
    "FieldTypeKind": 2,
    "Required": false,
    "StaticName": "CustomerID",
    "Group": "MyCustomFields",
    "Hidden": false
}
Power Automate Create a Single line of text Site column using Simple JSON

Now, click ‘Save’ and run the flow manually. After it runs successfully, go to the SharePoint site, then click ‘Site Columns’ under the ‘MyCustomFields’ group. You will see the ‘Single line of text’ column.

Create a Single line of text Site column using Simple JSON

Create Multiple lines of text Site Column in SharePoint using Power Automate

I will show you how to create Multiple lines of text for the Site column using SchemaXml and a simple JSON condition in Power Automate.

Create a Multiple lines of text Site column using SchemaXml

Create a new instant cloud flow that will manually trigger, then add a compose action and provide the below schema:

<Field Type="Note" DisplayName="Additional Comments" Description="A Sample description field." Required="FALSE" EnforceUniqueValues="FALSE" Indexed="FALSE" MaxLength="255" Group="MyCustomFields" StaticName="AdditionalComments" Name="AdditionalComments"></Field>
power automate add multiple columns to sharepoint list

Now add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields/createfieldasxml
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "parameters": {
    "__metadata": { "type": "SP.XmlSchemaFieldCreationInformation" },
    "SchemaXml": '@{outputs('Compose')}'
  }
}
Power Automate Create Single line if text site column in sharepoint

Now, click ‘Save’ and run the flow manually. After it runs successfully, go to the SharePoint site, then click ‘Site Columns’ under the ‘MyCustomFields’ group. You will see the ‘Multiple lines of text’ column.

Create a Multiple lines of text Site column using SchemaXml in Power Automate

Create Multiple lines of text Site column using Simple JSON

Create a new instant cloud flow that will manually trigger, then add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "__metadata": {
    "type": "SP.FieldText"
  },
    "Title": "Detailed Feedback",
    "FieldTypeKind": 3,
    "Required": false,
    "StaticName": "DetailedFeedback",
    "Group": "MyCustomFields",
    "Hidden": false
}
Power Automate Create Multiple lines of text Site column using Simple JSON

Save the flow and run it. Once it runs successfully, Check the column by going to Site Settings > Site Columns under the MyCustomFields group.

Site column sharepoint online power automate

Create a Choice Site Column in SharePoint using Power Automate

I will show you how to create a Choice for the Site column using SchemaXml and a simple JSON condition in Power Automate.

Create a Choice Site column using SchemaXml

Create a new instant cloud flow that will manually trigger, then add a compose action and provide the below schema:

<Field Type='Choice' DisplayName='Task Priority' Description='Select the priority level of the task' Required='FALSE' Group='Custom Site Columns' StaticName='TaskPriority' Name='TaskPriority' Format='Dropdown'><CHOICES><CHOICE>High</CHOICE><CHOICE>Medium</CHOICE><CHOICE>Low</CHOICE></CHOICES></Field>
Power Automate Create a Choice Site column using SchemaXml

Now add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields/createfieldasxml
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
"parameters": {
"__metadata": { "type": "SP.XmlSchemaFieldCreationInformation" },
"SchemaXml": '@{outputs('Compose')}'
}
}
Create a Choice Site Column in SharePoint using Power Automate

Now, click ‘Save’ and run the flow manually. After it runs successfully, go to the SharePoint Site Columns under the ‘Custom Site Columns’ group. You will see the ‘Choice’ column that was created.

Create a Choice Site column using SchemaXml in Power Automate

Create a Choice Site column using Simple JSON

Create a new instant cloud flow that will manually trigger, then add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "__metadata": {
    "type": "SP.FieldChoice"
  },
  "FieldTypeKind": 6,
  "Title": "Project Status",
  "InternalName": "ProjectStatus",
  "Group": "MyCustomFields",
  "Choices": {
    "results": ["Not Started", "In Progress", "Completed"]
  },
  "DefaultValue": "Not Started"
}
How to create and use a site column in Microsoft SharePoint

Now, click ‘Save’ and run the flow manually. After it runs successfully, go to the SharePoint Site Columns under the ‘Project Status’ group. You will see the ‘Choice’ column that was created.

Power Automate Create a Choice Site column using Simple JSON

Create a Date Site Column in SharePoint using Power Automate

Create a new instant cloud flow that will manually trigger, then add a Send an HTTP request to SharePoint action and provide the below parameter:

  • Site Address: Select the SharePoint site address for creating site columns
  • Method: Select “POST” as the method
  • URI: Provide the below URI:
_api/web/fields
  • Header: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  "__metadata": {
    "type": "SP.FieldDateTime"
  },
  "FieldTypeKind": 4,
  "Title": "Submission Date",
  "Group": "MyCustomFields",
  "InternalName": "SubmissionDate",
  "Required": false
}
Power Automate Create a Date Site column using Simple JSON

Once the flow runs successfully, go to the SharePoint Site Columns and check the date the site column was created.

Create a Date Site Column in SharePoint using Power Automate

Create a Person Site Column in SharePoint using Power Automate

To create a ‘Person’ Site Column in SharePoint Online using Power Automate with the ‘Send an HTTP request to SharePoint’ action, use the following JSON format in the Body:

{
  "__metadata": {
    "type": "SP.Field"
  },
  "FieldTypeKind":"20",
  "Title": "Assigned To",
  "Group": "MyCustomFields",
  "InternalName": "AssignedTo",
  "Required": false
}

When you use the above JSON format, the output will look like the screenshot below:

Create a Person Site Column in SharePoint using Power Automate

Create a Number Site Column in SharePoint using Power Automate

To create a Number Site Column in SharePoint using Power Automate with a JSON format, you can use the REST API to define the column’s properties. Add the ‘Send an HTTP request to SharePoint’ action, and use the following JSON format in the Body:

{
    "__metadata": {
        "type": "SP.Field"
    },
    "FieldTypeKind": 9,
    "Title": "Project Budget",
    "InternalName": "ProjectBudget",
    "Group": "MyCustomFields",
    "Required": false
}

When you use the above JSON format, the output will look like the screenshot below:

Create a Number Site Column in SharePoint using Power Automate

Create a lookup Site Column in SharePoint using Power Automate

To create a Lookup Site Column in SharePoint using Power Automate, follow the below steps:

For this example, I created a SharePoint list called Project Name:

Create a lookup Site Column in SharePoint in Power Automate

Create an Instant cloud flow and Choose a trigger for your flow, such as Manually trigger a flow, then add the ‘Send an HTTP request to SharePoint’ Action and Provide the below parameters:

  • Site Address: Select the SharePoint site address.
  • Method: GET
  • Uri:
_api/web/lists/getbytitle('Project Name')

Replace ‘Project Name’ with the name of your SharePoint list. This request fetches the list’s metadata, including the GUID.

Power Automate Create a lookup Site Column in SharePoint

Again, add the Send an HTTP request to SharePoint action to create a lookup field in the site column. Provide the below parameters:

  • Site Address: Select the SharePoint site address.
  • Method: POST
  • Uri:
_api/web/fields/addfield
  • Headers: Use the below headers to make REST API calls to SharePoint:
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
  • Body:  Provide the below JSON format:
{
  'parameters': {
    "__metadata": { "type": "SP.FieldCreationInformation" },
    "FieldTypeKind": 7,
    "Title": "Related Projects",
    "Required": false,
    "LookupListId": "@{body('Send_an_HTTP_request_to_SharePoint_GUID')?['d']?['Id']}",
    "LookupFieldName": "Title"
}
}
Power Automate Create a lookup Site Column in SharePoint online

Now, click Save and run the flow manually after it runs successfully. Site Settings > Site Columns Under the Custom columns, you can look at the column that has successfully been created.

Create a lookup Site Column in SharePoint using Power Automate

Delete a SharePoint Site Column Using Power Automate

To delete a SharePoint Site Column using Power Automate, we can use the Send an HTTP request to SharePoint action to call the REST API.

Create an Instant cloud flow and choose a trigger, such as ‘Manually trigger a flow.’ Then, add the ‘Send an HTTP request to SharePoint’ action and provide the following parameters:

  • Site Address: Select the SharePoint site address.
  • Method: POST
  • Uri:
_api/web/fields/GetByInternalNameOrTitle('siteColumnInternalName')

In this example, I delete the above lookup column, so I provide uri as:

_api/web/fields/GetByInternalNameOrTitle('Related Projects')
  • Header: Provide the Header to delete the Site column required for the REST API.
Accept: application/json;odata=verbose
Content-Type: application/json;odata=verbose
IF-MATCH:*,
X-HTTP-METHOD:DELETE
How to Delete a SharePoint site column using Power Automate

Now save and run the flow. Once the flow runs successfully, go to the SharePoint Site Columns, and you will see the lookup column deleted successfully.

Delete a SharePoint site column using Power Automate

In this tutorial, I explained how to create different types of SharePoint Site Columns using Power Automate, including Single line of text, Multiple lines of text, Choice, Date, Person, Number, and Lookup columns, using both SchemaXml and simple JSON approaches. I also covered how to delete a Site Column using the ‘Send an HTTP request to SharePoint’ action.

Related Power Automate articles:

>

Build a High-Performance Project Management Site in SharePoint Online

User registration Power Apps canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App

Power Platform Tutorial FREE PDF Download

FREE Power Platform Tutorial PDF

Download 135 Pages FREE PDF on Microsoft Power Platform Tutorial. Learn Now…