Power Automate error handling: scopes, run-after and retry patterns

Make document flows production-ready with Try/Catch/Finally scopes, failure notifications and safe retries.

LevelIntermediate
Time30 minutes
TopicPower Automate fundamentals

You'll need

  • A working flow to harden

Why flows fail silently

By default a failed action fails the whole run, and nobody is told unless they check run history. In document workflows that means agreements never sent or files never filed.

The Try / Catch / Finally pattern

  1. Add a Scope named Try and move your main actions into it.
  2. Add a second Scope named Catch. Click …→ Configure run after and tick has failed and has timed out only.
  3. Inside Catch, get the error details and notify someone.
  4. Add a third Scope Finally set to run after Catch is successful, failed, skipped or timed out — for clean-up and logging.
Error details for the notification
result('Try')

Build a readable error message

Filter failed actions inside the Try scope
// Filter array action
From:      result('Try')
Condition: item()?['status']  is equal to  Failed

// Message for the alert (Compose)
first(body('Filter_array'))?['error']?['message']

Retry policies

Each connector action has Settings → Retry policy. Use exponential retry for HTTP and Adobe API calls (e.g. 4 retries). Don't retry 'send agreement' blindly — you could send duplicates. Instead, check whether an agreement ID was stored before retrying.

Terminate with the right status

End the Catch scope with Terminate (status Failed) so the run shows as failed in history and alerts fire — otherwise the run looks successful because Catch succeeded.

Tips

  • Log every run (success or failure) to a SharePoint list for an audit trail.
  • Use a shared mailbox or Teams channel for alerts, not one person's inbox.