Connect GitHub to Discord using webhooks

Integrating services into Discord in the form of a bot is really easy. This article provides step by step instructions for using Discord's webhooks, and uses GitHub integration as an example.

What are webhooks?

Webhooks use unique URL's to send messages triggered by events from one application to another. This means events like comments or favorite notifications will be transmitted from one app to another. In our case we want to see GitHub display all of the activity of a specific GitHub.com repository.

The process

  1. Start by right clicking a channel and clicking "Edit Channel."

  2. Click on integrations.

  3. Click "Create Webhook".

  4. Customize the image and name before clicking Copy Webhook URL. Be sure to save.

  5. Click "Settings" > "Webhooks" > "Create Webhook."

  6. In the Payload URL field paste the URL you recently copied from Discord and add "/github" to the end. Switch the Content type to "application/json" and select "Send me everything" before clicking "Update webhook" to save.

  7. Check to make sure you see a checkmark next to the newly added Webhook in the Webhooks section of your repositories settings.

To test your new bot you can either comment on an issue or favorite the repository.

Is there an error, or incorrect information in this post? Let me know!