Hi@Venkat karidi Thank you for posting your question. Happy to assist!
I see that you are looking for script that should trigger email alerts for Azure-backup "failed" jobs. You can use this command - https://learn.microsoft.com/azure/backup/backup-azure-vms-automation#monitoring-a-backup-job should help meet your requirement.
You can we also check if you have considered our built-in alerting solution to meet your same requirement: https://learn.microsoft.com/azure/backup/move-to-azure-monitor-alerts
Hope this help!
----------------------------------------------------------------------------------------------------------------------
If the response helped, do "Accept Answer" and up-vote it