Build bots for Teams

A bot is also referred to as a chatbot or conversational bot. It's an app that runs simple and repetitive tasks by users such as customer service or support staff. Everyday use of bots include, bots that provide information about the weather, make dinner reservations, or provide travel information. Interactions with bots can be quick questions and answers or complex conversations.

Note

It's recommended to start with build your first bot app using JavaScript or build notification bot with JavaScript by using the new generation development tool for Teams. For more information, see Teams Toolkit overview.

Important

  • Currently, bots are available in Government Community Cloud (GCC) and GCC-High but not in Department of Defense (DOD).

  • Bot applications within Microsoft Teams are available in GCC-High through Azure bot Service and bot channel registration must be done in Azure Government portal.

  • Applications in GCCH only support up to manifest version v1.10. Image URLs in Adaptive Cards aren't supported in GCCH environment. You can replace an image URL with Base64 encoded DataUri.

Conversational bots allow users to interact with your web service using text, interactive cards, and task modules.

The screenshot is an example that shows a web service using text.

The screenshot is an example that shows a web service using interactive cards.

The screenshot is an example that shows a web service using task module.

Conversational bots are incredibly flexible. Bots can handle a few basic commands or complex tasks that involve artificial intelligence and natural language processing. Bots can be part of a larger application or be standalone.

Use the right mix of cards, text, and task modules to create a useful bot. The following image shows a user conversing with a bot in a one-to-one chat using text and interactive cards.

The screenshot is an example that shows a sample FAQ bot.

Every interaction between the user and the bot is represented as an activity. When a bot receives an activity, it passes it on to its activity handlers. See bot activity handlers.

Bots are apps that have a conversational interface. You can interact with a bot using text, interactive cards, and speech. A bot behaves differently in a channel or group chat conversation and in a one-to-one conversation. Conversations are handled through the Bot Framework connector. See conversation basics.

Your bot requires contextual information, such as user profile details to access relevant content and enhance the bot experience. See get Teams context.

You can send and receive files through the bot using Graph APIs or Teams bot APIs. See send and receive files through the bot.

Rate limiting is used to optimize bots used for your Teams application. To protect Teams and its users, the bot APIs provide a rate limit for incoming requests. See optimize your bot with rate limiting in Teams.

With Microsoft Graph APIs for calls and online meetings, Teams apps can now interact with users using voice and video. See calls and meetings bots.

You can use the Teams bot APIs to get information for members of a chat or team. See changes to Teams bot APIs for fetching team or chat members.

Add SSO authentication to your conversation bots

You can add single sign-on authentication to your conversation bot using the following steps:

Code samples

Sample name Description C# Node.js
Bot daily task reminder Demonstrate how to schedule a recurring task and get a reminder at a scheduled time. View View
Hello World Bot This is a simple hello world application with both Bot and Message extension capabilities. NA View
Adaptive Card Notification This is a sample, which shows how to send notifications with different adaptive cards using Bots. NA View
Incoming Webhook Notification This is a sample, which shows how to send notifications via Incoming Webhook in Microsoft Teams channels. NA View

Next step

See also