-
Install Git for windows: https://git-for-windows.github.io/
-
Clone this repo:
git clone
-
Install VSCode: https://code.visualstudio.com/
- NOTE: When installing, setting "open with" for the file and directory contexts can be helpful
-
Install Node: https://nodejs.org/en/download/
-
Download the npm modules - in the microsoft-teams-bot-template directory run:
npm install
-
Run bot locally
npm i
npm dev
ornpm i
npm build
npm start
-
(Only needed if wanting to run in Microsoft Teams)
Install some sort of tunnelling service. These instructions assume you are using ngrok: https://ngrok.com/ -
(Only needed if wanting to run in the Bot Emulator)
Install the Bot Framework V4 Emulator for your platform from the GitHub releases page.
NOTE: Teams does not work nor render things exactly like the Bot Emulator - this method is meant as just a slightly easier way to see the project's bot running
-
[Hack]: set botType=echoBot in .env file to run it as echoBot locally
-
Download the Bot Framework V4 Emulator for your platform from the GitHub releases page.
-
Once the code is running (bar at the bottom will be orange), connect with the Bot Emulator to the default endpoint, "http://localhost:3978/api/messages", leaving "Microsoft App ID" and "Microsoft App Password" blank
Congratulations!!! You can now chat with the bot in the Bot Emulator!
-
Begin your tunnelling service to get an https endpoint. For this example ngrok is used. Start an ngrok tunnel with the following command (you'll need the https endpoint for the bot registration):
ngrok http 3978 --host-header=localhost
-
Register a new bot (or update an existing one) with Bot Framework by using the https endpoint started by ngrok and the extension "/api/messages" as the full endpoint for the bot's "Messaging endpoint". e.g. "https://####abcd.ngrok.io/api/messages" - Bot registration is here (open in a new browser tab): https://dev.botframework.com/bots
NOTE: When you create your bot you will create an App ID and App password - make sure you keep these for later.
-
Use bot in Teams as sideloaded app: to use the bot as a sideloaded app in Microsoft Teams, please follow the steps:
- Modify
manifest.json
inside teams-app-manifest to assign a random GUID forid
as Microsoft Teams App ID - Assign
bots.botId
andcomposeExtensions.botId
where the bot ID should be the one assigned in step 2 - Zip
manifest.json
,icon-color.png
andicon-outline.png
as an archived file. - Follow instructions to sideload your bot into Teams.
- More instruction can be found here
- Modify
Bot Builder SDK4 - Microsoft Teams Extensions https://github.com/OfficeDev/BotBuilder-MicrosoftTeams-node