Part 1: Modify Your PAD Flow with Error Handling
Use a Try-Catch block in Power Automate Desktop:
Wrap your actions in a "Begin Error-Handling Block"
Use "Begin Error Handling" before your Excel automation steps.
End it with "End Error Handling".
In the “On Error” block, insert a Web API call to a cloud Power Automate flow to send a Teams message.
Part 2: Create a Power Automate Cloud Flow (Free Standard)
Trigger: Use the HTTP Request trigger.
This will give you a URL that PAD can call when an error happens.
Actions:
Post message in Teams
Use action: Post a message in a chat or channel
Fill with dynamic info:
Alert: Power Automate Desktop Flow Failed
Error: %errorMessage%
Machine: %machineName%
Flow Name: %flowName
Part 3: Call the Cloud Flow from PAD
In the “On Error” block of PAD:
Use “Invoke Web Service” (GET or POST) to call your cloud flow HTTP URL.
Optionally send a JSON body like:
{
"flowName": "Daily Excel Refresh",
"errorMessage": "%LastError.Message%",
"machineName": "%ComputerName%"
}