Add bots to Microsoft Teams apps
Build and connect intelligent bots to interact with Microsoft Teams users naturally through chat. Or provide a simple commands-based bot, to be used as your "command-line" interface for your broader Teams app experience. You can make a notification-only bot, which can push information relevant to your users directly to them in a channel or direct message. You can even bring your existing Bot Framework–based bot and add Teams-specific support to make your experience shine.
If you are just looking for a way to simply extend your team by integrating with custom tools and services in a secure manner, check out our outgoing webhook feature. Be aware, though, that outgoing webhooks simply leverage your existing web services—they can't access non-messaging APIs, perform asynchronous posting, or add button actions to cards.
What you need to know: Bots
Other than its hexagonal avatar icon, a bot appears just like any other team member you interact with, in a channel or in one-on-one conversations. It is always online and does not have a mood message.
Bots in Teams can surface in a one-on-one context ("personal scope"), as a member of a team ("team scope"), or both. For the latter, they take part in a conversation only when you @mention them. For the former, you can address them via the conversation interface or access them in the apps personal experience from the app bar flyout.
With Microsoft Teams apps, you can make the bot the star of your experience, or just a helper. Bots are distributed as part of your broader app package, which can include other capabilities such as tabs or messaging extensions.
If your bot is the star, be sure to take advantage of the tabs capability as well. Use this rich web view to surface accompanying experiences and information that helps your users best interact with your service.
Microsoft Teams supports much of the Microsoft Bot Framework functionality. (If you already have a bot that's based on the Bot Framework, you can easily adapt it to work in Microsoft Teams.) We recommend you use either C# or TypeScript to take advantage of our SDKs.
We want to make development of Microsoft Teams apps as easy as possible, so we build and maintain extensions to the Bot Builder SDK. These packages extend the basic Bot Builder classes and methods with the following:
- Using specialized card types like the Office 365 Connector card
- Consuming and setting Teams-specific channel data on activities
- Processing messaging extension requests
- Handling rate limiting
The SDK extensions install dependencies, including the Bot Builder SDK.
- .NET To use the Microsoft Teams extensions for the Bot Builder SDK for .NET, install the Microsoft.Bot.Connector.Teams NuGet package in your Visual Studio project.
- Node.js To use the Microsoft Teams extensions for the Bot Builder SDK for Node.js, add the botbuilder-teams npm package.
- Source code You can find the full source code for the extensions in the BotBuilder-MicrosoftTeams repo on Github.
You can develop Teams apps in any other web-programming technology and call the Bot Framework REST APIs directly, but you must perform all token handling yourself.
Follow these links to build a great Teams bot:
- Get started with apps for Teams
- Design a great bot: Microsoft Teams is the place for group and team collaboration. Consider what functionality your bot can bring to this collaboration environment, via 1:1 conversations or as part of a channel conversation. A great bot on Teams will also find ways to leverage the unique tabs feature, via a configurable tab or a static tab.
- Create and register your bot in the Bot Framework: Take advantage of the great tools, documentation, and community provided by the Bot Framework team.
- Develop your bot: Add basic conversation flow and leverage channel-specific functionality. If you develop in .NET or Node.js, use our extensions for the Bot Builder SDK to simplify your work.
- Test your bot: Add your bot for 1:1 or team conversations to see it in action.
- Publish your bot: Create your Teams package, add other capabilities, and submit it to AppSource.
What you need to know: Teams App Studio
Teams App Studio is a new tool that can help configure your manifest and your app. It also contains a React control library and configurable samples for cards. See Getting started with Teams App Studio.
What you need to know: outgoing webhooks
Outgoing webhooks allow you to create a simple bot for basic interaction, like kicking off a workflow or other simple commands you may need. Outgoing webhooks live only in the team in which you create them and are intended for simple processes specific to your company's workflow. See outgoing webhooks for more information.