New Integration Alert: Microsoft Teams Notifications Now Available
Posted: October 26th, 2024
Microsoft Teams Implementation
By far the most popular notification channel request that has come in is for Microsoft Teams. After some research, Microsoft does not seem to have nearly as friendly of an Teams extension ecosystem as Slack so I went with the route of a simple webhook. The flow for setting up a Teams webhook has a few more steps than I prefer, but once the webhook URL is set up for the channel everything works very smoothly with very little latency. Microsoft provides complete documentation for how to add a webhook. Below is a summary of the steps required:
- In the New Teams client, select Teams and navigate to the channel where you want to add an Incoming Webhook.
- Select More options ••• on the right side of the channel name.
- Select Manage channel. For members who aren't admins of the channel, the Manage channel option is available under the Open channel details option in the upper-right corner of a channel.
- Select Edit Connectors.
- Search for Incoming Webhook and select Add.
- Provide a name such as “MeerkatIO” for the webhook and upload an image if necessary.
- Select Create.
- Copy and paste the unique webhook URL to https://meerkatio.com/account/teams. The URL maps to the channel and you can use it to send MeerkatIO notifications.
- Select Done. The webhook is now available in the Teams channel.
To build the notification handler inside MeerkatIO, I used the pymsteams package to get up and running quickly https://pypi.org/project/pymsteams. In the future I might replace this with custom code to reduce dependency, but I was impressed with how easy it was to format a Teams message with this library.
How Teams Webhooks Work
In the context of Microsoft Teams, webhooks are user-defined HTTP callbacks. A webhook lets you send data directly from external applications such as MeerkatIO to a specific Teams channel by making HTTP POST requests to a unique URL generated and managed by Teams. When your VS Code app or MeerkatIO Python script triggers a notification, the webhook allows MeerkatIO to send a notification directly to Teams containing useful data about your code execution.
Future Plans
As I worked to add Microsoft Teams support to MeerkatIO, I set up a framework to easily expand into more integrations. Next on my list is Google Chat. Outside of additional notification channels, my todo list includes improving the sign up experience through VS Code so users do not need to manually copy over their token into a settings.json file and instead the flow is automated. This might be a bigger task, but as this extension grows it seems necessary to improve user experience. I always appreciate developer and user feedback through this SurveyMonkey form!
Happy Hacking,
Justin
MeerkatIO.com
Sign up for MeerkatIO today to reclaim your free time and boost your productivity. With MeerkatIO, you can enjoy the peace of mind that comes from knowing you're not missing a beat while your code is running. Start your journey to a more efficient work-from-home experience today!
Back to Blog