Search code examples
azure-logic-appspower-automateazure-automationazure-alerts

How to write triggered Azure alerts to the one note/Excel file via Microsoft Power Automate


I have set up multiple Azure alerts to monitor Azure web apps performance(4xx, 5xx, Response time). When any of the alerts rule triggers, it fires up an alert to my Microsoft outlook email.

I want to write those alert details such as alert name, date, and email subject into either One Note or Excel file every time these alerts are fired so that I can keep track of these alerts.

I tried the Microsoft Power Automate tool. They have a specific template where any new email arrives; it filters the email subject and then creates issues/Tasks/Bug on Azure DevOps. I couldn't find a template that writes certain alert details to the excel file or One Note.

Is there a better way to do this?


Solution

  • I tried the Microsoft Power Automate tool. They have a specific template where any new email arrives; it filters the email subject and then creates issues/Tasks/Bug on Azure DevOps. I couldn't find a template that writes certain alert details to the excel file or One Note.

    Based on your requirement ,In power Automate tool we don't have any predefined template to record the alert name, alert triggered time, subject of the alert from the email to the excel sheet directly.

    We have written a custom work flow in power automate using outlook connector, excel for business connector ,compose function tested in our local environment which is working fine as shown below

    enter image description here

    Since the alert email body is in Html format , we have used the contentversion connector to covert the email body to text format. Later we have used compose function to pull the alert triggered time , subject of the alert Here are the expressions we have used in compose to pull alert triggered time , subject
    For Alert triggered time :

    first(split(last(split(outputs('Html_to_text_2')?['body'],'at ')),'Rule ID'))
    

    For Subject :

    split(triggerOutputs()?['body/subject'],'Severtiy:3 ')
    

    enter image description here

    enter image description here

    Here is the sample output for reference :

    enter image description here