Announcements
Hi @CU31121115-0, The best and most verified approaches to trigger a Power Automate flow from a Code App are listed below.
1. HTTP Request (Best for Decoupled Execution) The most reliable method for a code-first application to trigger a specific flow is to use the When an HTTP request is received trigger in Power Automate. This creates a REST API endpoint that your Code App can call using standard JavaScript fetch or XMLHttpRequest. Best approach if it's a standalone web application (hosted separately).
fetch
XMLHttpRequest
How it works:
Pros: Instant execution; allows passing complex JSON data; standard web development pattern.
Cons: The URL acts as a public endpoint (unless secured with complex OAuth headers); requires managing the URL in your code config.
2. Dataverse Web API / Custom Action (Best for Security & Integration) Since the Code App SDK is explicitly designed to Connect to Dataverse, the most "native" approach is to trigger the flow indirectly via a Dataverse event. This is the best approach if your app runs inside the Power Platform host, as it reuses the authenticated user session.
Option A: Custom API (Unbound Action)
Hope this helps!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 577
WarrenBelz 440 Most Valuable Professional
Haque 308