GithubHelp home page GithubHelp logo

isabella232 / msteams-samples-outgoing-webhook-nodejs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from officedev/msteams-samples-outgoing-webhook-nodejs

0.0 0.0 0.0 17 KB

A very simple example of an "Outgoing webhook" server that echoes whatever is sent to it

License: MIT License

JavaScript 100.00%

msteams-samples-outgoing-webhook-nodejs's Introduction

page_type products languages extensions
sample
office-365
javascript
contentType createdDate
samples
12/5/2017 6:03:13 PM

Microsoft Teams outgoing webhook sample

This project is an implementation of a very simple Outgoing Webhook for Microsoft Teams. All it does is verify that what's sending messages matches the Outgoing Webhook that was created in Teams, and it echoes back whatever is sent to it.

Steps to run locally

Prerequisites

  • Install Git for windows: https://git-for-windows.github.io/

  • Clone this repo:

    git clone https://github.com/OfficeDev/msteams-samples-outgoing-webhook-nodejs.git
  • Install Node: https://nodejs.org/en/download/

  • Install a tunnelling service. These instructions assume you are using ngrok: https://ngrok.com/

  • Start the tunneling service, e.g. ngrok http 8080 and copy the https:// URL it generates to the clipboard, e.g. https://2fb7b5e8.ngrok.io

  • Create the Outgoing Webhook in Teams using the instructions here. Paste the tunneling service URL from the previous step into the "Callback URL" box. After you press the Create button, copy/paste the security token that Teams generates to the clipboard.

  • Paste the security token generated by Teams as the value of sharedSecret in app.js. When you're done, it should look something like this:

    const sharedSecret = "+ZaRRMC8+mpnfGaGsBOmkIFt98bttL5YQRq3p2tXgcE=";
  • In the directory in which you installed this project, type node app.js

  • In Microsoft Teams, in any channel in the team in which you created the Outgoing Webhook, you can type @<botname> hello (or anything else you like) and it will echo back its name and what you typed.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

msteams-samples-outgoing-webhook-nodejs's People

Contributors

billbliss avatar microsoftopensource avatar msftgits avatar nokafor avatar o365devx avatar supernova-eng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.