Wicked Smart Data
LearnInsightsAboutContact
Sign InLet's Build
LearnInsightsAboutContact
Sign InLet's Build
Wicked Smart Data

Intelligence, automation, and expert execution — plus an elite library of free knowledge. We turn complexity into competitive advantage.

Start a conversation

Platform

  • Learning Paths
  • Insights
  • RSS Feed

Company

  • About
  • Contact
  • Work With Us

Legal

  • Privacy Policy
  • Terms of Service

© 2026 Wicked Smart Data. All rights reserved.

Intelligence · Automation · Advantage

All Insights
Power Apps

Canvas App Approval Workflows: Triggering Power Automate Flows from Form Submissions, Passing Dynamic Record Context, and Surfacing Approval Status Back in the App

Learn how to build a complete approval workflow in Canvas Apps — from triggering Power Automate flows with typed record context on form submission, to routing approvals by business rules, writing outcomes back to your data source, and surfacing live status in the app. This is the production-grade pattern, including failure handling, timeouts, and multi-stage approvals.

🔥 Expert30 min readNov 29, 2026Updated Nov 29, 2026
Canvas App Approval Workflows: Triggering Power Automate Flows from Form Submissions, Passing Dynamic Record Context, and Surfacing Approval Status Back in the App
On this page
  • Introduction
  • Prerequisites
  • Understanding the Architecture Before You Build
  • Setting Up Your Data Source
  • Building the Submission Form in Canvas Apps
  • Creating the Power Automate Flow
  • Defining Trigger Inputs
  • Building the Approval Routing Logic
  • Writing the Approval Outcome Back to SharePoint
  • Adding a Timeout Handler
  • Connecting the Flow to the Canvas App
  • Surfacing Approval Status Back in the App
  • Building the My Requests Screen
  • The Request Detail Screen
  • Implementing the Refresh Mechanism
  • Passing Structured JSON Context for Complex Scenarios
  • Multi-Stage Approval Patterns
  • Building a Manager's Approval Dashboard
  • Hands-On Exercise
  • Common Mistakes & Troubleshooting
  • "The flow doesn't appear in the Power Apps Action panel"
  • "Patch succeeds but the flow receives wrong or empty values"
  • "The approval notification is sent but the flow never updates SharePoint"
  • "Refresh(EquipmentRequests) doesn't show updated data"
  • "The app shows Pending even after the flow approved the request"
  • "The flow errors with 'Invalid type for parameter RequestID'"
  • "Users who didn't create the app get a connection permission error"
  • Summary & Next Steps

Canvas App Approval Workflows: Triggering Power Automate Flows from Form Submissions, Passing Dynamic Record Context, and Surfacing Approval Status Back in the App

Introduction

Here's a scenario that plays out in organizations every day: a field technician submits an equipment repair request through a Canvas App, the request disappears into a black hole, an email eventually arrives in someone's inbox (maybe), that person approves it via reply, someone manually updates a spreadsheet, and the technician has absolutely no idea what's happening until their manager calls them. The process works, technically, but it's slow, opaque, and completely unmaintainable at scale.

The right architecture looks completely different. The technician submits the form, a Power Automate flow fires immediately with the full context of that specific request, the approver receives an actionable notification in Teams or Outlook, their approval decision writes back to the data source, and the technician's app refreshes to show the current status — all without anyone touching a spreadsheet or writing an email. This is an approval workflow that actually serves its users instead of burdening them.

By the end of this lesson, you'll know exactly how to build that system. We're going to cover the full circuit: triggering flows from button presses inside Canvas Apps, passing rich record context as dynamic parameters into those flows, structuring the approval logic in Power Automate, writing the outcome back to your data source, and surfacing that outcome live in the app without requiring a manual refresh. This is not a beginner walkthrough — we're going to reason about architecture decisions, talk about failure modes, and handle the edge cases that tutorials skip over.

What you'll learn:

  • How to invoke Power Automate flows from Canvas Apps using the PowerApps trigger and the Run function, including how to pass structured JSON context
  • How to design Power Automate approval flows that carry record identity and business context through the full approval chain
  • How to write approval decisions back to SharePoint, Dataverse, or other data sources in a way the app can observe
  • How to surface live approval status in the Canvas App — polling patterns, refresh strategies, and UI state machines
  • How to handle failures, timeouts, and multi-stage approvals without leaving records in zombie states

Prerequisites

You should be comfortable building and publishing Canvas Apps before working through this lesson. If you're newer to the platform, Build Your First Canvas App in Power Apps gives you the foundation. You should also understand how forms, galleries, and the Patch function work — the article on Power Apps Controls: Galleries, Forms, and Data Tables covers that in depth. Some familiarity with Power Automate is assumed, though we'll walk through flow construction step by step.

