My 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
- Go to each action (e.g., “Send email”, “Create item”, “Post message in a chat or channel”).
- Open the settings (⋯) → Settings → set retry policy to Automatic (4 retries) with exponential intervals.
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
- Wrap your main steps in a Scope action.
- Add another Scope labeled “On Error” using the “Configure run after” option.
- Set to run if the main scope fails or is skipped.
- Log Errors to SharePoint or Teams.
- Inside the error Scope, add “Create item” in a new SharePoint list (Email Error Logs) or send a Teams message indicating failure.
- Include dynamic details: Flow name, timestamp, error message.
✅ 2. Add Daily Summary Report.
- Store execution logs in SharePoint list from previous steps.
- Create a Scheduled Flow:
- Trigger: Recurrence (daily)
- Action: "Get items" from your SharePoint logs.
- Action: Send an email summary, listing today's activity or errors to a designated inbox.
Expression: ReceivedTimes eq '@{formatDateTime(utcNow(),'MM/dd/yyyy HH:mm tt')}'
Top comments (0)