How to Get YouTube Notifications on Discord (Plus Twitch Lives)
You want your Discord to hear about a new video or a stream going live without anyone copy-pasting links. There are free ways to do it, and YouTube is much easier than Twitch. This guide covers both, with a small tested script for YouTube, and explains when a bot is worth it.
Option 1: Follow the creator's announcement channel
If the creator runs their own Discord server and posts new videos or "going live" messages in an announcement channel (the megaphone icon), you can pipe that channel into your server with no code at all:
- Open their announcement channel and click Follow.
- Pick your server and the channel where posts should appear, such as
#new-videos, and confirm. You need the Manage Webhooks permission. - Each post they publish now appears in your channel, sent by a bot named after their server.
The catch: it only works if the creator actually posts there, and @everyone and role mentions are removed on the way. If you are the creator, this is also a nice way to let fan servers follow you: make an announcement channel and press Publish on each post. That needs a Community server, and Discord allows 10 publishes per hour.
Option 2: YouTube's RSS feed plus a Discord webhook
Every YouTube channel has a public feed of its latest uploads. A short script can check it and post new videos through a Discord webhook. No API key and no bot account are needed.
1. Find the channel ID
Channel IDs start with UC. For your own channel, YouTube's help says to open your profile picture → Settings → Advanced settings while signed in as the owner. For someone else's channel, open their channel page, click the "more" link in the description, then Share channel → Copy channel ID.
2. The feed address
Put the ID at the end of this address:
https://www.youtube.com/feeds/videos.xml?channel_id=UC...
In our test it listed the channel's 15 most recent uploads. Shorts are included, and you can spot them because their links contain /shorts/.
3. Create a Discord webhook
Hover over the channel that should get the alerts, click the gear (Edit Channel), then Integrations → Webhooks → New Webhook. Name it, then click Copy Webhook URL. Keep that URL private: anyone who has it can post in the channel.
4. Run a small script on a timer
This Python script checks each channel's feed, skips Shorts if you want, remembers what it already posted, and sends new uploads to your webhook. On the first run it only records what's already there, so your channel isn't flooded with old videos.
# youtube_to_discord.py: posts new YouTube uploads to a Discord channel.
# Needs Python 3 only (no extra packages). Run it every 15-30 minutes.
import json, os, urllib.error, urllib.request
import xml.etree.ElementTree as ET
WEBHOOK = os.environ["DISCORD_WEBHOOK_URL"] # keep it out of the code
CHANNELS = ["UC_x5XG1OV2P6uZZ5FSM9Ttw"] # YouTube channel IDs (start with UC)
SKIP_SHORTS = True
SEEN_FILE = "seen_videos.json"
FEED = "https://www.youtube.com/feeds/videos.xml?channel_id={}"
NS = {"a": "http://www.w3.org/2005/Atom", "yt": "http://www.youtube.com/xml/schemas/2015"}
def call(url, data=None):
req = urllib.request.Request(url, data=data, headers={
"User-Agent": "youtube-to-discord-script", "Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=20) as r:
return r.read()
seen = json.load(open(SEEN_FILE)) if os.path.exists(SEEN_FILE) else {}
for ch in CHANNELS:
first_run = ch not in seen # first run: just remember, don't flood
done = seen.setdefault(ch, [])
try:
feed = ET.fromstring(call(FEED.format(ch)))
except urllib.error.URLError:
continue # YouTube's feed sometimes errors; try next run
for entry in reversed(feed.findall("a:entry", NS)): # oldest first
vid = entry.find("yt:videoId", NS).text
link = entry.find("a:link", NS).get("href")
if vid in done:
continue
done.append(vid)
if first_run or (SKIP_SHORTS and "/shorts/" in link):
continue
name = entry.find("a:author/a:name", NS).text
title = entry.find("a:title", NS).text
call(WEBHOOK, json.dumps({"content": f"📺 **{name}** uploaded: {title}\n{link}"[:2000]}).encode())
seen[ch] = done[-100:]
json.dump(seen, open(SEEN_FILE, "w"))
Set the webhook as an environment variable (Windows: setx DISCORD_WEBHOOK_URL "your-webhook-url", then open a new window), put your channel IDs in CHANNELS, and run python youtube_to_discord.py. Repeat it every 15–30 minutes with Windows Task Scheduler (tick Repeat task every in the trigger) or a cron line on Linux.
What we tested (Oct 17, 2026): we ran this script against a real YouTube channel's live feed, with a local test endpoint standing in for Discord. The first run posted nothing. New videos were sent once, Shorts were skipped, and nothing repeated. One thing surprised us: YouTube's feed sometimes answered with a 404 or 500 error, roughly half our requests within one minute, then worked again. The script skips the channel and tries again on the next run, so you don't lose videos. We didn't send to a real Discord channel for this guide.
Want it faster than every 15 minutes?
YouTube also offers push notifications through a public hub (PubSubHubbub): you subscribe to the same feed address, and YouTube calls your server when a channel uploads a video. The catch is that you need a server with a public web address to receive the calls, and YouTube also pings it when a video's title or description changes, so you still need to skip repeats.
Twitch live notifications: EventSub basics
Twitch has no simple public feed for "went live", so a no-code trick like the YouTube feed doesn't exist. The official way is EventSub, Twitch's event system:
- Register a free Twitch developer app in the Twitch developer console to get a client ID and secret.
- Look up the streamer's user ID (a number, not their name).
- Subscribe to
stream.onlinefor that user ID. Twitch then tells you each time the stream starts. - Choose how Twitch reaches you. With webhooks, you need a public HTTPS address on port 443 and an app access token. Twitch first sends a challenge you must echo back, then signs every message with HMAC-SHA256 using a secret you choose (10 to 100 characters), and you should check that signature. With WebSockets, you use a user access token and keep a connection open, so something has to stay running, which is basically a bot.
- Post to your Discord webhook when the event arrives, for example "🔴 Name is live: twitch.tv/name".
It's very doable for a developer, but it's a small project, not a 10-minute setup.
When a bot is worth it
- You want Twitch and don't want to build and host an EventSub handler.
- You follow several creators, and want them all in one place without a script per channel.
- Restarts must not cause repeats. A good bot remembers what it already announced.
- You want nice touches, like resolving
@handlesinstead of hunting for channel IDs, or pinging an opt-in role.
Whatever you use, a few habits keep the channel useful: give alerts their own channel, ping an opt-in @live-alerts role instead of @everyone, and skip Shorts if your members only care about full videos.
Want YouTube and Twitch in one bot?
Our Stream Alert Bot ($12) posts YouTube uploads and Twitch go-lives once each, even across restarts, and resolves YouTube @handles for you. YouTube needs no API key; Twitch needs a free Twitch developer app. To be upfront: posting into a real Discord server was tested live, but its official Twitch API path is still beta (tested with mocked responses, not yet with real Twitch keys). It's a one-time purchase you run yourself.
Sources
- Discord: Channel Following FAQ
- Discord: Announcement Channel FAQ
- Discord: Intro to Webhooks
- YouTube Help: Find your YouTube user & channel IDs
- YouTube Data API: Subscribe to Push Notifications
- Twitch Developers: EventSub subscription types (stream.online)
- Twitch Developers: Managing EventSub subscriptions
- Twitch Developers: Handling webhook events