Send Data Driven notifications by SMS/Teams/Slack with Data Activator and Power Automate on real time eventstreams in Microsoft Fabric

Introduction

Real Time Analytics in Microsoft Fabric is flying a little under the radar, which is a shame, because the benefits are huge.

Especially, if you start putting real time data into the hands of the people who need to react to it. And especially, especially if you do so at the right time.

Introducing: Data Activator.

The engine which will allow you to notify your audience when triggers and conditions in your real time analytics backend are satisfied.

This article will outline how to use Data Activator with data in your Eventstreams and KQL Databases, and in combination with Power Automate, how to drive instant notifications with almost any platform. If you need help setting up Eventstreams and KQL databases, check out my previous blog post: https://downhill-data.com/?p=176


Using Data Activator directly on your real time data in Eventstreams

If you have setup an Eventstream to ingest Real Time data into fabric, you can output said data directly into Data Activator:

And opening the Reflex, you will see data flowing in through the data page:

With the events flowing into Activator, the next step is to assign said events to an object:

And afterwards you can jump to the Design tab at the bottom, to set up Triggers for the object. I created an object called BikeStation, and below I am setting up a Trigger to monitor the number of Bikes at each station:

I can set up the Detect step to look for BikeStations which have almost no bikes left:

And set up the Action to deliver a Teams Message when triggered:


Sending data driven notifications via SMS or other integrations using Power Automate

Now what if we wanted to become a little smarter here.. What if we wanted to send data driven notifications to… Slack? Post on Twitter? Or as a text message to a phone? Then we can use Power Automate as custom actions in our reflex.

First, lets enhance our trigger with some properties, so that we can include information about Neighbourhood and Street in our notifications:

And then from the top menu, lets create a Custom Action, passing our parameters to the Power Automate flow as well:

Copy and paste the connection string from Data Activator into the trigger:

Put in a Parse JSON action to extract the properties being sent over from Data Activator:

And finally create an output integration to a service or platform of your choosing. I am here creating a “Send SMS” action, that requires you to sign up for a service (but I am using free credits here):

The end result is seen below (notice how it took me a few tries to get the dynamic properties just right:

And that’s it! That was how to do data driven notifications directly on Eventstreams.


Using Data Activator with KQL Databases

If you have a KQL Database ingesting data from somewhere. An IoT hub, Event Hub, or once again maybe an Eventstream using Event Processing to transform your data, you will need to create a Power BI report using data from your KQL Database.

In this example, I am continuing working on my Bicycle Data from the last blog post, and have created a simple Power BI report showing the Average number of Bikes and Empty Docking Stations by Neighborhood:

To get started with monitoring this data, which is coming in live from my KQL database, expand the menu of one of the visualisations, or select the “Set Alert” button from the top bar. In this case, I am creating an alert to notify me if the Average Number of Empty Docks in a Neighbourhood exceeds 17:

Opening the Alert in Data Activator, I can see the Data that is being monitored from the Data page:

And in the Design page I can customize the Trigger Conditions and Action like we did earlier, and configure it to once again fire text messages with Power Automate, or simply send an email like I do here:

Now the good questions is… How often will data flow in to Data Activator through Power BI? It used to be, back in the Data Activator preview, that we could select the interval ourselves, but that option has disappeared.

Rumour has it that Microsoft is currently evaluating the options here, as the refresh interval will impact pricing, but for now it seems to default to a refresh interval of one hour.


Summary

Data Activator is a game changer when it comes to provoking action based on thresholds, triggers and conditions, and the ability to team it up with Power Automate makes the list of integrations massive.

For now, Data Activator seems to work best directly on Eventstreams, but Power BI alerts certainly have their pros, due to the self-service nature of the setup.

Leave a comment

Blog at WordPress.com.