Steps
Create a Telegram bot
Open @BotFather in Telegram, send
/newbot, choose a name and a username ending inbot, and copy the token (it looks like123456789:AA...). Keep it private: anyone with it can post as your bot.Choose where the alerts go
For a private chat, send your bot any message, open
https://api.telegram.org/botYOUR_TOKEN/getUpdatesand copy the number in"chat":{"id":...}. For a group, add the bot and use the group's negative id. To auto-post to your own channel, add the bot as an admin and use@yourchannel. More detail in RSS to Telegram.Get the channel's feed URL
Find the channel id (it starts with
UC): on the channel page choose Share channel → Copy channel ID, or view the page source and search forchannel_id=. The feed ishttps://www.youtube.com/feeds/videos.xml?channel_id=UC.... Want normal videos only, without Shorts? Usehttps://www.youtube.com/feeds/videos.xml?playlist_id=UULF..., replacing theUCat the start of the id withUULF(details below).Download the agent and do a dry run
Get the free RSS to Discord agent. Despite the name, it posts to Telegram and Slack too. Copy
.env.exampleto.env, setFEEDSto one or more feed URLs (comma-separated),TELEGRAM_BOT_TOKENandTELEGRAM_CHAT_ID, and leaveDISCORD_WEBHOOK_URLempty. Runpython3 rss_to_discord.py --dry-runto see the latest videos it would send.Run it every 15 minutes
The first real run only remembers the videos already in the feed, so your chat isn't flooded. After that, each new upload is sent once. Schedule it with cron, Windows Task Scheduler or a free GitHub Actions schedule:
*/15 * * * * cd /path/to/rss-to-discord && set -a && . ./.env && set +a && /usr/bin/python3 rss_to_discord.py >> run.log 2>&1
An example .env
FEEDS=https://www.youtube.com/feeds/videos.xml?playlist_id=UULF_x5XG1OV2P6uZZ5FSM9Ttw
KEYWORDS=
TELEGRAM_BOT_TOKEN=123456789:AA...
TELEGRAM_CHAT_ID=@yourchannel
DISCORD_WEBHOOK_URL=Each Telegram message is the video title in bold plus its link, so Telegram shows the video preview underneath.
Skip Shorts (or get only Shorts)
The normal channel feed mixes regular videos and Shorts. YouTube also publishes playlist feeds built from the same channel id: swap the leading UC for UULF to get regular videos only, or UUSH for Shorts only. When we checked the Google for Developers channel (UC_x5XG1OV2P6uZZ5FSM9Ttw) on 18 October 2026, its channel_id feed listed Shorts first, the UULF_x5XG1OV2P6uZZ5FSM9Ttw feed returned 15 entries that were all youtube.com/watch videos, and the UUSH one returned only youtube.com/shorts links. These playlist feeds aren't documented by YouTube, so if one ever stops working, fall back to the channel_id feed.
What we tested
On 18 October 2026 we ran the agent against the real feed of that channel, with Telegram replaced by a local stand-in for the Bot API and TELEGRAM_CHAT_ID=@mychannel. The dry run printed the newest titles and links. The first real run remembered all 15 videos and sent nothing. When we made two videos look new, the next run sent two sendMessage calls; the first attempt got 429 Too Many Requests, and the script waited the retry_after Telegram gave and resent it. The run after that sent nothing. With KEYWORDS=music, only the matching title was sent.
Several channels, filters, other apps
- Several channels: put several feed URLs in
FEEDS, separated by commas. Each new video is sent once, whichever feed it came from. - Only some videos:
KEYWORDS=tutorial,livesends only titles or descriptions containing one of those words (case-insensitive). - Discord or Slack as well: set
DISCORD_WEBHOOK_URLand/orSLACK_WEBHOOK_URLtoo. The Discord setup is in Post new YouTube videos to Discord. - Prefer n8n? An RSS Feed Trigger with the feed URL and n8n's Telegram node (Send Message) do the same job; see Remove Duplicates across executions if you poll with an RSS Read node instead.
Skip the setup: free Telegram-ready download
The RSS to Discord agent does all of this. Despite the name, it sends to Telegram too: just set TELEGRAM_BOT_TOKEN and TELEGRAM_CHAT_ID and leave the Discord webhook empty. It's tested, MIT-licensed, and comes as an n8n workflow plus a Python script.
FAQ
Do I need a YouTube API key?
No. Channel RSS feeds are public and have no key or quota.
How fast will the message arrive?
The feed usually shows a new upload within minutes. With a 15-minute schedule, expect the Telegram message 15 to 30 minutes after the video goes live.
Can I auto-post new videos to my Telegram channel?
Yes. Add your bot as an admin of the channel with permission to post, and set TELEGRAM_CHAT_ID to @yourchannel or its -100... id.
How do I stop Shorts from being posted?
Use the playlist feed with UULF instead of UC at the start of the channel id. It lists regular videos only.
Do I need a server or a bot running all the time?
No. The script calls Telegram only when there's a new video, then exits. Your PC, a Raspberry Pi or a free GitHub Actions schedule can run it.
Is it free?
Yes. YouTube feeds and the Telegram Bot API are free, and the agent is MIT-licensed.
Related guides
- Post new YouTube videos to Discord automatically (free, no bot)
- GitHub release notifications in Telegram (free, skip pre-releases)
- Reddit keyword alerts in Telegram (free, no API key)
- Send RSS feeds to Telegram with a keyword filter (free, no bot hosting)
- n8n Text Classifier not working? 30 tests, every error decoded
New guides
- GitHub release notifications in Slack (any public repo, stable releases only)
- Send RSS feeds to Slack with a keyword filter (free, incoming webhook)
- Forward emails to a Slack channel (Gmail, Outlook, any IMAP), free with an incoming webhook
- n8n Google Sheets Trigger not working: not firing, activation errors and fixes