Microsoft Teams Provider
Microsoft Teams Provider is a provider that allows to notify alerts to Microsoft Teams chats.
Inputs
The notify
function in the TeamsProvider
class takes the following parameters:
Outputs
The response as JSON, which is the response from the Microsoft Teams API.
Authentication Parameters
The TeamsProviderAuthConfig class takes the following parameters:
webhook_url
(str): associated with the channel requires to trigger the message to the respective channel. Required
Connecting with the Provider
- In the New Teams client, select Teams and navigate to the channel where you want to add an Incoming Webhook. 2. Select More options ••• on the right side of the channel name. 3. 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
- Search for Incoming Webhook and select Add.
- Select Add
- Provide a name for the webhook and upload an image if necessary. 8. Select Create.
- Copy and save the unique webhook URL present in the dialog. The URL maps to the channel and you can use it to send information to Teams. 10. Select Done. The webhook is now available in the Teams channel.
Notes
When using Adaptive Cards (typeCard="message"
):
- The
sections
parameter should follow the Adaptive Cards schema themeColor
is ignored for Adaptive Cards- If no sections are provided, the message will be displayed as a simple text block
- Both
sections
andattachments
can be provided as JSON strings or arrays
Workflow Example
You can also find this example in our examples folder in the Keep GitHub repository.
The sections parameter is a JSON string that follows the Adaptive Cards schema, but can also be an object. If it’s a string, it will be parsed as a JSON string.
Using Sections
Using Custom Attachments
Useful Links
- https://learn.microsoft.com/pt-br/microsoftteams/platform/webhooks-and-connectors/how-to/add-incoming-webhook
- https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/connectors-using
- https://adaptivecards.io/explorer/
- https://adaptivecards.io/schemas/adaptive-card.json