“I’d like to make triggering a Power Automate flow as simple as possible for the users, is there a way to add e.g. a button to start a flow directly from the list view?”
If you use manually started flows, they’re probably started on an item or a document. Users select the item/document, click on the 3 dots -> Automate -> run a flow. But having even these 3 clicks might be confusing for some users, especially if they don’t use flows very often. There must be an easier, more direct way to start a flow!
And there is one, by adding a button directly to the view!
Important note: this approach can be used only for flows located on the Default Power Platform environment, if you use a different environment you’ll need a different approach.
Use JSON formatting to add the button
There’re many possibilities when using JSON to format a SharePoint column. The older posts showed you how to calculate with today’s date or build a hyperlink, this time it’ll show you how to build a button to start a flow.
Since the button will be in a column, it’s a good start to create one, e.g. a Single line of text column ‘StartFlow’.

Click on the column name and navigate through ‘Column settings’ to ‘Format this column’…

…into the ‘Advanced mode’. That’s where all the magic happens.

The JSON below will add the most basic button in that column.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
"elmType": "button",
"txtContent": "Start flow",
"customRowAction": {
"action": "executeFlow",
"actionParams": "{\"id\": \"2c5dfcb2-aa4e-4cfd-9baf-2485225b1fa4\"}"
}
}
But there’re two parts to modify, one that’s optional and one that’s mandatory to change.
The optional one is the wording on the button in the “txtContent” parameter. You can replace it with a few words on the specific flow, or keep just “Start flow” in there.

The second part, the one that’s mandatory to change, is the flow id. You must tell the button what flow it should start, and that’s done by the flow unique id.

Open the flow details page and check the url, this id is between the /flows/ and /details part.

Copy/paste it into the JSON and save it.
And that’s it, you just created a button that’ll start a flow on a single click.
Summary
When using manually started flows, you might want to make the process as simple as possible for the users. While it’s possible to start Power Automate flow from the item/document context menu, it’s much easier to add a button to the list. Users go to the list, click a single button, and the flow will do the rest. And since it’s done using JSON formatting, you can extend it by other functionality, e.g. hide it once the flow is started, but that’s a topic for another post.
Super! Thanks a lot! However, I’m struggling with my usecase… I’d like to make actionParams dynamic in function of the row (based on the Title, for example). How could I do it?
Thanks in advance!
Hello Frenando,
I never did that and I can’t tell if it’ll work, but I’d try to use the IF condition for the parameters, e.g.
“action”: “=if([$Title] == ‘Title1’, ‘executeFlow’, ‘setValue’)”
Hi,
Thanks for great article! I would like to trigger a PA flow from a SharePoint list/document library that is not connected to a single item as above case, instead the flow involves all the items in the library. Is that possible?
Hello Melissa,
the only solution I can think of is to create a manually started flow that’ll get all the items and add a button somewhere (https://tomriha.com/how-to-build-a-link-to-start-manual-power-automate-flow/). All the available flow triggers in ribbon/context menu expect that the flow will run on a specific item.
With this method, if you’re using multiple libraries and want to call the same flow, are you able to pass values/parameters when the button is clicked?
Hello Craig,
no, this approach is possible only for flows started ‘On selected file/item’ where the list/library is hardcoded in the trigger action.
I really like this functionality, especially for approvals on items. But is there any way to create a pop-up prior to running the flow which could take some user input? The PowerAutomate mobile app is probably the best case for this but would like an option on a desktop to launch a flow, prompt the user for some input like “assignee” and “notes” then launch the flow.
A PowerApp could certainly do this, but wondering if there is an easier way.
Hello Weylin,
the button will only start the flow, it doesn’t pass any information. You could use a separate link to start the flow as explained here: https://tomriha.com/how-to-build-a-link-to-start-manual-power-automate-flow/, although I’m still not sure about the user friendliness of such solution.
My question on this is something that’s really puzzling me.
I have a button that has been working nicely – however, I then migrated my flow to another environment, and connected it to run on a service account. When I copied and pasted the GUID of the new flow into the JSON of the list column settings, the button stopped working.
(Pretty sure it’s not a typo error, as I pasted the original GUID on back in again and it worked. The fault has since been replicated many times)
Hello Dave,
this solution works only on the Default environment, that’s a limitation of all the ‘For selected…’ flow triggers. If the flow should exist in a different environment you’ll have to use a workaround e.g. as explained here: https://tomriha.com/run-for-selected-item-flow-from-non-default-environment-power-automate/