# How do I call a Power Automate flow from a Power Apps code app?

Exam: AB-400 — Power Platform Developer Associate
Knowledge domain: Extend the user experience (25–30%)
Updated: 2026-11-25T06:47:19.556433+00:00
HTML: https://learningpathx.com/faq/AB-400/ab400-power-apps-code-app-invoke-solution-flow.html

## Also asked as

- Which flows can a code app invoke, and how do I check the response?
- How can I attach a flow to a code app and handle its typed result?

Attach a **solution-aware instant cloud flow with a Power Apps trigger** from the configured environment. Use `@microsoft/power-apps` version 1.1.1 or later and a maker account with access to the flow and its required connections. Verify the intended users' Dataverse access and required roles, which may include App Opener or an equivalent role.

From the initialized app's root, run `pa app list-flows`, then `pa app add flow --flow-id <flow-id>` using the discovered ID. Review the generated service and configuration. Invoke the generated static `Run` method using its exact inputs and interpret its `success`, `data` and `error`. Successful triggering and business acceptance are separate pieces of evidence. Agree on a response contract with the flow owner before showing a business success message.

When the definition changes, re-add the same flow ID and inspect the new generated interface. Test an accepted response, an explicit rejection and an unavailable connection with the intended user. If the flow follows a row save, keep the saved row outcome visible when the flow rejects or times out. Resolve an uncertain submission before inviting a repeat. Removing the flow reference from the code app removes that integration from the project, while the shared flow has its own lifecycle.

[Add Power Automate flows to a code app](https://learn.microsoft.com/en-us/power-apps/developer/code-apps/how-to/add-flows)

Source: [AB-400: Building Code Apps with Dataverse and Automation](https://learningpathx.com/news/ab-400-building-code-apps-with-dataverse-and-automation.html)
