Power Automate: Power BI alerts to be sent by email from an excel file based on condition

I will explain how to send a list of emails from an excel file using Power Automate after creating alerts in Power BI but emails will be sent only if they comply with some conditions. Before to start, I will need:

  • To have my excel file in the cloud (onedrive, sharepoint, etc.) and that I have formatted my data into a table
    power bi power bi
  • To have created my alarms, if you don’t know how, read Power BI: create an alert for notification

Now that I have my alert, I will click on “use power automate…”:

power bi

I will be directed to it then follow the instruction to reach the flow setup. As you can see, the “invalid parameters” is showing in red so I will click on it and I just have to select my alert called “unix”:

power bi

I will click now on the “+” to add a first action:

power bi

At this point, I may be asked to sign in if not done yet. Once done, in the search bar, I will put “list row” then select “list rows present in a table”:

power bi

Fill up all fields about the location of the excel file and the name of my table then click again to the “+” to add a second action:

power bi

In the search bar, put “apply each” then select “control – apply to each”:

power bi Click on the field to make appear the “lightning” icon: power bi

Click on it to select “body/value” (make sure to select it from the correct excel action, for instance, if I have 1 list rows and 1 update row, I have to select the one from the list rows):

power bi

Click to the “+” of “apply to each” to add a third action:

power bi

In the search bar, put “condition” then select “control – condition”:

power bi

Fill up the fields (again, make sure to select it from the correct excel action):

power bi
  • Click on the “choose a value” (left one) in order to click on the “lightning” icon to select the excel column, for my example, it will be “type”
  • Click on the “is equal to” to select the one that fits best for me
  • Click on the “choose a value” (right one) to put manually the value of the excel file for the selected column, for my example, it is “yes” so only email with “type = yes” will receive a notification. Since it is case sensitive, I have to put it exactly as in my excel file so if the value was "Yes", I will have to put "Yes"

Click to the “+” of “true” to add a fourth action:

power bi

In the search bar, put “send email” then select “office 365 outlook - send an email (V2)”:

power bi

Click on “switch to advanced mode”:

power bi

Click on the “to” field to make appear the “lightning icon” then click on it in order to select “email”:

power bi power bi

For the other fields:

  • In the “subject”, put manually or if in my excel file, I have a “subject” column, use the “lightning icon”
  • In the “body”, write manually the content and if in my excel file, for instance, I have a “name” column, use the “lightning icon” to personalize my email
  • In the “advanced parameters”, add some options like from, CC, BCC, etc.
  • In the “importance”, choose the one that fits best for me

NOTE: each time that I am selecting a column from my excel file, I will make sure to select it from the correct excel action

power bi

I will change the name of the flow by clicking on the title (on the top just next to “back”). Once done, to finish, I just have to save it:

power bi

Interesting Topics