Forum Discussion
SharePoint Button Web Part "Run Flow" Action Only Works in the Default Environment
Hello! I was setting up a new workflow for a customer and encountered a limitation with the button web part's "Run Power Automate Flow" option.
Background
The SharePoint Button web part has a built-in action type: Run Power Automate Flow, which accepts a Flow ID. This is a clean option for giving users a one-click way to trigger an instant/manual flow directly from a SharePoint page.
The Finding
When configuring the Button web part with Run Power Automate Flow, it appears that the flow must reside in the Default Power Platform environment for this action to work. Flows in non-default (department-level) environments fail silently with the following error:
Could not find flow '<flow-id>'.
Testing Approach
To isolate the variable, I did the following:
- Took an existing instant flow and exported it from a department-specific environment, then imported a copy into the Default environment — so the logic was identical.
- Created two Button web parts on the same SharePoint page:
- Button A → Flow ID from the department-level environment copy
- Button B → Flow ID from the Default environment copy
- Both buttons were configured identically, with the only difference being which environment hosted the flow.
Result:
- ✅ Button B (Default environment) — triggered successfully
- ❌ Button A (department-specific environment) — returned "Could not find flow '<id>'"
The account I used for testing is the same one that created the workflows and also has site collection admin rights, so permissions should be a factor.
Related Behavior
This appears to be consistent with a known behavior of running an instant flow from a SharePoint list (from the List menu , "Integrate" -> "Flows" -> <workflow name>), where instant flows with manual SharePoint triggers must also reside in the Default environment to function correctly.
Both surfaces appear to share the same environment scope constraint when resolving flows by ID from a SharePoint context.
Questions for the Community / Microsoft
- Is this a documented platform constraint for the Button web part's Run Power Automate Flow action?
- Is this constraint expected to change, or is it by design?
Workarounds
In this case, I found two decent workarounds:
- Instead of configuring the Button web part action as Run Power Automate Flow, it can be configured as Open Link, and then use the flow's direct run URL:
https://make.powerautomate.com/environments/<environment id>/flows/<flow id>/run - Also using the direct run URL, enter that into a navigation link or regular hyperlink on the SharePoint page to launch the workflow run page.
Any insight from the community or the product team would be appreciated — especially if there's a documented reference I may have missed.
Thanks!
GullettBrian non-Default flows are supported on the page button web part and in the list or library quick steps. Integrate menu with Flows flyout is only Default. You can follow the steps in this article to grab the full Flow ID with the environment GUID: Advanced formatting concepts | Microsoft Learn
4 Replies
- Nate Tennant
Microsoft
GullettBrian non-Default flows are supported on the page button web part and in the list or library quick steps. Integrate menu with Flows flyout is only Default. You can follow the steps in this article to grab the full Flow ID with the environment GUID: Advanced formatting concepts | Microsoft Learn
- GullettBrianIron Contributor
That's great! Per those instructions, I was able to use the "Export" > "Get Flow Identifier", copy and paste that into the Flow ID field for a button on a SharePoint page, and it works perfectly.
Thanks for sharing!👍
- FandangoCopper Contributor
The solution is similar to running a flow from a "button" column in a SharePoint list. You need the identifier from "Get flow Identifier" menu item under "Export" when viewing your flow in the power automate UI (below). It will give you something like: v1/XXXXXX-b286-4a47-85da-3d0bfe4f5d34/ZZZZZ-e8ce-4525-8815-c07a38804d94. The id between "v1/" and the second "/" being the environment id (I imagine). Simply copy the whole string into the "Flow Id" parameter box when you're constructing the button control on the page.
I have confirmed this using a very simple flow, the standard "Run a flow" panel opens up in the RHS of the SharePoint page once you hit the button.
Get flow Identifier:Run flow finds the flow in a different environment from Default
Hope that helps
- BRIDGEClundBrass Contributor
Good morning! The "Run Power Automate Flow" is a brand new feature for the button web part that is currently in rollout, expected to complete by mid-August. I haven't tested the Power Automate option, only the Copilot prompt. My assumption would be that since it is a feature in process of rollout, that it makes sense to run only from the default environment as that is the "published" environment for most organizations.