For the hands-on exercise, you'll need:

  • A Power Apps environment with Power Automate enabled
  • A SharePoint site with list-creation permissions (or a Dataverse environment)
  • An account licensed for Power Automate (the Premium connectors we'll use for Dataverse require a Premium license; SharePoint-based flows are covered under standard licensing)

Understanding the Architecture Before You Build

Before writing a single formula, you need to understand the communication model between Canvas Apps and Power Automate. This is where most tutorials skip the nuance that bites you later.

A Canvas App does not have a persistent server-side process. It's a client-side application running in a browser or the Power Apps mobile shell. When a user submits a form, your app can either write directly to a data source or invoke a Power Automate flow — or both. The important distinction is that flow invocation from Canvas Apps is a fire-and-trigger operation by default, not a synchronous round-trip.

When you use the PowerApps trigger in Power Automate, the flow runs asynchronously. Your app calls FlowName.Run(...) and immediately continues executing whatever comes next in your formula. The flow does its work in the background. If you want the outcome of that flow back in the app, you need a mechanism to retrieve it — the flow can't push data back to a live app session.

This creates an architectural choice with real trade-offs:

Option 1: Write-and-Poll — Your app writes the initial record to a data source (setting status to "Pending"), triggers a flow that processes the approval and updates that same record when complete, and your app periodically re-fetches the record to check for status changes. This is the most reliable pattern and works at any scale.

Option 2: Synchronous Response — The PowerApps (V2) trigger combined with a Respond to a PowerApps or flow action lets the flow return values back to the calling app before the formula completes. This works, but is constrained to scenarios where the flow completes quickly (within about 120 seconds). Approval flows that wait for a human to respond will almost always timeout using this pattern.

Option 3: Push Notification — Use a separate notification flow or SignalR integration to push status updates back into the app. This is the most real-time option but also the most complex. For most approval scenarios, it's overkill.

Key insight

For approval workflows specifically, Option 1 (Write-and-Poll) is almost always the right choice. Human approval decisions happen on human timescales — minutes, hours, sometimes days. No synchronous HTTP call will wait that long. Design your app to reflect this reality rather than fight it.

The architecture we'll build looks like this: the Canvas App patches a record into SharePoint or Dataverse with an ApprovalStatus of "Pending", then immediately calls a Power Automate flow passing the record's ID and key context fields. The flow handles the approval process and writes the final status back to that same record. The app reads the status when the user navigates to a detail screen or pulls to refresh.


Setting Up Your Data Source

For this lesson, we'll use a SharePoint list called EquipmentRequests. Create it with these columns:

Column Name Type Notes
Title Single line of text Use this as the request title
RequestorEmail Single line of text Submitter's email
EquipmentType Choice Laptop, Monitor, Keyboard, Headset, etc.
BusinessJustification Multiple lines of text The "why" of the request
Priority Choice Low, Medium, High, Critical
EstimatedCost Currency Drives approval routing later
ApprovalStatus Choice Pending, Approved, Rejected, Cancelled
ApproverEmail Single line of text Populated by the flow after approval
ApproverComments Multiple lines of text Populated by the flow
ApprovalDate Date and Time Populated by the flow
FlowRunID Single line of text Useful for debugging; we'll discuss this

The ApprovalStatus choice column is the heartbeat of this whole system. Every piece of UI logic in the app will pivot on this field. Set its default value to "Pending" so that newly created items land in the right state automatically — but we'll also set it explicitly in our Patch call to be safe.

The FlowRunID column might look optional, but it's genuinely useful. When you trigger a flow from Canvas Apps, the Run function doesn't return a flow run identifier by default. However, if you use the V2 trigger with a synchronous response, you can pass back a run ID immediately (before the approval wait begins). This lets you deep-link into the Power Automate run history from the app for support and debugging scenarios.

Note

If you're building on Dataverse instead of SharePoint, the column structure is identical in concept but the data types map differently. ApprovalStatus becomes a Choice column in Dataverse as well, and you'll use the Dataverse connector rather than the SharePoint connector throughout. The Canvas App formulas remain largely the same; the connector action names differ. For a thorough comparison, see Connecting Power Apps to SharePoint, Excel, and Dataverse: A Complete Integration Guide.


Building the Submission Form in Canvas Apps

Connect your app to the EquipmentRequests SharePoint list. Add a new screen called SubmitRequestScreen. We're not going to use the auto-generated Edit Form control here — we're going to use individual controls that give us full control over what gets submitted and when. If you want to understand why this matters architecturally, the article on Master Power Apps Formulas: Navigate, Filter, Lookup, and Patch for Professional Apps covers the trade-offs between Form controls and manual Patch calls.

Add the following controls to your screen:

  • A Text Input named txtTitle
  • A Text Input named txtJustification with its Mode property set to MultiLine
  • A Dropdown named ddEquipmentType with Items set to ["Laptop", "Monitor", "Keyboard", "Headset", "Other"]
  • A Dropdown named ddPriority with Items set to ["Low", "Medium", "High", "Critical"]
  • A Text Input named txtEstimatedCost
  • A Button named btnSubmitRequest

The submit button is where the magic happens. Here's the formula you'll put in its OnSelect property — but we'll build it in stages to understand each piece.

Stage 1: Validate the form

// First, check that required fields are filled
If(
    IsBlank(txtTitle.Text) || IsBlank(txtJustification.Text) || IsBlank(txtEstimatedCost.Text),
    Notify("Please complete all required fields before submitting.", NotificationType.Error),
    // Proceed to submission logic
    Set(gblIsSubmitting, true)
)

Stage 2: Patch the record and capture the new record

If(
    IsBlank(txtTitle.Text) || IsBlank(txtJustification.Text) || IsBlank(txtEstimatedCost.Text),
    Notify("Please complete all required fields before submitting.", NotificationType.Error),
    
    // Set loading state
    Set(gblIsSubmitting, true);
    
    // Create the record and capture it
    Set(gblNewRequest,
        Patch(
            EquipmentRequests,
            Defaults(EquipmentRequests),
            {
                Title: txtTitle.Text,
                RequestorEmail: User().Email,
                EquipmentType: { Value: ddEquipmentType.Selected.Value },
                BusinessJustification: txtJustification.Text,
                Priority: { Value: ddPriority.Selected.Value },
                EstimatedCost: Value(txtEstimatedCost.Text),
                ApprovalStatus: { Value: "Pending" }
            }
        )
    );
    
    // Check if patch succeeded before triggering the flow
    If(
        IsError(gblNewRequest),
        Set(gblIsSubmitting, false);
        Notify("Failed to save your request. Please try again.", NotificationType.Error),
        
        // Record saved successfully — now trigger the flow
        // (flow trigger goes here in Stage 3)
    )
)

Notice that we're capturing the result of Patch into a global variable gblNewRequest. This is critical: the Patch function in Canvas Apps returns the record as it exists in the data source after the write, including the auto-generated ID field. We need that ID to pass into the flow so the flow knows which record to update when the approval is complete.

Warning

Patch does not always return an error record when something goes wrong — sometimes it silently succeeds partially. Wrap critical Patch calls with IfError or check IsError() on the result, as shown above. For a comprehensive guide to error handling patterns, see Canvas App Error Handling: Building Resilient Apps with IfError, Notify, and Graceful Failure Patterns.


Creating the Power Automate Flow

Now we need to build the flow that will handle the approval process. In the Power Automate portal (make.powerautomate.com), create a new Instant cloud flow. When asked for the trigger, search for and select Power Apps (V2). This is the newer trigger that supports named, typed parameters — much better than the original Power Apps trigger that passed everything as a single untyped string.

Defining Trigger Inputs

In the Power Apps (V2) trigger, click "Add an input" and define these parameters:

Parameter Name Type
RequestID Number
RequestTitle Text
RequestorEmail Text
EquipmentType Text
Priority Text
EstimatedCost Number
BusinessJustification Text

You're defining these as typed inputs rather than passing a JSON blob because: (1) the Power Apps formula bar will give you IntelliSense for each parameter, (2) type coercion happens automatically, and (3) the flow shows meaningful parameter names in run history, which is invaluable when debugging production issues.

Tip

Resist the temptation to pass only the record ID and have the flow re-fetch all the data from SharePoint. While that keeps the trigger payload small, it creates a race condition in theory and an unnecessary SharePoint API call in practice. Pass the display-relevant fields you need for the approval notification upfront. For fields that might have changed between submission and approval evaluation, re-fetch from SharePoint using the ID.

Building the Approval Routing Logic

Add a Condition action after the trigger. We'll route based on cost — requests over $500 go to a manager, requests over $5000 go to a director. This is the kind of business rule that makes approval workflows genuinely useful versus a rubber-stamp exercise.

Condition: triggerBody()?['EstimatedCost'] is greater than 5000

In the Yes branch (Director approval), add a Start and wait for an approval action with these settings:

  • Approval type: Approve/Reject - First to respond
  • Title: Equipment Request Requires Director Approval: [RequestTitle]
  • Assigned to: director@yourcompany.com (or pull from a configuration list)
  • Details: Build a rich HTML body:
Equipment Request Details

Requested by: [RequestorEmail]
Equipment Type: [EquipmentType]  
Priority: [Priority]
Estimated Cost: $[EstimatedCost]

Business Justification:
[BusinessJustification]

Please review and respond below.

In the No branch, add another Condition checking if cost is greater than 500, and route to a manager or self-approve for small purchases accordingly.

Writing the Approval Outcome Back to SharePoint

After each approval action, in both the "Approve" and "Reject" outcomes, add a Update item action targeting your EquipmentRequests list. This is what closes the loop.

For the Approve outcome:

  • Id: Use the RequestID parameter from the trigger
  • ApprovalStatus/Value: "Approved"
  • ApproverEmail: outputs('Start_and_wait_for_an_approval')?['body/responder/email']
  • ApproverComments: outputs('Start_and_wait_for_an_approval')?['body/responses'][0]?['comments']
  • ApprovalDate: utcNow()

For the Reject outcome:

  • ApprovalStatus/Value: "Rejected"
  • Same ApproverEmail and ApproverComments expressions
  • ApprovalDate: utcNow()

Warning

The SharePoint "Update item" action requires the numeric ID of the SharePoint list item, not the GUID. If you're updating Dataverse records, you'll use the row's GUID. Make sure your RequestID parameter type matches — SharePoint items use integers, Dataverse uses GUIDs (strings). This mismatch is one of the most common failure points when building this integration.

Adding a Timeout Handler

Approval flows that wait for human responses can run for days. If your approver goes on vacation or the email gets lost, the flow will keep waiting indefinitely. Add a Configure run after timeout to your approval step, and handle the case where the approval action times out or is abandoned.

In Power Automate, after the Start and wait for an approval action, add a parallel branch that runs only when the approval action has timed out. In that branch, update the SharePoint record's status to "Pending" (or a new "Approval Overdue" status if your business process has escalation rules), and send a reminder notification to the original requestor explaining the delay.

This is production-grade behavior. Without it, a timed-out approval leaves a record in "Pending" state forever, and no one — not the requestor, not the approver, not the admin — has any visibility into why.


Connecting the Flow to the Canvas App

Back in your Canvas App, go to the Action tab in the top menu, then select Power Automate. Click Add flow and select the flow you just created. Power Apps will add it to the app's data connections.

Now complete Stage 3 of the submit button formula:

If(
    IsBlank(txtTitle.Text) || IsBlank(txtJustification.Text) || IsBlank(txtEstimatedCost.Text),
    Notify("Please complete all required fields before submitting.", NotificationType.Error),
    
    Set(gblIsSubmitting, true);
    
    Set(gblNewRequest,
        Patch(
            EquipmentRequests,
            Defaults(EquipmentRequests),
            {
                Title: txtTitle.Text,
                RequestorEmail: User().Email,
                EquipmentType: { Value: ddEquipmentType.Selected.Value },
                BusinessJustification: txtJustification.Text,
                Priority: { Value: ddPriority.Selected.Value },
                EstimatedCost: Value(txtEstimatedCost.Text),
                ApprovalStatus: { Value: "Pending" }
            }
        )
    );
    
    If(
        IsError(gblNewRequest),
        Set(gblIsSubmitting, false);
        Notify("Failed to save your request. Please try again.", NotificationType.Error),
        
        // Trigger the approval flow with full context
        EquipmentApprovalFlow.Run(
            gblNewRequest.ID,              // RequestID (Number)
            gblNewRequest.Title,           // RequestTitle (Text)
            gblNewRequest.RequestorEmail,  // RequestorEmail (Text)
            gblNewRequest.EquipmentType.Value, // EquipmentType (Text)
            gblNewRequest.Priority.Value,  // Priority (Text)
            gblNewRequest.EstimatedCost,   // EstimatedCost (Number)
            gblNewRequest.BusinessJustification // BusinessJustification (Text)
        );
        
        Set(gblIsSubmitting, false);
        Notify("Your request has been submitted and sent for approval.", NotificationType.Success);
        Navigate(MyRequestsScreen, ScreenTransition.Slide)
    )
)

The order here is intentional: Patch first, then Run. If the Patch fails, you don't trigger a flow pointing at a non-existent record. If the Run fails, the record still exists in a "Pending" state — which is correct. The flow failing to trigger is a recoverable situation (you can re-trigger manually or build a catch-up mechanism). A dangling flow with no record to update is not.

Key insight

EquipmentApprovalFlow.Run(...) is non-blocking. The formula continues to the next semicolon-separated statement immediately after calling it. You'll see Set(gblIsSubmitting, false) and the Notify and Navigate calls execute within milliseconds of triggering the flow, long before any approver has seen the notification. This is by design — you're not waiting for approval, you're confirming submission.


Surfacing Approval Status Back in the App

Now comes the half of the problem that most tutorials gloss over. How do you show the user what happened to their request after they've navigated away from the submission screen?

Building the My Requests Screen

Create a screen called MyRequestsScreen. Add a Gallery control connected to the EquipmentRequests SharePoint list, filtered to show only the current user's requests:

SortByColumns(
    Filter(
        EquipmentRequests,
        RequestorEmail = User().Email
    ),
    "ID",
    SortOrder.Descending
)

Warning

This Filter formula delegates to SharePoint, which supports equality comparisons on text columns. However, if your SharePoint list grows beyond 5000 items, verify that RequestorEmail is an indexed column in the SharePoint list settings. Without an index, this query will fail silently above the delegation threshold. For a thorough treatment of delegation and how to work around its limits, see Power Apps Performance Optimization: Delegation, Data Row Limits, and Reducing App Load Times.

Inside the Gallery, design each row to show the request title, submission date, and — most importantly — the approval status with a visual indicator. Add a label for the status:

ThisItem.ApprovalStatus.Value

Add a colored circle or rectangle beside it, with its Fill property driven by the status:

Switch(
    ThisItem.ApprovalStatus.Value,
    "Pending",   RGBA(255, 165, 0, 1),   // Orange
    "Approved",  RGBA(0, 128, 0, 1),     // Green
    "Rejected",  RGBA(220, 20, 60, 1),   // Red
    "Cancelled", RGBA(128, 128, 128, 1), // Gray
    RGBA(200, 200, 200, 1)               // Default fallback
)

This gives the user an at-a-glance status signal without reading the label text — important for accessibility and speed scanning.

The Request Detail Screen

When a user taps a request in the gallery, navigate to a RequestDetailScreen with the selected item as context:

// Gallery OnSelect
Navigate(RequestDetailScreen, ScreenTransition.None, { selectedRequest: ThisItem })

On RequestDetailScreen, use selectedRequest context variable to display all fields. For the approval outcome section, show a panel that only appears when the status is not Pending:

// Visible property of the approval outcome container
requestContext.selectedRequest.ApprovalStatus.Value <> "Pending"

Inside that container, show:

  • The approver's email: requestContext.selectedRequest.ApproverEmail
  • Their comments: requestContext.selectedRequest.ApproverComments
  • The approval date: Text(requestContext.selectedRequest.ApprovalDate, "[$-en-US]mmm d, yyyy h:mm AM/PM")

Implementing the Refresh Mechanism

Here's the nuance that separates a production approval app from a demo: the data the app displays is a snapshot from when the gallery was last loaded. If an approver acts on a request while the user has the app open, nothing on screen will change.

You have several options:

Option A: Manual Refresh Button

Add a refresh icon button to MyRequestsScreen:

// OnSelect of refresh button
Set(gblRefreshing, true);
Refresh(EquipmentRequests);
Set(gblRefreshing, false)

Refresh() forces the connector to re-fetch data from SharePoint rather than serving cached data. The gallery will automatically re-render because its Items formula references the data source. This is the simplest approach and appropriate when users understand they need to check for updates.

Option B: OnVisible Refresh

Set the OnVisible property of MyRequestsScreen to trigger a refresh every time the screen appears:

Refresh(EquipmentRequests)

This means every time a user navigates to this screen — from the submit screen, from the detail screen, from anywhere — the data refreshes automatically. The user experience is smooth because the navigation animation plays while the refresh happens. The trade-off is that every screen visit incurs a SharePoint API call.

Option C: Timer-Based Polling

Add a Timer control to MyRequestsScreen with these properties:

  • Duration: 30000 (30 seconds)
  • Repeat: true
  • AutoStart: true
  • OnTimerEnd: Refresh(EquipmentRequests)

This polls SharePoint every 30 seconds while the screen is visible. The timer only runs when its host screen is active, so it won't burn API calls while the user is on other screens. For a pending request where approval could happen any minute, this provides near-real-time status updates without requiring user action.

Tip

Combine Options B and C: use OnVisible for an immediate refresh on navigation and a 60-second timer for ongoing updates while the user stays on the screen. This covers both the "I just submitted and want to see it appear" case and the "I'm waiting to hear back" case.

Surfacing Status Updates on the Detail Screen

The detail screen has an additional challenge: the user is looking at a specific record that was passed as context via Navigate. That context record is a snapshot — it doesn't update automatically even if the underlying SharePoint item changes.

To solve this, modify the detail screen to re-fetch the specific record on load:

// RequestDetailScreen OnVisible
Set(
    gblCurrentRequest,
    LookUp(EquipmentRequests, ID = requestContext.selectedRequest.ID)
)

Then bind all your controls to gblCurrentRequest instead of requestContext.selectedRequest. Now every time the user navigates to or returns to the detail screen, they get fresh data.

Add a Refresh button on the detail screen too:

// OnSelect
Set(
    gblCurrentRequest,
    LookUp(EquipmentRequests, ID = gblCurrentRequest.ID)
);
Notify(
    If(gblCurrentRequest.ApprovalStatus.Value = "Pending",
        "No update yet — still awaiting approval.",
        "Status updated: " & gblCurrentRequest.ApprovalStatus.Value
    ),
    NotificationType.Information
)

This gives the user feedback even when nothing has changed, which is better UX than a silent refresh that leaves them uncertain whether the check happened.


Passing Structured JSON Context for Complex Scenarios

The parameter-by-parameter approach works well for the scenario above. But what if your approval workflow needs to pass a variable-length list of items? Or a nested record structure — like a purchase request that contains multiple line items?

The Power Apps (V2) trigger supports passing JSON as a text parameter. This is an escape hatch for complex data structures.

In your trigger, define a single Text parameter named RequestPayload. In your Canvas App, build the JSON string using the JSON() function:

Set(gblRequestPayload,
    JSON(
        {
            requestID: gblNewRequest.ID,
            requestorEmail: gblNewRequest.RequestorEmail,
            lineItems: gblRequestLineItems,  // A collection of records
            metadata: {
                submittedAt: Text(Now(), "yyyy-mm-dd hh:mm:ss"),
                appVersion: "2.4.1",
                environment: gblEnvironmentName
            }
        },
        JSONFormat.IndentFour
    )
)

Then pass gblRequestPayload as the RequestPayload parameter to the flow. Inside the flow, use the Parse JSON action to unpack it:

{
    "type": "object",
    "properties": {
        "requestID": { "type": "integer" },
        "requestorEmail": { "type": "string" },
        "lineItems": {
            "type": "array",
            "items": {
                "type": "object",
                "properties": {
                    "itemName": { "type": "string" },
                    "quantity": { "type": "integer" },
                    "unitCost": { "type": "number" }
                }
            }
        },
        "metadata": {
            "type": "object",
            "properties": {
                "submittedAt": { "type": "string" },
                "appVersion": { "type": "string" },
                "environment": { "type": "string" }
            }
        }
    }
}

After parsing, you can use body('Parse_JSON')?['lineItems'] in an Apply to each loop to process line items individually — calculating totals, checking inventory, or generating a formatted line-item table in the approval notification email.

Note

The JSON() function in Canvas Apps produces standards-compliant JSON, but it encodes date/time values as ISO 8601 strings. If your flow needs to do date arithmetic on those values, use the Power Automate formatDateTime() function to parse them back into date objects within the flow.


Multi-Stage Approval Patterns

Many real-world approval processes have multiple stages: team lead approves first, then finance, then legal for contracts above a certain value. Building this in Power Automate with Canvas App integration requires thinking about how status is communicated through each stage.

The cleanest pattern is to extend your ApprovalStatus choice column with stage-specific values:

  • "Pending" — submitted, awaiting first approval
  • "Stage1Approved" — team lead approved, awaiting finance
  • "Stage2Approved" — finance approved, awaiting legal (for high-value requests)
  • "Approved" — fully approved
  • "Rejected" — rejected at any stage (include which stage in ApproverComments)

Your Power Automate flow uses sequential approval steps, updating the SharePoint record's ApprovalStatus between each stage:

1. Update item → ApprovalStatus: "Pending"
2. Start and wait for approval (Team Lead)
3. If approved → Update item → ApprovalStatus: "Stage1Approved"
4. Start and wait for approval (Finance)
5. If approved → Update item → ApprovalStatus: "Stage2Approved"
6. [Conditional] Start and wait for approval (Legal)
7. If approved → Update item → ApprovalStatus: "Approved"

In the Canvas App, your status display logic handles these intermediate states gracefully:

Switch(
    gblCurrentRequest.ApprovalStatus.Value,
    "Pending",         "Submitted — awaiting team lead review",
    "Stage1Approved",  "Team lead approved — awaiting finance review",
    "Stage2Approved",  "Finance approved — awaiting legal review",
    "Approved",        "Fully approved ✓",
    "Rejected",        "Not approved",
    "Unknown status"
)

This turns what could be a confusing black box into a meaningful progress indicator. Users understand where they are in the process and can set appropriate expectations — which dramatically reduces "where's my request?" support tickets.


Building a Manager's Approval Dashboard

The approver side of this equation matters as much as the requestor side. A complete approval workflow app typically has a separate screen (or separate app entirely) for managers to see pending approvals, review context, and act — without having to leave Power Apps and go to Outlook.

Add a ManagerDashboardScreen with a gallery filtered to show pending requests across all users (not just the current user):

Filter(
    EquipmentRequests,
    ApprovalStatus.Value = "Pending"
)

Tip

Lock this screen behind a role check so only designated approvers can reach it. The pattern for checking Azure AD group membership to control screen access is covered in Implementing Role-Based Screen Access and Dynamic UI in Canvas Apps Using Azure AD Group Membership. Without this guard, any user who discovers the navigation path can see all pending requests.

On the approval detail screen, add Approve and Reject buttons. These buttons should trigger a second Power Automate flow — not the approval flow itself, but a companion flow that records an out-of-band decision. This is useful when the approver is using the Canvas App rather than the email/Teams notification.

The companion flow's trigger parameters:

  • RequestID — Number
  • Decision — Text ("Approved" or "Rejected")
  • Comments — Text
  • ApproverEmail — Text

The flow logic is simple: use Update item to write the decision back to SharePoint. Because this bypasses the Power Automate approval action entirely, you also need to call Cancel a flow run on the original waiting flow to prevent a zombie approval process from lingering.

Cancelling a flow run from within another flow requires the Power Automate Management connector (Premium), which lets you call:

  • List flow runs — find the run ID for the specific request
  • Cancel a flow run — terminate that run

Alternatively, store the original flow's run ID in the SharePoint record's FlowRunID field (you'll need to use the synchronous response approach to get this ID back from the original flow trigger, then use a "Fire and Respond" pattern), and pass it into the companion flow as a parameter.


Hands-On Exercise

Build the complete equipment request approval workflow described in this lesson. Here's your exercise checklist:

Data Setup (15 minutes)

  1. Create the EquipmentRequests SharePoint list with all columns described in the "Setting Up Your Data Source" section
  2. Add 3 sample records manually with different ApprovalStatus values so you can verify your gallery display logic before the flow is complete

Canvas App — Submission Screen (30 minutes)

  1. Create a new Canvas App and connect it to your SharePoint list
  2. Build the SubmitRequestScreen with all form controls
  3. Implement the full btnSubmitRequest formula including validation, Patch, and flow trigger (you can stub the flow trigger with a Notify for now)
  4. Add a loading spinner overlay that appears while gblIsSubmitting is true: set a semi-transparent rectangle's Visible to gblIsSubmitting and place a spinner control or animated label on top of it

Canvas App — My Requests Screen (20 minutes)

  1. Build the MyRequestsScreen gallery with status color indicators
  2. Implement the OnVisible refresh and 60-second timer polling
  3. Test that navigating back from the detail screen triggers a refresh

Canvas App — Detail Screen (20 minutes)

  1. Build RequestDetailScreen with the OnVisible LookUp to gblCurrentRequest
  2. Show the approval outcome panel conditionally
  3. Add the refresh button with descriptive feedback notification

Power Automate Flow (30 minutes)

  1. Create the EquipmentApprovalFlow with the Power Apps (V2) trigger
  2. Add cost-based routing conditions
  3. Add at least one Start and wait for an approval action
  4. Write the approval outcome back to SharePoint in both Approve and Reject branches
  5. Add the FlowRunID response before the approval wait

Integration (20 minutes)

  1. Connect the flow to your Canvas App via the Action tab
  2. Complete the btnSubmitRequest formula with the actual EquipmentApprovalFlow.Run(...) call
  3. Submit a test request and verify: (a) the SharePoint record appears with Pending status, (b) you receive the approval notification, (c) after approving, the SharePoint record updates, (d) refreshing the app shows the updated status

Stretch Goal: Add a ManagerDashboardScreen with a gallery of all pending requests and a simplified approve/reject interface that triggers the companion flow.


Common Mistakes & Troubleshooting

"The flow doesn't appear in the Power Apps Action panel"

The flow must be saved and turned on before it appears. Also verify that the flow was created under the same account that owns the Canvas App. Flows created by other users won't appear unless they're shared with you. Check in the Power Automate portal under "Shared with me."

"Patch succeeds but the flow receives wrong or empty values"

The most common cause: you're passing gblNewRequest.EquipmentType (which is a record {Value: "Laptop", ...}) when the flow expects the string "Laptop". Always access .Value for SharePoint Choice columns: gblNewRequest.EquipmentType.Value.

Similarly, EstimatedCost is returned by SharePoint's Patch as a number, but if the user typed "1,500" with a comma, Value(txtEstimatedCost.Text) will return blank. Use Power Apps Data Validation: Using If, IsBlank, and IsMatch to Prevent Bad Data in Forms patterns to validate numeric input before attempting the Patch.

"The approval notification is sent but the flow never updates SharePoint"

This almost always means the approval action timed out without being responded to, and you don't have a timeout handler. Check the flow run history in Power Automate — the run will show as "Succeeded" if the approval was completed or "Running" if it's still waiting. Cancelled runs show separately.

Also verify that the approver email address is correct. If the email address is invalid, the approval action throws an error that the flow run history will describe clearly.

"Refresh(EquipmentRequests) doesn't show updated data"

Refresh() invalidates the connector's cache and re-fetches data, but it's not instantaneous. If you call Refresh() and immediately read a value from the data source in the same formula chain, you may still see cached data. Canvas Apps evaluates formulas in a reactive manner, so after Refresh() completes, controls bound to the data source re-render automatically. If you're using LookUp() to populate a variable in the same OnSelect as the refresh, add a brief Timer delay or restructure so the LookUp happens in the gallery's OnSelect after navigation, not in the same button press.

"The app shows Pending even after the flow approved the request"

First, verify the flow's Update item action completed successfully (check Power Automate run history). If it did, the SharePoint record should have the new status. If the app still shows Pending, it's a caching issue — call Refresh(EquipmentRequests) and then re-run your LookUp. If LookUp returns the right value but your control displays the wrong one, check that the control is bound to gblCurrentRequest (the refreshed variable) and not requestContext.selectedRequest (the original navigation context).

"The flow errors with 'Invalid type for parameter RequestID'"

The Power Apps (V2) trigger is strict about types. If you defined RequestID as Number in the trigger but pass a text string from the app, the flow will reject it. In Canvas Apps, gallery items return SharePoint list item IDs as numbers natively. However, if you constructed the ID from a text field somewhere, wrap it in Value() before passing it to the flow.

"Users who didn't create the app get a connection permission error"

When you share the Canvas App, the connections embedded in the app (SharePoint, Power Automate) run under each user's own identity by default. If a user hasn't authorized the SharePoint or Power Automate connector, they'll see an error on first launch. Walk users through the connection authorization prompt, or consider whether a service account connection makes sense for your scenario. See Power Apps Security: Roles, Sharing, and Data Permissions for the full picture on connection ownership and sharing models.


Summary & Next Steps

You've built the full approval circuit: form submission with validation, synchronous Patch that captures the new record's ID, asynchronous flow trigger with typed parameters, approval routing based on business rules, outcome writing back to the data source, and status surfacing in the app via refresh mechanisms. That's a genuinely production-ready pattern.

The design decisions we made throughout — write-then-trigger instead of trigger-then-write, explicit status values instead of boolean flags, polling instead of push — aren't arbitrary. They reflect the actual constraints and failure modes of distributed systems where humans are part of the process. An approval workflow that only works when everything goes right isn't useful. The one you've built handles flow failures, approval timeouts, re-fetching stale data, and type mismatches.

A few directions you can take this further:

Notifications in Teams: The approver doesn't have to live in Outlook. The Power Automate Teams connector lets you send adaptive cards directly to a Teams channel or chat, with approve/reject buttons built into the card itself. The approval action in Power Automate handles the response collection regardless of where the notification was delivered.

Delegation and escalation: Add a time-based escalation so that if the first approver doesn't respond within 48 hours, the approval automatically escalates to their manager. This requires a parallel timer branch in your flow and a lookup table for the management hierarchy.

Audit trail: The ApproverComments field we write back captures the approver's note, but a true audit trail stores every status change. Consider creating a companion EquipmentRequestAudit list where the flow appends a new record at each stage — who approved, when, what their comments were. Surface this in the app as a timeline view on the detail screen.

Automated testing: Approval workflows are notoriously difficult to test manually because they involve waiting for human responses. The article on Power Apps Canvas App Automated Testing: Building Test Suites with Test Studio and Power Automate for CI/CD Pipelines covers how to mock flow responses for automated testing.

Publishing and distribution: When you're ready to push this to users, review the deployment patterns in Publishing and Sharing Your Canvas App: Environments, Versions, and App Distribution for End Users — particularly around environment promotion and how to avoid overwriting production flows when you update the app.

The approval workflow pattern you've learned here scales from a 5-person team to an enterprise rollout. The architecture doesn't change — only the routing rules, the number of approvers, and the complexity of the notifications grow. You now have the foundation to handle all of it.

Work With Us

From insight to implementation

Reading is the start. When you're ready to build the data, automation, or AI systems behind it, our team turns strategy into shipped results.

Let's Build

Canvas Apps 101

Previous

Canvas App Email Integration: Triggering Outlook Emails from Button Controls Using Power Automate and Passing Dynamic Form Data as Parameters

Related Insights

Power AppsPractitioner

Configuring Dataverse Table-Specific Security Role Privileges and Access Depth Levels in Model-Driven Apps

26 min
Power AppsPractitioner

Canvas App Email Integration: Triggering Outlook Emails from Button Controls Using Power Automate and Passing Dynamic Form Data as Parameters

20 min
Power AppsFoundation

Configuring Model-Driven App Form Component Library: Adding, Ordering, and Locking Sections, Columns, and Subgrids Using the Classic and Modern Form Designers

19 min

On this page

  • Introduction
  • Prerequisites
  • Understanding the Architecture Before You Build
  • Setting Up Your Data Source
  • Building the Submission Form in Canvas Apps
  • Creating the Power Automate Flow
  • Defining Trigger Inputs
  • Building the Approval Routing Logic
  • Writing the Approval Outcome Back to SharePoint
  • Adding a Timeout Handler
  • Connecting the Flow to the Canvas App
  • Surfacing Approval Status Back in the App
  • Building the My Requests Screen
  • The Request Detail Screen
  • Implementing the Refresh Mechanism
  • Passing Structured JSON Context for Complex Scenarios
  • Multi-Stage Approval Patterns
  • Building a Manager's Approval Dashboard
  • Hands-On Exercise
  • Common Mistakes & Troubleshooting
  • "The flow doesn't appear in the Power Apps Action panel"
  • "Patch succeeds but the flow receives wrong or empty values"
  • "The approval notification is sent but the flow never updates SharePoint"
  • "Refresh(EquipmentRequests) doesn't show updated data"
  • "The app shows Pending even after the flow approved the request"
  • "The flow errors with 'Invalid type for parameter RequestID'"
  • "Users who didn't create the app get a connection permission error"
  • Summary & Next Steps