page_type | description | products | languages | extensions | urlFragment | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
sample |
This sample demonstrates how to build a GitHub connector for Microsoft Teams, enabling integration with GitHub's APIs for streamlined notifications. |
|
|
|
officedev-microsoft-teams-samples-connector-github-notification-nodejs |
Important
The existing Microsoft 365 (previously called Office 365) connectors across all cloud platforms are nearing deprecation, and the creation of new Microsoft 365 connectors will soon be blocked. For more information on the schedule and how the Workflows app provides a more flexible and secure experience, see retirement of Microsoft 365 connectors within Microsoft Teams.
This sample illustrates how to develop a GitHub connector for Microsoft Teams using Node.js, allowing teams to receive GitHub notifications directly within their Teams channels. The setup guides you through creating an OAuth application on GitHub, configuring a tunnel for local testing, and sideloading the connector into Teams, making it convenient to monitor GitHub activities.
- Register a new OAuth application at GitHub. Note the GitHub client id and secret.
- If you want to run this code locally, use a tunnelling service like dev tunnel or ngrok latest version.
- If you are using Ngrok as a tunnelling service then download ngrok from https://ngrok.com/. Run the following command to setup a tunnel to localhost:3000
ngrok http 3000
Note the ngrok address, which looks something likehttps://013e0d3f.ngrok-free.app
and if you are using dev tunnels, your URL will be like: https://12345.devtunnels.ms. - Put the callback Url in the Oauth app as 'your-ngrok/auth/github/callback'.
- Replace the clientId,clientSecret,callbackUrl and serviceUrl in Default.json.
- Default configuration is in
config\default.json
- install all the dependencies through npm install.
- run node server.js.
- Zip manifest.json file and sideload to any team. Alternative you can set your own connector at Microsoft connector portal (https://outlook.office.com/connectors/publish) and follow instructions here to get a new connector for microsoft teams ( https://msdn.microsoft.com/en-us/microsoft-teams/connectors).
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.