How to connect Power Pages with Power Automate
Connect Power Pages with Power Automate by building an instant cloud flow that starts with the “When Power Pages calls a flow” trigger, attaching it to your site and securing it with a web role. A visitor presses a button or submits a form, and the flow handles the back-office work: updating a record, sending an email or starting an approval. If you are still choosing between a B2B and a B2C portal, this overview of Power Pages consulting services compares both. What follows is the sequence you will work through, plus the settings that cause errors when you miss them.
What can a button on your site set in motion?
Microsoft’s examples show how wide the range is. A button or form on the site can start a flow that:
- sends an email or a meeting request
- updates a record
- collects data from the visitor
- synchronizes files
Any of these can feed an approval, which is where this guide is heading. The request enters through the site, the decision happens inside the flow, and the result lands back in the same record.
What do you need before you connect Power Pages with Power Automate?
Three requirements come first. The Power Pages site must run version 9.5.4.xx or later, and a starter site package must be at version 9.3.2304.x or higher. The flow must be solution-aware, because only solution-aware flows can be attached to a site. And the integration needs a Power Automate license; Microsoft recommends a Power Automate Process license in the production environment.
Then create the flow itself. Sign in to Power Pages, select your site and choose Edit, open the Set up workspace and pick Cloud flows under Integrations. Select + Create new flow, search for Power Pages, choose the trigger, define your steps and return values, and save.
How do you add the flow to your site?
A saved flow stays invisible to visitors until the site knows about it. On the same Cloud flows page, select + Add cloud flow, search for the flow you just created and add it. Under Roles, select + Add roles and choose which web roles can run it, then save.
Adding the flow generates a unique URL that the site uses to invoke it. Treat the role selection as the security gate for the whole integration: a flow that edits records belongs to signed-in roles, not to anonymous visitors, unless you have a clear reason.
How does a page call the flow?
The page sends a POST request to the site’s cloud flow endpoint, which ends in /_api/cloudflow/v1.0/trigger followed by the flow’s GUID. You do not add an authentication code, because the application session handles authentication and authorization, but every call must include a CSRF token. Microsoft’s sample makes the call with shell.ajaxSafePost.
Inputs deserve care. A trigger can define parameters of type Text, Boolean, File or Number, and the names in your request body must match the names in the trigger exactly. Passing parameters to a flow configured with secure inputs is not supported, and a trigger with no parameters still needs an empty payload.
What should the flow send back to the page?
Add a response action and the call returns 200 OK with a JSON body you define, so the page can show a reference number or a status. Leave it out and the call returns 202 Accepted with no data.
For approvals, the second option usually fits better. An approval stays pending until someone answers, so the page should confirm receipt and move on. The requester then learns the outcome by email, or opens a status page that reads the record the flow updates.
Where does the approval step go inside the flow?
After the trigger and any validation steps, add the approvals action Start and wait for an approval. The flow pauses there until the approvers respond, then continues with the decision. Approvers can answer from an Outlook email, a Microsoft Teams adaptive card or the Power Automate action center.
Approvals also depend on a Dataverse database. In a non-default environment the system provisions one the first time a flow uses the approvals connector, and the person who runs that first approval flow must hold an administrator role in the environment.
What breaks when you move the site to another environment?
Cloud flows must be registered in the target environment when you move site components that include them. Skip that step and invoking the flow from the website returns a forbidden error. In the target environment, open the site, go to Cloud flows under Integrations, find the flow in the Cloud flows in this site list and select the register icon.
Put the registration on your release checklist. Everything looks correct in the target site until the first visitor presses the button.
