Study FAQ
How do I handle failures and timeouts with scopes and Run after in Power Automate?
Also asked as 2
- How do I create a try and catch path in a Power Automate cloud flow?
- How do I keep a handled error from looking like successful business work?
Answer
Group the work in a scope and configure a failure handler's Run after options to run when that scope fails or times out. On the success path, inspect any returned business outcome before treating the operation as complete. A child can return a valid Rejected response even though the call itself succeeded.
For example, put the child call and required bookkeeping inside a Process scope. Wire the handler to failure and timeout, and wire a distinct branch to successful execution. If a later housekeeping scope must run along both paths, account for a skipped handler on the success path. Inspect the actual dependency graph in the designer.
Capture a stable request key, the run identifier from workflow(), the failing stage, and a safe error classification. Use result('Process') to inspect eligible actions inside the scope. Keep raw payloads and secrets out of general notifications. Preserve the initial failure if the diagnostic write fails. A Terminate action can explicitly mark an unrecoverable technical failure as failed.
Use a disposable dependency to exercise the timeout and failure paths. Inspect action statuses, emitted diagnostics, and the persisted business state. If a timed-out write might have committed, leave its outcome unresolved until the target is checked.
Microsoft references
Full explanation
AB-400: Reliable Cloud Flows and Copilot Studio Workflows
Study guide · AB-400
Read the full explanation