(+351) 21 24 10006  ·  info@bconcepts.pt
Carnaxide, Lisbon

Error Handling in Power Automate: Step by Step

João Barros 06 de July de 2026 4 min read

A Power Automate flow that fails silently is a problem waiting to happen: the process stops halfway and nobody notices until a customer complains. With the Try-Catch pattern, built with Scope actions and the Configure run after option, your flow starts catching errors, logging them, and alerting you automatically. This guide walks through error handling in Power Automate step by step, with a simple example you can reuse in any project.

Prerequisites

  • An account with access to Power Automate (a Microsoft 365 plan or a trial version).
  • A cloud flow (automated or instant) you want to add error handling to.
  • Permission to send an email through Outlook or post in Microsoft Teams, for the notifications.
  • Basic knowledge of the flow editor and how to add actions.

Step 1: Group the main logic in a Scope

The Scope action works like a box that groups several actions and treats them as a single block. Open your flow in the editor, add a Scope action, and rename it to "Try". Move every action that does the real work into it: reading data, creating records, sending files. The benefit is clear: if any action inside fails, the whole Scope is marked as failed, giving you one single place to react instead of handling each error separately.

Step 2: Create the "Catch" Scope to react to failures

Add a second Scope right after the first one and name it "Catch". By default, an action only runs when the previous one succeeds — and we want exactly the opposite. Click the three dots (...) on the "Catch" Scope, choose Configure run after, and enable the has failed, is skipped, and has timed out options, leaving has succeeded unchecked. From now on, "Catch" only runs when "Try" does not finish cleanly.

Step 3: Filter the action that failed

Inside "Catch", add a Filter array action to isolate only what went wrong. In the From field, use the result() function to get the status of every action in the "Try" Scope:

result('Try')

Then, in the condition's advanced mode, keep only the failed (and timed-out) actions with this expression:

or(equals(item()?['status'], 'Failed'), equals(item()?['status'], 'TimedOut'))

The result is a list containing only the problem actions, each with its name, code, and the error object returned by the connector.

Step 4: Send a notification with the error

Still inside "Catch", add the Send an email (V2) action from Outlook or Post message in a chat or channel from Teams. In the message body, show the message of the first failed action with this expression:

first(body('Filter_array'))?['error']?['message']

A direct subject line, such as "Billing flow failure", helps the team triage the problem in seconds, even before opening Power Automate.

Step 5: Guarantee cleanup with a "Finally" Scope

If there are actions that must always run, no matter what — like logging the end of the execution or closing a connection — create a third Scope called "Finally". Set the Configure run after of "Finally" to all four options (has succeeded, has failed, is skipped, and has timed out). This ensures that logic runs on both the success path and the error path.

Tip: keep the "Try" Scope focused. The smaller and more specific it is, the easier it is to interpret the error it returns.

Check the result

To test, force an error on purpose: point an action at a file that does not exist or use an invalid value. Save and run the flow. In the run history, "Try" should appear in red (failed) and "Catch" in green (succeeded), and you should receive the notification with the error message. If "Catch" stays grey (skipped), review Configure run after: almost certainly the has failed option was left unchecked.

Conclusion

With just three Scopes and the Configure run after option, you have turned a fragile flow into a process that explains itself when it fails, saving hours of blind investigation. The next step is to standardize: save this Try-Catch-Finally template as a reference flow and reuse it across every project. Which critical flow will you protect first with this pattern?