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.

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.


  • Bots are available in Government Community Cloud (GCC), GCC-High, and Department of Defense (DOD) environments. Bot applications within Microsoft Teams for GCC-High and DOD are available through Azure bot Service and bot channel registration must be done in Azure Government portal.

  • Image URLs in Adaptive Cards aren't supported in GCC-High and DOD environments. You can replace an image URL with Base64 encoded DataUri.

  • When a user changes the Teams theme in a bot, the theme doesn’t apply to the content shared using an Adaptive Card.

Conversational bots allow users to interact with your web service using text, interactive cards, and dialogs (referred as task modules in TeamsJS v1.x).

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 dialog.

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 dialogs 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:

Bot configuration experience

Bot configuration experience helps the users to interact with the bot in Teams. Users can interact with the bot either by sending a message or selecting a command from the command list. After the bot is installed in a channel or team, all the members from the channel or team can provide inputs to the bot at the same time, the bot only considers the last input provided by the user. For more information, see bot configuration experience.

You can change the bot name displayed in Teams environment, and you need to update it in the following occurrences:

  • The bot name displayed as a title in the chat window is managed within your app manifest (previously called Teams app manifest) and you can update the bot name in your app manifest.

  • The bot name that's displayed in your Teams chat list and in the chat window with each message are managed within Microsoft Azure portal. For custom uploaded apps, you can update the bot name in the Bot profile page in Azure portal.

    The screenshot shows the bot name displayed in a Teams window.

Code samples

Sample name Description .NET Node.js Manifest
Bot daily task reminder This sample shows how to schedule a recurring task and get a reminder at a scheduled time using bot. View 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 using Incoming Webhook in Microsoft Teams channels. NA View

Next step

See also