Telegram YouTube Downloader n8n Workflow (MP3/MP4) via ytdlp-api
Telegram YouTube Downloader n8n Workflow (MP3/MP4) via ytdlp-api
Regular price
£78.99
Regular price
£78.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Telegram YouTube Downloader n8n Workflow (MP3/MP4) via ytdlp-api
Regular price
£78.99
Regular price
£78.99
Sale price
Unit price
/
per
Turn Telegram into a YouTube (MP3/MP4) Downloader with ytdlp-api — powered by n8n
This n8n workflow lets users request YouTube downloads directly in Telegram. It uses ytdlp-api to probe/search and download media, then delivers MP3/MP4 files (or cached Telegram file_id results) back to the chat for fast, repeat-friendly delivery.
What this workflow does
Built around a Telegram bot experience with interactive cards and inline mode, the workflow:
- Triggers on Telegram messages, button presses, and inline queries using the Telegram bot.
- Handles inline queries by checking a PostgreSQL cache first, optionally running a live ytdlp-api search, and then answering with cached audio/video file_ids or deep links back to the bot.
- Handles message inputs by parsing YouTube/playlist links, supported non-YouTube links, search terms, or a /stats command.
- Probes media via ytdlp-api, then sends a Telegram photo card with download buttons for MP3/MP4 (and playlist audio when applicable).
- On download button taps, optionally re-probes playlists to create a per-track job list, updates a progress message, and checks PostgreSQL for an existing cached Telegram file_id.
- On cache hits, sends the cached file directly from Telegram and records the cache hit in PostgreSQL.
- On cache misses, downloads/streams through ytdlp-api, uploads to Telegram as audio or video, cleans up server-side job files, and stores the resulting file_id plus download history in PostgreSQL (or records failures).
Use cases
- Give your users a Telegram interface to fetch YouTube MP3/MP4 without leaving chat.
- Build a SaaS-style “download assistant” where repeat requests benefit from PostgreSQL caching.
- Enable quick search and delivery using Telegram inline mode results with cached file_ids.
Technical details
- Telegram (bot token from @BotFather, interactive cards, inline queries)
- ytdlp-api (probing, search, and downloads)
- PostgreSQL (cache and statistics; stores Telegram file_id + download history)
- n8n logic nodes such as if, code, switch, plus supporting nodes like sticky note
