PAD + CloudError Handlingteamsnotificationserror-handling

Teams Error Notification

Posts a formatted Adaptive Card to a Microsoft Teams channel whenever a PAD flow encounters an unhandled error. Includes the flow name, failed step, error message, machine name, and timestamp — everything on-call staff need to triage without opening the PAD console.

Members OnlySign in or create a free account to view and copy this pattern.

Usage Notes

  • Replace varWebhookUrl with your Teams channel Incoming Webhook URL (Teams → channel settings → Connectors → Incoming Webhook).
  • varFlowName and varFailedStep are set at the top of your main flow so every error notification is self-identifying.
  • The payload is a minimal Adaptive Card — paste it into the Adaptive Cards Designer to customise colours and layout.
  • Wrap this in your ON BLOCK EXIT handler so it fires automatically on any unhandled exception.
  • For Cloud flows, swap Web.InvokeWebService with the HTTP connector action — the payload JSON is identical.

Requirements

  • Power Automate Desktop 2.30+ or Power Automate Cloud
  • Microsoft Teams Incoming Webhook URL
  • Variables: varWebhookUrl (Text), varFlowName (Text), varFailedStep (Text), varErrorMessage (Text)