Skip to content

Latest commit

 

History

History
60 lines (38 loc) · 2.24 KB

File metadata and controls

60 lines (38 loc) · 2.24 KB
page_type description products languages extensions contentType createdDate
sample
Messaging and conversation event handling hello world.
office-teams
office
office-365
javascript
nodejs
samples
07-07-2021 13:38:26

Bots/Messaging Extension

Bots allow users to interact with your web service through text, interactive cards, and task modules. Messaging extensions allow users to interact with your web service through buttons and forms in the Microsoft Teams client. They can search, or initiate actions, in an external system from the compose message area, the command box, or directly from a message.

hello response

hello response team

Prerequisites

Dependencies

Configure Ngrok

Your app will be run from a localhost server. You will need to setup Ngrok in order to tunnel from the Teams client to localhost.

Run Ngrok

Run ngrok - point to port 3978

ngrok http -host-header=rewrite 3978

Update Bot Framework Messaging Endpoint

Note: You can also do this with the Manifest Editor in App Studio if you are familiar with the process.

  • For the Messaging endpoint URL, use the current https URL you were given by running ngrok and append it with the path /api/messages. It should like something work https://{subdomain}.ngrok.io/api/messages.

  • Click on the Bots menu item from the toolkit and select the bot you are using for this project. Update the messaging endpoint and press enter to save the value in the Bot Framework.

  • Ensure that you've enabled the Teams Channel

Build and run

npm install

npm start

Deploy to Teams (Visual Studio Toolkit Only)

Start debugging the project by hitting the F5 key or click the debug icon in Visual Studio Code and click the Start Debugging green arrow button.