How to create a webhook URL for a Slack Channel?

A beginner-friendly, Step-by-Step Guide to create and test Slack Webhook URL for Focused Channel Communication

Aman Ranjan Verma
3 min readJun 29, 2023
ARV Original Creation

In today’s digital age, deriving the maximum advantage from collaborative tools like Slack involves delving beyond the basics. A key aspect of this is using Webhooks, which allow third-party extensions to send live updates. In this beginner-friendly tutorial, we will explore how to create a Slack webhook URL, starting from the very basics. Whether you’re new to Slack or in need of a quick refresher, this guide is for you.

Table of contents

· What is a Webhook?
· Create Slack Webhook URLs for Your Workspace
Step 1: Create a slack channel
Step 2: Create Slack developer App and link it to your workspace
Step 3: Create a webhook and link it to your slack channel
· Test your Webhook URL
· Conclusion

What is a Webhook?

A webhook is a method used to provide other applications with real-time information. Think of it as an automated messenger. In the context of Slack, a webhook allows external applications to send automatic notifications to your Slack channels.

For example, imagine you have a project management tool. Every time a task gets completed, a webhook could send an update to your team’s Slack channel, sharing this news. It effectively streamlines and automates the communication process.

Difference between Webhook and API
Difference between Webhook and API

Create Slack Webhook URLs for Your Workspace

Step 1: Create a slack channel

It is advisable to create a dedicated Slack channel to receive messages through this webhook. Follow the below link to get one.

Step 2: Create Slack developer App and link it to your workspace

Create Slack Webhook URLs
Click on [From scratch]
Create Slack Webhook URLs
Give a good name to your App and then select the correct workspace

Step 3: Create a webhook and link it to your slack channel

Create Slack Webhook URLs
Click on [Incoming Webhooks]
Create Slack Webhook URLs
Turn on the Incoming Webhooks and click on [Add new Webhook to Workspace]

A new page will open asking, Where should Airflow Notifier post? Select the previously created channel and click on [Allow].

Create Slack Webhook URLs
Finally you will land on this page where you will get your Webhook URL.

Test your Webhook URL

Copy the curl command from the above page and run it on your terminal.

curl -X POST -H ‘Content-type: application/json’ — data ‘{“text”:”Hello, World!”}’ https://hooks.slack.com/services/abcd/efgh/ijklmno
You should see this message in slack.

Conclusion

Well done! You’ve now learned how to create a Slack webhook URL, paving the way for more efficient and streamlined teamwork on the platform. Remember, these are tools to be put to use, so don’t hesitate to experiment and find new ways to use Webhooks in your workspace. Keep on learning and keep on Slacking!

--

--

Aman Ranjan Verma
Aman Ranjan Verma

Written by Aman Ranjan Verma

Senior Data engineer, QuillBot | Ex-Flipkart | Ex-Sigmoid. I publish weekly. Available for 1:1 at topmate.io/arverma

Responses (1)