How to Add Custom Action Buttons to SharePoint List Items with Column Formatting
SharePoint Online offers a powerful feature called JSON Column Formatting that lets you enhance list views and create interactive user experiences—without writing any custom code. In this guide, we’ll walk through adding a clickable button directly in your list view, which can execute actions like triggering a Power Automate flow or opening a link.
Why Add Buttons To SharePoint Lists?
By default, list items in SharePoint only display data, but with column formatting you can make your list interactive. Some common scenarios:
- Start a workflow on a specific item
- Open a form in edit mode
- Navigate to a custom page
- Perform an external action (like sending an email)
All this can be achieved visually through JSON formatting.
Step-by-Step: Insert a Button in Your SharePoint List
Step 1: Add a Column to Your List
First, add a Single line of text column to your list.
You can name it something like:
Action
This column doesn’t need to store any value—it’s simply a placeholder for your button.
Step 2: Format the Column
1.Go to the list view.
2.Hover over your new column header (Action) and click the small down arrow.
3.Select Column settings → Format this column.
Step 3: Apply JSON Formatting
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"style": {
"background-color": "#0078d7",
"color": "white",
"border": "none",
"padding": "6px 12px",
"cursor": "pointer"
},
"attributes": {
"title": "Click to trigger action"
},
"txtContent": "Start Flow",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\":\"<YOUR-FLOW-ID>\"}"
}
}
Replace YOUR-FLOW-ID with the actual ID of your Power Automate flow.
To get your Flow ID: Open the flow in Power Automate → Click Details → Copy the ID from the URL.
Step 4: Save and Test
Click Save in the formatting panel.
You should now see a Start Flow button next to each list item in the Action column.
Clicking the button will trigger your Power Automate flow with the selected list item context.
Useful Links
Final Note
Adding interactive buttons in SharePoint lists is a no-code, user-friendly way to make your lists more dynamic and actionable. You can easily adapt this method to many different scenarios in your organization.