Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Text formatting and new image for Microsoft Teams Webhook
  • Loading branch information
Kevin Chiang committed Jan 22, 2022
commit c19f910c056e472834ffea6ea509e052678c3591
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 8 additions & 2 deletions redash/destinations/microsoft_teams_webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@


class MicrosoftTeamsWebhook(BaseDestination):
@classmethod
def name(cls):
return "Microsoft Teams Webhook"

@classmethod
def type(cls):
return "microsoft_teams_webhook"

@classmethod
def configuration_schema(cls):
return {
Expand All @@ -26,8 +34,6 @@ def notify(self, alert, query, user, new_state, app, host, options):
:type app: redash.Redash
"""
try:
logging.info("Notifying Microsoft Teams Webhook")
logging.info("%s/queries/%s" % (host, query.id))
data = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about supporting custom templates?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can try to copy what the chatwork destination did for message templates.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen Shot 2022-01-27 at 10 19 36 AM

"@type": "MessageCard",
"@context": "http://schema.org/extensions",
Expand Down