redash
redash copied to clipboard
Microsoft Teams Webhook alert destination
What type of PR is this? (check all applicable)
- [x] New Alert Destination
Description
Create a new alert destination for Microsoft Teams Webhooks
Related Tickets & Documents
https://discuss.redash.io/t/microsoft-teams-integration/852
Mobile & Desktop Screenshots/Recordings (if there are UI changes)



Working on text formatting and icons.
Planning to use this icon.




MS Alert Webhook documentation here: https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference
@arikfr , one thing I noticed during testing is that a trigger is fired when the criteria is met and when the criteria is reset. Is that correct (I see it here now https://redash.io/help/user-guide/alerts/setting-up-an-alert#Alert-Statuses)? Is that info in the new_state argument (new_state seems the three options here: https://github.com/getredash/redash/blob/master/redash/models/init.py#L970)?
I noticed during testing is that a trigger is fired when the criteria is met and when the criteria is reset. Is that correct?
Yes.
Is that info in the new_state argument (new_state seems the three options here:
Yes. Related docs:
UNKNOWN means Redash does not have enough data to evaluate the alert criteria. You will see this status immediately after creating your Alert until the query has executed. You will also see this status if there was no data in the query result or if the most recent query result doesn’t include the Value Column you configured.
If for some reason this doesn't make it into the next release, could the patch from #5726 ship tactically (it's super tiny), and then reverted in this PR?
Any update about this work? There's an official way to implement this MS Teams in the current release (such as a plugin)?
This will be included in the next release later this summer.
Yes, alert destinations are pluggable just like query runners 👌 This one should be compatible with any installation of Redash V10.
This will be included in the next release later this summer.
Yes, alert destinations are pluggable just like query runners 👌 This one should be compatible with any installation of Redash V10.
how can I add it to my current instance so? Do we have a tutorial for that?
how can I add it to my current instance so? Do we have a tutorial for that?
We don't but working on publishing a doc with a strategy for this. There are a few different approaches. Probably the easiest is to copy the file into your local copy of the source code and then issue a COPY
command in the Dockerfile that places it into your containers.
In case anyone wants to bring this into their existing install, your Dockerfile should look something like this. (double check the base image)
FROM redash/redash:8.0.0.b32245
USER root
# upgrade to fix vulnerabilities and enable ldap
RUN apt update && apt install -y sudo linux-libc-dev
RUN pip install --upgrade pip && pip install --upgrade ldap3 Werkzeug==0.16.1
USER redash
COPY microsoft_teams_webhook.py /app/redash/destinations/microsoft_teams_webhook.py
COPY microsoft_teams_webhook.png /app/client/dist/images/destinations/microsoft_teams_webhook.png
Then set the environment variable
REDASH_ADDITIONAL_DESTINATIONS: redash.destinations.microsoft_teams_webhook
Thanks!