Skip to content

Latest commit

 

History

History
91 lines (55 loc) · 6.54 KB

teams.md

File metadata and controls

91 lines (55 loc) · 6.54 KB

Configure Botkit and Microsoft Teams

Building a bot with Botkit and the Microsoft Teams API gives you access to all of the best tools and options available to create a feature-rich app for Teams.

We've created the following guide to help you configure your Microsoft Teams bot. In order to get the best deploy experience possible, we recommend starting with Botkit Studio, our feature-rich tool for building bots!

Step 0 - Enable Developer Preview

Before starting to work on your bot, you should enable Developer Preview and the ability to sideload apps for your development team so that you ensure all features are supported.

Step 1 - Starting with Botkit Studio

Botkit Studio is a hosted development environment for building bots with the Botkit core library. Developers using Botkit Studio get the full capabilities of Botkit, plus a full guided setup on creating a bot for Microsoft Teams.

Sign up for Botkit Studio

Botkit Studio provides dedicated tools to create your bot's App Package for sideloading and submission to the Office Store. While Botkit Studio is not required, it is strongly recommended as the best way to stand up a bot using Botkit.

For more information about Botkit Studio, including our starter kits for other platforms, please read the Botkit readme on GitHub.

Step 2 Register your bot with Bot Framework

Microsoft Teams first requires you to register with their "Bot Framework" before you can add a bot to your Teams team. This is a multi-step process:

Create an account / Log in

Log into the Bot Framework Developer Portal using your Microsoft credentials, or create an account.

Register a new bot

Once you are logged in, click this link to create a new bot and then you can skip the next two steps!

  • Click on My Bots and then Register. Choose Create a bot with the Bot Builder SDK, and click Create.

  • Select Register an existing bot built using Bot Builder SDK from the next menu and then click OK.

You will be asked some questions about your bot. Some of these can be changed later, but some cannot be changed so consider your responses carefully!

These are the important fields when creating your bot:

  • Display name - Your bot's name in channels and directories. This can be changed later.
  • Bot handle - This will be used in the URL for your bot. Note: This cannot be changed.
  • Messaging endpoint - You may not know this yet, as you will be creating this in the next step when setting up the Botkit app. If you are using the Botkit starter kit or Botkit Studio, by default it is: https://YOURURL/teams/receive. Feel free to make anything up, you can come back later and change it.

Generate your keys

Register your bot with Microsoft by clicking: Create Microsoft App ID and password

This action will take you to a new website (and require you to log in again) and then ask you for an App name.

Once added, it will provide an App ID which you need to copy somewhere safe to use in the next step.

Next, click Generate password. This will only be shown to you once, if you lose it, you will need to invalidate the old one and set this up again!

Click Register.

Add the Microsoft Teams channel

Add the Microsoft Teams channel from the list of channels, making sure the Enabled is set to on.

You will want to leave this window open as you finish setting up Botkit, as you will need to come back here before you are done.

Step 4 - Deploy your bot and install to a team

Turn on your Botkit app

Now that everything is setup on Microsoft's side, you can run Botkit using the method you've chosen and with the information created in the Bot framework in the previous step.

Update your Messaging Endpoint in Bot Framework

Once a Botkit instance is running, you may have a new URL that you will have to update in the bot's settings in Microsoft Bot Framework.

Once logged in to that page:

  • Click on your bot
  • Select settings
  • Scroll down to the messaging endpoint field and replace the placeholder URL with your active Botkit URL (it should look something like https://YOURURL/teams/receive).
  • Click Save.

Create your Application Manifest

To add a development bot on a team, you will need to prepare an App Package. Botkit Studio provides easy tools to create your App Package, but you can also build this manifest manually if you've chosen to not use Studio.

Sideload your Bot to Microsoft Teams

After creating your app package, you can load it easily into your development team.

Say hello to your real live bot!

Step 5 - Add dialogue and features

Once you have a bot up and running, you can start the fun part of making your bot functional.

You can extend your bot's functionality using various Botkit Middleware, or check our example library for a good starting point.

If you have questions or suggestions, please take a look at our community support resources. You can chat with contributors and enthusiasts in our Slack community.

Additional resources