How to Create a Discord Webhook to Send Messages Automatically
If you are not aware of what is a webhook, let us explain. Webhooks are like pneumatic tubes but with added functionality to automate your messaging and alert you as per your choices. You can create free webhooks on Discord servers for whatever reason you like. For example, if you are a coder and have to visit Github for checking different updates about Commits, Pull Requests, and more, you can just set up a Discord Webhook and be easy with it by receiving automatic messages. So let’s start:
How to Create a Discord Webhook
Before creating a webhook on a Discord server, make sure you are capable of that and have permission to manage webhooks. You can confirm it from a Discord Server Roles yourself. If you have the permission, let's roll:
- Go and Open a Discord Server for which you want to create a webhook
- Click on the Server Name and Click on Server Settings from the drop-down menu
- Click on the Integrations from the sidebar menu and navigate to Webhooks
- Now click on the "Create Webhook" or New Webhook option
- Type the name of your Webhook and select your Channel for receiving messages
- Copy Webhook URL and paste it into Notes or any text editor
That's it, your first webhook on Discord server is up and ready to help you send or receive automated messages. This can work as a notification reminder, alerts machine, and whatever you can think.
Optionally: You can also add a profile image to your webhook to make it more professional.
How to Set Up Automated Messages
- Copy the Webhook URL from Discord server or from where you pasted in Step 6
- Select a Github repository for which you want to get automated updates
- Now go to that GitHub repo settings and click on Webhooks > Add webhook
- Paste your Discord-generated URL in the "Payload URL" (the URL you copied earlier)
- Don't save it yet, after you paste the URL, add "/github" at the end of URL
- Select application/JSON
- Select your event for which you want to get automated messages
- Click on the Add webhook button
That's it, now you will get free updates on your Discord server directly from Github repo. That's how easy it is to create a webhook in discord and connect it with Github for getting automated messages.
You can connect a Discord webhook to many other platforms like CircleCI, DataDog and also, Twitch, YouTube, Nelly The Hamster, and Facebook but some of them don't really work smoothly.
So, which platform you are going to connect with your Github webhook for receiving automated messages?