DEV Community

Cover image for Auto-reply Automation: Scale & Resilience (pt.5)
Adewale Megbabi
Adewale Megbabi

Posted on

Auto-reply Automation: Scale & Resilience (pt.5)

Image descriptionMy Mission: To Add Error Handling, As Well As Summary Report.

✅ 1. Implementing Retry & Error Handling in Power Automate.
The flow works just fine, but what happens if it fails? In this article, I will be iterating further the tool built so far by adding scalability and resilience to the product to make it fail proof, and whenever it fails, there is always a message log notifying you.

  • Configure Retry Policies
  1. Go to each action (e.g., “Send email”, “Create item”, “Post message in a chat or channel”).
  2. Open the settings (⋯) → Settings → set retry policy to Automatic (4 retries) with exponential intervals.

Image showing retry policy configuration

The image above is a configuration for just one out of the seven actions. Complete the set-up for others as shown above.

  • Add a “Scope” Step for Error Logging
  1. Wrap your main steps in a Scope action.
  2. Add another Scope labeled “On Error” using the “Configure run after” option.
  3. Set to run if the main scope fails or is skipped.

Image showing scope being created

Image shown

Image shown

Image shown

Image shown

Image shown

Image shown

  • Log Errors to SharePoint or Teams.
  1. Inside the error Scope, add “Create item” in a new SharePoint list (Email Error Logs) or send a Teams message indicating failure.
  2. Include dynamic details: Flow name, timestamp, error message.

Image shown

✅ 2. Add Daily Summary Report.

  • Store execution logs in SharePoint list from previous steps.
  • Create a Scheduled Flow:
  1. Trigger: Recurrence (daily)
  2. Action: "Get items" from your SharePoint logs.
  3. Action: Send an email summary, listing today's activity or errors to a designated inbox.

Image shown

Image shown

Image shown

Expression: ReceivedTimes eq '@{formatDateTime(utcNow(),'MM/dd/yyyy HH:mm tt')}'

Top comments (0)