Bot Framework Teams Task Module sample.
This bot has been created using Bot Framework. It converts time from IST to any another timezone specified in the dropdown displayed in the task module.
Note these instructions are for running the sample on your local machine, the tunnelling solution is required because the Teams service needs to call into the bot.
-
Clone the repository
git clone https://github.com/manugeorge04/MSTeamsBot-TimeConverter.git
-
Install modules
npm install
-
Run ngrok - point to port 3978
ngrok http -host-header=rewrite 3978
-
Create Bot Framework registration resource in Azure
- Use the current
httpsURL you were given by running ngrok. Append with the path/api/messagesused by this sample - Ensure that you've enabled the Teams Channel
- If you don't have an Azure account you can use this Bot Framework registration
- Use the current
-
Update the
.envconfiguration for the bot to use the Microsoft App Id and App Password from the Bot Framework registration. (Note the App Password is referred to as the "client secret" in the azure portal and you can always create a new client secret anytime.) -
Update
CustomForm.htmlto replace your Microsoft App Id where you see the place holder string<<your bot id>>- Edit the
manifest.jsoncontained in theteamsAppManifestfolder to replace your Microsoft App Id (that was created when you registered your bot earlier) where you see the place holder string<<your bot id>>. - Zip up the contents of the
teamsAppManifestfolder to create amanifest.zip - Upload the
manifest.zipto Teams (in the Apps view click "Upload a custom app")
- Edit the
-
Run your bot at the command line:
npm start
You can type "Show Time" to make the bot display the current time in an adaptive card with a button to convert time
Fill the time you want to convert in the subsequent task module displayed and the result will be pasted in the chat window