Power Pages (formerly Power Apps Portals) can trigger real-time Microsoft Teams notifications when events happen on the portal. For example:
- New form submissions (e.g., support requests, registrations)
- Document uploads
- User feedback
- Order or booking confirmations
This guide outlines how to set up automated Teams alerts using Power Automate as a bridge between Power Pages and Teams.
Architecture Overview
Power Pages → Power Automate → Microsoft Teams
- Trigger: Portal submission (form, file, etc.)
- Automation: Power Automate receives the trigger and composes a message
- Action: Flow posts a Teams message to a specified channel or user
Key Components
- Dataverse Table: Stores portal submission data
- Power Automate Flow: Automates detection and notification
- Teams Connector: Posts messages to Teams channels
- Portal Logic: Optionally uses Web APIs or JavaScript for real-time flow triggering
Step-by-Step Implementation
Step 1: Identify the Portal Event
Common triggers:
- New record in Dataverse (e.g.,
SupportRequests) - Updated record (e.g.,
Status = "Resolved") - File uploaded (tracked in a custom table)
Ensure your portal form is saving to a Dataverse table.
Step 2: Create the Power Automate Flow
- Go to Power Automate
- Click Create → Automated Cloud Flow
- Name your flow: “Portal Submission – Notify Teams”
- Choose a trigger:
When a row is added(Dataverse)- Choose your environment and the relevant table (e.g.,
SupportRequests) - Set scope to
Organization
Step 3: Compose Teams Message
- Add Microsoft Teams action:
Post a message (V3)to a channel - Configure:
- Team: Select your Microsoft Teams team
- Channel: Choose the desired channel (e.g.,
Support Alerts) - Message:
New Support Request Submitted
Name: @{triggerOutputs()?['body/firstname']}
Email: @{triggerOutputs()?['body/email']}
Message: @{triggerOutputs()?['body/message']}
Submitted on: @{triggerOutputs()?['body/createdon']}
- Optionally, add adaptive cards using
Post adaptive card in a chat or channelfor richer formatting.
Step 4: Add Conditional Logic (Optional)
Add a Condition block:
- Example: Notify only when priority is high
If Priority = "High"
→ Post to Teams
Else
→ Do nothing or log
Step 5: Test Your Flow
- Go to the Power Pages portal
- Fill out the form (e.g., new support request)
- Submit
- Check the Teams channel for notification
Alternative Trigger: HTTP Webhook (Advanced)
If you prefer portal-side logic:
1. Create Power Automate Flow with HTTP Trigger
- Trigger:
When an HTTP request is received - Accept parameters like
name,email,message
2. Add Teams Action
- Same as above – post to channel or chat
3. Call from JavaScript in Portal
Add this in a script:
fetch("https://prod-xx.flow.microsoft.com/...", {
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
name: "John Doe",
email: "john@example.com",
message: "Urgent ticket"
})
});
Use this method for instant triggers without waiting for Dataverse row commits.
Use Cases and Examples
| Use Case | Trigger Table | Teams Channel |
|---|---|---|
| Contact Us form | ContactSubmissions | Marketing Alerts |
| Job Application | JobApplications | HR Notifications |
| High-Priority Support | SupportTickets | Support Escalations |
| Document Upload | UploadedFiles | Compliance |
Best Practices
| Tip | Reason |
|---|---|
| Add metadata to messages | Easier for teams to take action |
| Use adaptive cards | Enables buttons, replies, rich formatting |
| Monitor flow run history | For debugging failed triggers |
| Use environment variables | Avoid hardcoding channel IDs |
| Secure flow access | Use authentication if calling via HTTP |
Security Considerations
- Avoid exposing flow URLs publicly
- Secure HTTP-triggered flows using Azure AD or API Management
- Use role-based access to restrict sensitive data
- Avoid including PII directly in Teams messages unless encrypted/authorized
Advanced Features (Optional)
- Mention users in messages:
@John Doe - Use
Post message in chatto alert specific team members - Schedule batch alerts (e.g., nightly summaries)
- Trigger based on Power Pages Web API logic instead of raw table change
