news and know-how about microsoft, technology, cloud and more.

Trigger a Power Automate Flow through a SharePoint List Item


Power Automate is a great tool to automate SharePoint based Tasks, e.g. Document Approvals, Notifications,... The flows can be triggered by a new or changed Element / Document in SharePoint, but very often, we want the user to start a flow for a specific, selected document. For that, Microsoft is Providing a Power Automate Trigger called "SharePoint - Start for the selected document", which can be triggered for the selected document in SharePoint. The flow gets the ID of the selected document and can do anything you want with that document. In this post, I explain, how to trigger a flow, that is located in another environment than the default environment

How does the integration work

This is great - BUT - in the past the flow needs to sit in the default Power Platform Environment, that SharePoint can trigger it. The reason for that is easy explained - let's have a look on the integration in the SP List.

To start the flow from the SP List, we add a text field to the list, add a custom formatter to that field and reference there to the ID of the Flow

Title v 
-Item 1 
Flow v 
Start my FLOW 
Add column

The JSON for the custom formatter looks like that:


  "$schema": "https: //",
  "elmType": "span",
  "style": {
    "border": "none",
    "background-color": "#0029b0",
    "color": "#0078d7",
    "cursor": "pointer",
    "width": "100px",
    "margin": "5px",
    "border-radius": "20px",
    "visibility": "visible"
  "children": [{
    "elmType": "button",
    "txtContent": "Start my FLow",
    "style": {
      "border": "none",
      "background-color": "transparent",
      "color": "white",
      "cursor": "pointer"
    "customRowAction": {
      "action": "executeFlow",
      "actionParams": "{\"id\": \"0000000-0000-0000-0000-0000000000\"}"



The relevant part is

"customRowAction": {
  "action": "executeFlow",
  "actionParams": "{\"id\": \"0000000-0000-0000-0000-0000000000\"}"


The Problem

You see that the action "executeflow" only takes a Parameter "id" which is the flow id. If the flow is not located in the default environment, the button will not work. From a good Power Platform Governance not a very nice approach, as Microsoft is telling us to place "real world/mission critical" Flows in other Environments than the Default Env.

But since a few weeks, there is new way to reference to the flow which has the Environment ID included.

To find that link, let's switch to the Power Automate Maker Workbench at

First lets validate we are not in the Power Platform default environment

Megan Bowen's Environ... 
p Search 
Contoso (default) 
Megan Bowen's Environment

Next I create a very simple flow with the SP-trigger "for the selected item"

For a selected item 
Site Address 
List Name 
+ Add an input 
Demo - 
Send an email notification (V3) 
+ New step 

After saving and exiting from the flow workbench, we can get the identifier of the flow, via the "Export" Menu

Edit Share Save As 
Send a copy 
Submit as template 
Export v 
Package (.zip) 
Get flow identifier 
Turn off 
C) Repair 
SP Demo 
SP Demo 
Megan Bowen 
Aug 5, 01:59 PM 
Aug 5, 01:59 PM

Megan Bowen's Environ... 
Get flow identifier 
Use this detailed identifier to reference this now in 
manual flow irm•cation scenarios like running a now from 
a SharePoint column button 

The identifier looks like that


And here is the magic - the ID consist of the the Environment ID + the Flow ID. We can us that in the custom formatter in the SharePoint List

" customRowAction" : 
"action": "executeF10w" , 
"actionParams" : 
\ "VI/ 

And we can the start the flow from the SP List

+ New 
Title v 
- Item 1 
Run flow 
sp Demo 
Owner: Megan Bowen 
Add column • 
Start my FLOW

Why is this so important?

In a good Power Platform Governance, we (and also Microsoft) is recommending to use the "Default Environment" as a "Personal or Playground" Environment, not as a Productive Place. But as long as we could not reference to other then the Default Environment from a SharePoint List to start a Flow, we had to use the Default Environment for that. With that trick, now it is possible to have a "clean" Default environment (maybe using the Power Platform CoE Starter Kit).

If you want to learn more about a good Power Platform Governance, contact us!