Explore webhooks and connectors

Completed

In Microsoft Teams, outgoing webhooks provide a simple way for users to send messages to your web service without requiring you to build a bot via the Microsoft Bot Framework. In this unit, you’ll learn about the different types of webhooks and connectors and what user scenarios they support.

Outgoing webhooks

An outgoing webhook allows your users to send messages from a channel to your web service. Once configured, your users can @mention your outgoing webhook to have Microsoft Teams send the message to your service. Your service has five seconds to respond to the message and optionally include a text-based message or a card.

Users manually configure outgoing webhooks on a per-team basis; they aren't installed as custom Microsoft Teams apps.

Connectors

With connectors, your users subscribe to receive notifications and messages from your web service. The connector exposes an HTTPS endpoint that allows the service to post messages to Teams channels, typically in the form of cards.

Microsoft Teams supports two types of connectors: Incoming Webhooks and Connectors for Microsoft 365 Groups.

Incoming webhooks

This type of Connector is often used for tracking and notification messages. You manually configure an Incoming Webhook on a per-channel basis and like outbound webhooks, these can't be included in custom Microsoft Teams apps.

After creating an Incoming Webhook, Microsoft Teams displays a webhook endpoint that your web service can submit HTTP Post messages to.

Incoming webhooks can be used in scenarios similar to when you might use a notification bot. Incoming webhooks are simpler to create, but notification bots enable a more customizable experience to meet different business scenarios. Notification bots can be developed using Teams Toolkit.

Learn more about the differences between a notification bot and Incoming Webhook so that you can choose the right solutions for your scenarios:

  Notification bot Incoming Webhook
What is it? A Teams app A Teams feature
Installation required Yes No
Suitable scenarios • Receive regular notifications and messages periodically, for example, receive daily notification of team tasks.
• Receive notifications and messages based on real events. For example, once teammates upload files, you receive notifications.
Communicate with external apps and receive notifications and messages from other apps.
Scope configuration • Teams channel
• Group chat
• Personal chat
Teams channel
Message process A notification bot works as a Teams application. You can define your business logic to process data and show data in a customized format. Webhook is a Teams feature rather than a Teams application, so it only receives and shows data without processing.
Retrieve Teams context Notification bot can retrieve Teams context such as the channel or user information, messages, etc. No
Send Adaptive Card Yes Yes
Send a welcome message Yes No
Trigger supported All triggers are supported. If you use Teams Toolkit, you can quickly get a template project with the following triggers:
• Time trigger hosted on Azure functions.
• Restify HTTP trigger hosted on Azure app service.
• HTTP trigger hosted on Azure Functions.
All triggers are supported.
Building Tools • Teams Toolkit for Visual Studio Code
•Teams Toolkit Overview for Visual Studio
• TeamsFx Library
• TeamsFx SDK
No tools are required.
Cloud resource required Azure Bot Framework No resources are required.
Tutorial Build notification bot with JavaScript Incoming Webhook notification sample

Connectors for Microsoft 365 Groups

Connectors for Microsoft 365 Groups allow you to create a custom configuration page for your Incoming Webhook and package them as part of a Teams app. You send messages primarily using connector cards for Microsoft 365 Groups and can add a limited set of card actions to them. They're configured at channel level but are installed at team level.

For example, you might create a news connector that allows users to select a category and topic to receive news updates. They're configured at channel level but are installed at team level.

Like Incoming Webhooks, Office 365 Connectors enable you to proactively send messages to a channel. However, they are not quite as simple to create. Connectors can be installed in Microsoft Teams apps and even published to the App Store for broader distribution.