Send a YouTube Link via Telegram, Auto-Transcribe and Generate a Shorts Script
Input: YouTube video URL (sent via Telegram); Processing: Supadata transcript + Gemini 2.5 Pro script generation; Output: title and script returned via Telegram
- Who
- Content creators and social media marketers who need to quickly repurpose long videos into YouTube Shorts scripts
- You get
- Send any YouTube link to a Telegram bot and receive a 170–200 word Shorts script (title + body) within minutes
Constraints
Deploy on a self-hosted n8n instance (community nodes are incompatible with n8n Cloud). Install the n8n-nodes-supadata community node, then register three credentials in n8n: telegramApi (bot token from BotFather), supadataApi (from https://supadata.com/), and googlePalmApi (Gemini API key). Once the workflow is active, sending a YouTube link to the Telegram bot triggers the automation.
What they did
Template author taiki built an n8n workflow where a user sends a YouTube link to a Telegram bot. The workflow uses the Supadata community node to fetch the video transcript, flattens the transcript segments into a single text block, feeds it to Google Gemini 2.5 Pro to generate a ~170–200 word YouTube Shorts script, and returns the title and script body to the user via Telegram.
How it went
The author reports that the template automates transcription, summarization, and scriptwriting, reducing manual work and enabling mobile triggering via Telegram. (author_report; not tested by this site)
Worth knowing
1) The community node n8n-nodes-supadata is only compatible with self-hosted n8n, not n8n Cloud. 2) The connections object in workflow.json references 'Edit Fields', but the corresponding node in nodes[] is named 'Script mapping' (type n8n-nodes-base.set); they are the same node. 3) The Gemini node uses models/gemini-2.5-pro but the credential type is still labeled googlePalmApi, a legacy n8n naming convention. 4) The template does not include retry logic or fallback handling for empty transcripts. 5) The source does not disclose Supadata transcription pricing or rate limits.
Steps
Prepare environment and credentials
Ensure you are running a self-hosted n8n instance, as the community node is not compatible with n8n Cloud. Install n8n-nodes-supadata via Settings > Community Nodes. Then add three credentials in n8n: Telegram API (bot token from BotFather), Supadata API (sign up at https://supadata.com/), and Google Gemini API (use the googlePalmApi credential type with your Gemini API key).
Install the community node
In the n8n interface, go to Settings > Community Nodes, click Install, enter the package name n8n-nodes-supadata, and confirm. The Supadata node will appear in the node panel after installation.
Import the template and configure nodes
Import this workflow from the n8n template library (or rebuild manually from workflow.json). Verify credentials are bound to each node: Input URL (Telegram Trigger) uses telegramApi; Make Transcribe (Supadata) uses supadataApi; Google Gemini Chat Model uses googlePalmApi. The Script mapping (Set) node contains the expression `={{ $json.content.map(item => item.text).join('\n') }}` to flatten the Supadata transcript array into a single text block. The Parsing (Structured Output Parser) node expects a JSON Schema with title and script fields.
Configure the AI script generation prompt
Open the Create Script (Basic LLM Chain) node and confirm promptType is define and hasOutputParser is true. This node contains two source prompts: a system message that defines the script style and format constraints, and a user text field that feeds the full transcript as background context.
Execution prompt · Source text。Create Script node messages.messageValues[0].message (system message)
=You are a professional scriptwriter for YouTube Shorts, specializing in trivia across various genres. Based on the background information from the YouTube transcript provided by the user, you will create the ultimate script to captivate viewers. Your expertise lies in crafting scripts that interestingly convey fascinating trivia hidden in science, nature, culture, and daily life. Please use an intelligent yet friendly narrative style. #Conditions The content must be based on accurate information. Structure the script to introduce a lot of trivia at a good tempo, minimizing transitional words. Speak intelligently in a casual tone. The script should be approximately 170-200 words. The opening sentence must be a shocking fact or a line that strongly stimulates the viewer's curiosity. Get straight to the point. Do not include narration or timestamps; generate only the pure script text. Create the script based on the background information from the provided YouTube transcript. Do not use bold text. Use periods to break lines appropriately. #Output Format title: script:
Execution prompt · Source text。Create Script node text field (user message / background context)
=#background information {{ $json.full_script }}Activate and test
Activate the workflow. Send a YouTube video URL to your Telegram bot. The workflow will execute automatically: fetch transcript → flatten text → Gemini generates script → parse structured output → return result via Telegram. You should receive a message containing the title and script body.
Execution prompt · Source text。Send Summary node text field (Telegram message template)
={{ $json.output.title }} {{ $json.output.script }}
Prompt you can copy
Setup guidance · Editorial suggestion。交给搭建助手,先确认输入和权限
This block is the prompt. Ads are never placed here.
You are assisting someone to reproduce an n8n workflow template. First confirm they have: 1) a self-hosted n8n instance, 2) a Telegram bot created via BotFather, and 3) Supadata and Gemini API keys. Then guide them to install the community node, import the workflow, bind credentials, and activate for testing. Do not perform API calls on their behalf.
Confirm self-hosted n8n before starting; this community node is not available on n8n Cloud.
Source
Create YouTube shorts scripts from video links with Gemini AI and Telegram · taiki · n8n.io · 2025-07-09
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.