Skip to content

manugeorge04/MSTeamsBot-TimeConverter

Repository files navigation

MS Teams Bot - Time Converter

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.

Prerequisites

  • Microsoft Teams is installed and you have an account
  • NodeJS
  • ngrok or equivalent tunnelling solution

To run this bot

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.

  1. Clone the repository

    git clone https://github.com/manugeorge04/MSTeamsBot-TimeConverter.git            
  2. Install modules

    npm install
  3. Run ngrok - point to port 3978

    ngrok http -host-header=rewrite 3978
  4. Create Bot Framework registration resource in Azure

  5. Update the .env configuration 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.)

  6. Update CustomForm.html to replace your Microsoft App Id where you see the place holder string <<your bot id>>

    • Edit the manifest.json contained in the teamsAppManifest folder 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 teamsAppManifest folder to create a manifest.zip
    • Upload the manifest.zip to Teams (in the Apps view click "Upload a custom app")
  7. Run your bot at the command line:

    npm start

Interacting with the bot in Teams

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors