Sending alerts to notify your whole team

Erik Hamoen
4 min readDec 23, 2020

In my previous post, I explained how you could create variable thresholds in Power BI for your alerts. In this post, I will explain how you could notify your whole team that something is wrong. For example, if you are working with a data warehouse and want to inform your team that the latest data load has failed, so the current data isn’t up-to-date.

In this post, I will continue with my CPU alert, and I will use the following software to inform my team:

  • Power BI Dashboard (to create my alert)
  • Adaptive Card designer (to design my alert)
  • Power Automate (to send my alert)
  • Teams (to receive my alert)

I have to thank Chris Webb who described this idea!

At the end of my previous post, we created an alert for when my CPU was above the average, plus five more. We will use this alert in Power Automate. We create a new Automated cloud flow, give it a name, and chose the flow’s trigger: When a data driven alert is triggered.

Pick the correct trigger

In the next screen, we can choose which alert will be our trigger. This is our CPU HIGH!, which we created for our IsAboveAverageThreshold:

Select your alert.

After that, we chose the next action. Because we want to inform our team, we decide to post to a channel, and not a person. This could be useful if you only want to inform the admin for example.

Pick Post your own adaptive card as the Flow bot to a channel (Preview)

I created a team, especially for this demo, where it will send the alerts to:

Chose the Team and Channel

It only has one channel, so it will send this to General.

Now comes the important part: Building the message! Before we go to the Adaptive Card designer I would advise to already fill in these values:

Picking the dynamic values

You can then copy them to the designer. If you paste them you get this as a result. You can use them for your card.

JSON code of dynamic values

In the designer, you can create your own JSON cards. For this example, we create a very basic card with Title, Threshold Value, Actual value, and a URL to the dashboard. I also added two pictures of a CPU and the Power BI Logo. I added my full JSON below:

If you copied this code (or, created your own of course) we go back to Power Automate. Here you paste the JSON into the message box. It shows us the following:

Json code to fill your adaptive card

The values are already filled correctly. And that's it! Time to test!

As soon as my card gives me an alert, the flow gets triggered and will complete the next action: Sending a card to a Teams Channel. In Teams, I get the following message:

Adaptive Card in Teams

Unfortunately, it’s not possible to show the current values or the values at that time, because it only saves information from the card. And our card uses a measure that looks at two different measures, to make the threshold variable. In this case, I wouldn’t add the value and threshold, but I would just give my team members an informational card, saying that something is wrong (in my case the CPU).

Take care.

--

--