In the previous article "creating-an-interactive-chatbot-with-ms-teams-and-the-xqi-engine/" we played around with chatbots. A fun and often useful feature with a lot of possibilities. But when you use a bot, the user in Ms Teams must always initiate the conversation. It lead us to wonder about bots informing Teams users about "events" that happen in a company (you can imagine anything here for which you would generate notifications with emails, SMS, WhatsApp or any other channel you have available). We also wondered how it would be more user friendly if the the user did not have to install the app first & start a conversation in order to receive notifications, but, that all of this would be handled automatically by our engine.
We based our solution on this (very recent) article from Tom Morgan: https://blog.thoughtstuff.co.uk/2020/07/its-now-mu...
. In a nutshell: using new access rights, you can automatically install an Teams App and start a conversation with the user.
We thought of a simple but useful usecase to try this out. Many companies have server infrastructure. And this infrastructure is often monitored by sensor data. In our example, the temperature in a datacenter is monitored. The value is stored in a time series database (TSDB). The XQi Engine acts as an alarming tool. The datacenter temperature is polled from the TSDB and when a threshold is met, a user in Teams is notified of this event. The user does not need to interact with the app or bot before being able to receive messages from it. Configuring the XQi Engine
We require 2 clients for MS Graph:
- Microsoft Bot API: just like in the previous article, a connection to the Bot API is required
- Ms Graph Beta: the new permissions & methods used to proactively install apps & initiate conversations are part of the MS Graph Beta API.