Sending messages to MS Teams
MS Teams have moved away from simple webhooks to a concept called “workflows”, which are really MS Power Automate workflows.
This means that a Power Automate webhook is needed in order for Butler to send messages to Teams.
This page describes both how to create new channels in Teams and how to set up new webhooks that can be used to send messages to the new channel.
Overview
The goal is to create a new Teams channel to which Butler will send alerts when monitored Windows services are stopped or started.
The same concept is used to create channels and/or webhooks for other Butler alert features, such as failed reload tasks (client-managed Qlik Sense) or failed app reloads (Qlik Sense Cloud).
All screen shots below are from Teams running on macOS.
Should look more or less the same on Windows…
Create a new channel
Creating a new channel is an easy two-step process:
Select which team the channel should belong to, the channel name/description and permissions.
Click Create.
Create a new, webhook triggered workflow
Now let’s create a new workflow, with associated webhook that can be used to send messages to the channel.
Open the workflow view by clicking on the “Workflows” link in the menu on the left. It may be hidden under the three-button-link.
Existing workflow are listed, for all channels the user has access to.
Create a new workflow by clicking the “New flow” button in upper right corner.
Search for “webhook” in the “Search templates” text box.
The one we need is called “Post to a channel when a webhook request is received”.
Give the workflow a name and sign in.
In most cases you will already be signed in, which shows by the green checkmark to the right of the “Microsoft Teams” text.
Select which team and channel post should be sent to.
Workflow has been created.
Copy the shown URL - it should be pasted into the Butler config file.
The new workflow shows up in the overview.
It may take a few minutes (5-10) until it starts working, so don’t be worried if alerts messages from Butler don’t show up right away.
Example messages in the new channel
Here the “Print Spooler” service was stopped and started again on a Windows server.