Introduction
This article is part two. Here we will see how to create a button inside the SharePoint list for trigger power automate flow.
In the first article I created a flow that we will use in this article. You can create a button using json formatter in SharePoint modern list.
Steps to create button for trigger flow from list
Step 1. Create or open your existing List.
Step 2. Open List settings.
Step 3. Click on Create column.
Step 4. Enter Column name.
Step 5. Selected Single Line of text
Step 6. Then go to the Column Formatting.
Step 7. Copy Paste the Below code inside your Column Formatting text box.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"edf82b44-6bbd-483f-87a1-26fdc3264a34\"}"
},
"attributes": {
"class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
},
"style": {
"border": "none",
"background-color": "transparent",
"cursor": "pointer"
},
"children": [{
"elmType": "span",
"attributes": {
"iconName": "Mail"
},
"style": {
"padding-right": "16px"
}
}]
}
Step 8. Replace id of ActionParms with your flow id which we copied in the first article.
Step 9. Save your column.
Step 10. Open your list now you will see new column and inside that icons. Click on icon.
Step 11. Once you click on icon, you will get the right side panel, from that select Run Flow button.
Step 12. Once your flow is run you're able to see your flow from run page.
Output
Summary
This is how we can create a button inside the SharePoint list for trigger flow. In part one we have seen how to create flow for selected items and in this article we see how to create button inside the list for triggering flow.