Trigger Power Automate from a SharePoint List Button

C
Collab365 TeamAuthorPublished Mar 30, 2026
2,415

At a Glance

Target Audience
SharePoint owners, Power Automate makers and Microsoft 365 administrators
Problem Solved
Launching the correct selected-item flow from a SharePoint list without broken IDs, missing run-only access or unsafe connection assumptions.
Use Case
Adding a clear, governed action button to a SharePoint list row for approvals, notifications and controlled processing.

Trigger Power Automate from a SharePoint List Button

A button inside a SharePoint list is a good way to let somebody run an action for the row they are already looking at.

The JSON is the easy bit. Most broken versions fail because the flow has the wrong trigger, the wrong identifier was pasted, the user lacks run-only or list permission, or the connection runs under an identity nobody has thought about.

This guide covers all four.

What the button really does

SharePoint column formatting changes how a field is displayed. It does not change the stored value in the list item.

The executeFlow action launches a Power Automate flow for the corresponding item. Microsoft documents an important difference:

  • for a solution-aware flow, SharePoint opens the Flow panel and the user must select Run Flow;
  • for a non-solution-aware flow, SharePoint still opens the panel, then the flow runs.

So this is best described as a flow launch button. It is not always an unconditional one-click execution.

Before you start

You need:

  • a SharePoint Online list, or a library if you adapt the trigger for a selected file;
  • permission to create and share the flow;
  • permission to format the target column or manage the view;
  • a clear decision about which connection identity the flow will use; and
  • a standard-user account for the final test.

Decide what should happen if somebody selects the button twice. A convenient button makes duplicate runs more likely. If the flow sends an approval, creates a record or calls a paid API, add an idempotency check before release.

Step 1: create the selected-item flow

Create an instant cloud flow using SharePoint's For a selected item trigger from the Microsoft SharePoint connector.

Configure the correct site and list, then add the actions the button should start. If you are working with a document library, use the corresponding selected-file pattern rather than copying a list trigger blindly.

The selected-item trigger supplies the item context. If later actions need full column values, add Get item with the site, list and selected item ID.

Give the flow a name that describes the business action, such as Request contract review. Avoid names such as Button flow v2—that becomes useless when several buttons exist.

Save the flow and complete one maker-run test before wiring it into SharePoint.

Step 2: copy the correct flow identifier

Microsoft's official flow-button procedure gives two routes.

If the flow is solution-aware

  1. From the SharePoint list, select Flow > See your flows.
  2. Switch to the environment that holds the flow if required.
  3. Open Solutions.
  4. Open the solution.
  5. Filter for Cloud flows and open the target flow.
  6. Select Export > Get flow identifier.
  7. Copy the identifier.

If the flow is not solution-aware

  1. Switch to the environment that holds the flow.
  2. Open the flow.
  3. Select Export > Get flow identifier.
  4. Copy the identifier.

Do not paste the flow's display name. Do not copy an unrelated browser URL segment and hope it is the same value. Use Get flow identifier.

Step 3: create the display column

Add a normal Single line of text column called Action, Run flow or another useful label. A calculated column is not required.

The column only gives SharePoint a place to render the button. Its stored value can remain blank.

Open the column menu and select:

Column settings > Format this column > Advanced mode

Step 4: paste the supported JSON

Replace <FLOW-ID> with the identifier copied in step 2.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/v2/column-formatting.schema.json",
  "elmType": "button",
  "customRowAction": {
    "action": "executeFlow",
    "actionParams": "{\"id\":\"<FLOW-ID>\",\"headerText\":\"Run item action\",\"runFlowButtonText\":\"Run flow\"}"
  },
  "attributes": {
    "class": "ms-fontColor-themePrimary ms-fontColor-themeDarker--hover"
  },
  "style": {
    "border": "none",
    "background-color": "transparent",
    "cursor": "pointer"
  },
  "children": [
    {
      "elmType": "span",
      "attributes": {
        "iconName": "Flow"
      },
      "style": {
        "padding-right": "6px"
      }
    },
    {
      "elmType": "span",
      "txtContent": "Run action"
    }
  ]
}

Select Preview, then Save.

