🔗 How to Get a Slack Webhook URL

Sujin Koo·2025년 10월 17일

[Eng] Dev Tips

목록 보기
2/2
post-thumbnail

If you want your GitHub Actions or Python script to automatically send messages to Slack,
you first need to generate a Slack Webhook URL.


1️⃣ Create a Slack App

  1. Go to 👉 https://api.slack.com/apps
  2. Click “Create New App” → “From Scratch”


  1. Enter the following information:

    • App Name: e.g., Arxiv Daily Bot
    • Workspace: select the workspace you’ll use

  1. Click Create App

2️⃣ Enable Incoming Webhooks

  1. In the left sidebar, click “Incoming Webhooks”
  2. Toggle “Activate Incoming Webhooks”ON

  1. Scroll down and click “Add New Webhook to Workspace”
  2. Choose the channel where you want to post messages (e.g., #arxiv-daily)

  1. Click Allow

You’ll now get a URL like this 👇

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

✅ This is your Slack Webhook URL.
You’ll use it in GitHub Actions or Python code.


3️⃣ Test Your Webhook with Python

You can quickly test if your Webhook is working —for example, using Colab 👇

import requests

webhook_url = "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
message = "recommendation"

response = requests.post(webhook_url, json={"text": message})

if response.status_code == 200:
    print("✅ Message sent successfully")
else:
    print(f"⚠️ Failed to send: {response.status_code}, {response.text}")

If the message appears in your selected Slack channel, you’re all set 🎉

profile
AI 😎

0개의 댓글