Try/Catch error handling in Power Automate with scopes
Stop silent flow failures. Use Try, Catch and Finally scopes, configure run after correctly, and send a useful alert with a link to the failed run.
What you'll learn
- Build Try, Catch and Finally scopes
- Configure run after for failed and timed-out actions
- Find the error message with result()
- Send an alert that links straight to the failed run
On this page
By default, when an action fails the flow simply stops. Nobody is told, and you find out days later. Scopes fix that.
The pattern
Add three Scope actions:
- Try — all your normal actions go inside.
- Catch — runs only if something in Try fails.
- Finally — optional; runs every time, for clean-up or logging.
Configure run after
Open the Catch scope's settings, choose Configure run after, and tick has failed and has timed out for the Try scope. Untick is successful.
In code view, the setting looks like this:
"runAfter": {
"Try": ["Failed", "TimedOut"]
}Find out what went wrong
Inside Catch, add a Filter array on the results of the Try scope to keep only the failed action:
// From
result('Try')
// Condition
item()?['status'] is equal to 'Failed'The error message is then available with:
first(body('Filter_array'))?['error']?['message']Link to the failed run
This expression builds a direct link to the run history, so whoever gets the alert can open the failed run in one click:
concat(
'https://make.powerautomate.com/environments/',
workflow()?['tags']?['environmentName'],
'/flows/', workflow()?['name'],
'/runs/', workflow()?['run']?['name']
)Send the alert and fail properly
- Post a message to Teams (or send an email) with the flow name, the error message and the run link.
- Add Terminate with status Failed at the end of Catch.
Without Terminate, the flow shows as Succeeded because the Catch scope ran fine — which hides the problem from your run history and monitoring.
Make it reusable
Put this pattern in a template flow or copy the scopes between flows. Once every flow has it, silent failures disappear.