The actionParams value is a string containing JSON, which is why its inner quotation marks are escaped. The required property is id. Microsoft also supports the optional headerText and runFlowButtonText values used above.

Change the visible labels to match the action. Send to manager is safer than Run action because the user can see what they are about to do.

Step 5: configure run-only access

Seeing the button does not grant permission to run the flow.

For an instant flow, use the Run only users section on the flow details page. Add the users or—preferably for a maintained process—the appropriate group.

Microsoft's run-only sharing guidance lets the owner choose between:

  • connections supplied by the run-only user, where actions run with that person's accessible data; and
  • a connection already configured in the flow, where the embedded identity performs the action.

That is a security decision, not a convenience toggle.

If the flow should respect each person's own SharePoint access, use and test the runner-supplied connection. If it must use a governed service identity, document that identity, its minimum permission, credential lifecycle and owner.

Microsoft's list-flow guidance says users need Edit permission on the list to run these flows. Check the actual audience and permission design before rollout; do not grant broad edit access merely to make a button work without considering the effect on the list.

Step 6: test as the person who will use it

The maker test is not enough.

Use a non-owner account from the real audience and check:

  1. The button appears in the intended view.
  2. The label describes the action clearly.
  3. The correct Flow panel opens.
  4. A solution-aware flow waits for Run Flow.
  5. The user's connection prompt is understandable, if required.
  6. The run receives the correct list item ID.
  7. The intended action happens once.
  8. A second click does not create an unsafe duplicate.
  9. A failed run produces an operator-visible signal.

If the flow calls another service, the user may have SharePoint access but still lack connector or downstream permission. Follow the error from the failed run rather than repeatedly changing the JSON.

Common faults

The button does nothing useful

Confirm that actionParams is valid escaped JSON and contains the identifier from Get flow identifier. Re-paste the minimal Microsoft example before adding styling.

The wrong flow opens

The ID belongs to another flow or environment. Re-open the target environment and retrieve the identifier again.

The maker can run it but colleagues cannot

Check run-only users, list Edit permission, environment membership where relevant, connection prompts and downstream data permissions. Do not solve this by making everybody a co-owner.

The flow starts but cannot find the item

Confirm the flow uses For a selected item, the trigger points to the same list, and later Get item actions use the selected ID from the trigger.

The flow creates duplicates

The button is working; the flow is not idempotent. Before creating the side effect, record or check a durable processing key such as list item ID plus action type/status. Disable or conditionally hide the button only as an extra UX guard—not as the sole duplicate control.

The button works in one view but not another

Column formatting is attached to the column display and the column must be present in the view. Check the actual view and surface your audience uses, including Microsoft Lists or Teams if that is part of the process.

For deeper flow failures, use our Power Automate API timeout guide. If the flow is launched by a list change rather than a person, see how to launch a flow from a SharePoint list item event.

Production handover checklist

  • Flow name describes the business action.
  • Correct selected-item or selected-file trigger is used.
  • JSON contains the identifier from Get flow identifier.
  • Button text tells the user what will happen.
  • Run-only audience is a maintained group where possible.
  • Connection context and minimum permissions are documented.
  • Another appropriate owner can maintain the flow.
  • Duplicate-run protection exists inside the flow.
  • Failure notification has a named recipient.
  • A real non-owner test passed in the production surface.

For more practical patterns that survive contact with real users, join the Power Automate Mastery Space.

Frequently asked questions

Which trigger should a SharePoint list button use?

Use the SharePoint For a selected item trigger for a list row. For a document library, use the corresponding selected-file pattern. The button supplies the selected item's context to that instant flow.

Where do I get the flow ID?

Open the target flow in the correct environment and use Export > Get flow identifier. For a solution-aware flow, open it through its solution first.

Do I need a calculated column for the button?

No. A normal text column is sufficient. Column-formatting JSON changes how the field is displayed; it does not need a calculated value.

Why does the user still have to select Run Flow?

Microsoft documents that solution-aware flows show the Flow panel and require the user to select Run Flow. The formatted control is therefore a launch button, not always a silent one-click execution.

Why can the owner run the button but another user cannot?

Check run-only access, the user's Edit permission on the list, the chosen connection context and downstream connector permissions. Seeing the formatted button does not grant any of those rights.