Forum Discussion
CR-88
Oct 12, 2021Copper Contributor
SharePoint Online Button to run Flow
I have a Power Automate flow and a SharePoint Online list, I created a button following this discussion. The problem is my button is created but it's not running the workflow, I tried to debug the wo...
RobElliott
Oct 13, 2021Silver Contributor
CR-88 your JSON code needsto look like this, changing the txtContent to the text you want on the button, and the id needs to be your flow's ID:
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Press this button",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"70bcc1be-c1af-436c-94a6-50828b1582ef\"}"
},
"style": {
"background-color": "#460302",
"color": "#ffffff"
}
}
As this is to work with a document library, your trigger in the flow must be the SharePoint "for a selected file". If it was a list it woujld be "for a selected list"
Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)