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
- Add a Scope named
Tryand move your main actions into it. - Add a second Scope named
Catch. Click …→ Configure run after and tick has failed and has timed out only. - Inside
Catch, get the error details and notify someone. - Add a third Scope
Finallyset to run after Catch is successful, failed, skipped or timed out — for clean-up and logging.
result('Try')Build a readable error message
// 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.