Skip to main content
Sending notifications to Teams
Updated over a week ago

Generate a Webhook URL

Using Microsoft Power Automate

You can use the following Microsoft Power Automate template: Post to a channel when a webhook request is received

  1. Click the template link.

  2. Connect to your teams account and click "Continue".

  3. Choose a Team and a Channel, then click "Create".

  4. After the Flow is created, click "Edit".

  5. Click on the first block (the one named "When a Teams webhook request is received").

  6. Copy the HTTP URL from the left pane, you can then close this page.

Using Teams Incoming Webhooks (Deprecated)

On July 3rd, 2024, Microsoft announced the retirement of Office 365 connectors within Microsoft Teams. We strongly encourage you to use Microsoft Power Automate instead.

To send notifications to Microsoft Teams, you first need to generate a Webhook URL. To do that, use this guide.

Tip: you can upload the Coho AI logo as an avatar image. When setting up the Webhook URL, upload this image.

Create the Playbook Action

Once you have the Webhook URL, you can configure a Playbook Action that uses it.

  1. Create a new Action, and fill in the details (name, type, etc...)

  2. Enter the Webhook URL you created earlier as the Action URL

  3. In the HTTP Body, you can use the Adaptive Cards interface. Example:

{
"type": "message",
"attachments": [
{
"contentType": "application/vnd.microsoft.card.adaptive",
"contentUrl": null,
"content": {
"$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.2",
"body": [
{
"type": "TextBlock",
"text": "Hi! You have a new user: {{userId}}"
}
]
}
}
]
}

Did this answer your question?