Power Pages (formerly Power Apps Portals) integrate seamlessly with Power Automate to execute backend processes, automate workflows, and enhance the user experience on your portal. These integrations are referred to as Portal Actions, where a Power Automate flow is triggered from within the portal—commonly through form submissions, button clicks, or JavaScript events.
This guide explains, step-by-step, how to configure Portal Actions using Power Automate, along with best practices, real-world examples, and security considerations.
1. Introduction to Portal Actions
Portal Actions allow users on Power Pages to trigger Power Automate flows based on events such as:
- Entity (Dataverse) form submissions
- Button clicks (custom JavaScript)
- Portal Web API or custom JavaScript triggers
These flows can automate backend business logic, like:
- Sending confirmation emails
- Creating tasks
- Sending approval requests
- Updating related records
2. Prerequisites
Setup Requirements
- A valid Power Automate license
- Access to Power Platform Admin Center
- Power Pages portal connected to Dataverse
- Portal Management App access
3. Triggering Power Automate from a Portal
Method 1: Trigger via Dataverse Record Creation (Form Submission)
This is the most common method where a Power Automate flow is triggered after a portal user submits a form.
Steps:
- Create a Flow
- Go to Power Automate
- Select Automated cloud flow
- Choose When a row is added, modified or deleted (Dataverse)
- Select your target table (e.g., Contact Us form table)
- Add Logic to Flow
- Actions like: Send Email, Update record, Notify Team, Call HTTP, etc.
- Deploy Portal Form
- Use the Basic Form or Advanced Form component in Power Pages
- Ensure it’s mapped to the same Dataverse table you set in the flow
- Test Submission
- Submit the form from the live portal
- The flow will be triggered automatically in real-time
Example:
A “Contact Us” form on the portal creates a Dataverse record. A flow listens for new submissions and sends an acknowledgment email to the user and a notification to the admin.
Method 2: Trigger Power Automate from a Button (Using JavaScript and Power Pages Web API)
This method gives more control and is suitable for interactive UI triggers like custom buttons.
🔹 Steps:
- Create a Manual Trigger Flow
- Use HTTP Request trigger or Power Apps (V2) trigger
- Add logic to process inputs
- Expose Flow as HTTP Endpoint
- When using HTTP request trigger, copy the POST URL
- Use JavaScript to Call Flow Example:
function callFlow() {
var jsonData = {
"name": "Irfan Hasan",
"email": "irfan@sample.com"
};
$.ajax({
url: "https://prod-xyz.azurewebsites.net/api/triggerflow",
type: "POST",
data: JSON.stringify(jsonData),
contentType: "application/json",
success: function (response) {
alert("Flow triggered successfully!");
},
error: function (xhr, status, error) {
console.error("Flow error: ", error);
}
});
}
- Assign this function to a button on a Web Page using JavaScript.
Method 3: Trigger from Power Pages Web API
If you are performing CRUD operations using the Web API, you can chain a Power Automate flow to be triggered upon record updates or creation.
4. Use Cases for Portal Actions via Power Automate
Use Case | Trigger | Action |
---|---|---|
Lead submission | Contact form | Create lead, notify sales |
Customer feedback | Survey form | Send thank-you email |
Payment received | Web API call | Generate invoice |
File upload | Web form | Move file to SharePoint |
User registration | Registration form | Approve or reject via Teams |
Appointment booking | Booking form | Send SMS reminder |
5. Best Practices
Security
- Don’t expose flow URLs publicly without token-based security
- Use
IP restrictions
,OAuth 2.0
, orAzure API Management
if using HTTP endpoints
Efficiency
- Avoid creating too many flows per form – batch logic where possible
- Use concurrency control for flows triggered rapidly
Traceability
- Add logging (e.g., Dataverse custom log table or Notifications)
- Use
Run History
in Power Automate for debugging
Reusability
- Use Child Flows for repeated logic
- Use Environment Variables to manage dynamic values
6. Real-World Example
Scenario:
You have a job application form on Power Pages. When a user submits the form, the HR team should get an email and the resume should be saved to SharePoint.
Steps:
- Create a Dataverse table named Job Applications
- Add fields like
Name
,Email
,Resume Attachment
- In Power Automate:
- Trigger: When a new row is added to Job Applications
- Action 1: Send email to HR team with form details
- Action 2: Create file in SharePoint using resume attachment
- Add a Basic Form on Power Pages and link it to Job Applications
- Publish and test
7. Monitoring and Maintenance
- Use Flow Run History to check execution status
- Set up alerts for failed runs
- Maintain version control of flows
- Clean up unused flows periodically
8. Summary
Portal Actions via Power Automate bridge the gap between user interactions and backend automation. With these integrations, you can:
- Save time and manual effort
- Enhance customer experience
- Trigger complex business logic behind simple actions
- Build scalable and secure digital solutions
Whether it’s sending emails, updating data, or calling external services, Power Automate makes Power Pages more dynamic, interactive, and powerful.