Auto-summarize YouTube videos with n8n and GPT-4o-mini
YouTube URL in → transcript extraction → GPT-4o-mini structured Markdown summary → JSON response with optional Telegram push
- Who
- Researchers, students, and content operators who need to digest video content quickly
- You get
- POST a YouTube URL and receive a structured Markdown summary with topics, key points, and technical terms within seconds, plus a Telegram notification
Constraints
Prerequisites: self-hosted n8n (community node required). Credentials needed: YouTube Data API v3, OpenAI API Key, Telegram Bot Token (optional). Input is a public YouTube video URL; output is a JSON summary object. Costs depend on OpenAI token usage and self-hosting.
What they did
Author joe published an n8n workflow template that receives a YouTube URL via webhook, extracts the video ID and transcript, generates a hierarchically structured Markdown summary using GPT-4o-mini, returns a JSON response, and pushes the title and link via Telegram. The template uses the community node n8n-nodes-youtube-transcription for transcript extraction, so it is limited to self-hosted n8n.
How it went
The template is published on the n8n template library with 115,968 views (source: n8n API author_report). The author describes that it returns a structured summary within seconds and supports multiple YouTube URL formats.
Worth knowing
1. Community node restriction: the YouTube Transcript node is a community node and cannot be used on n8n Cloud; self-hosted is required. 2. Credential requirements: although workflow.json shows empty credential_types, actual execution requires YouTube Data API v3 credentials (for metadata), an OpenAI API Key (for gpt-4o-mini), and a Telegram Bot Token (if notifications are enabled). 3. Transcript availability: only works on public YouTube videos with available captions; videos without captions or requiring login will fail. 4. Model swappable: the node is named gpt-4o-mini, but the OpenAI Chat Model node can be switched to gpt-4 or other compatible models. 5. Fixed output schema: the Response Object hardcodes topics as an empty array =[]; auto-extracting a topic list requires additional node modifications. 6. Not tested by UKnowHow: reproduction=not_tested; effects described are author-reported and structurally derived, not UKnowHow-verified. (Note) The source description phrase "GPT-4 powered analysis engine" is author marketing; the configured node is gpt-4o-mini — do not treat GPT-4 as a models tag.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- After import, connect your own credentials on auth-required nodes; author secrets are not included.
Configuration to replace
- Source template is n8n public workflow #2679 (~12 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-25
Steps
Receive URL and extract video ID
After importing the template, confirm the Webhook node path is ytube, method is POST, and response mode is responseNode. The Get YouTube URL node reads youtubeUrl from the webhook body. The YouTube Video ID node runs this JavaScript to extract the 11-character video ID from youtu.be or youtube.com links:
Execution prompt · Source text。YouTube Video ID node jsCode field
const extractYoutubeId = (url) => { // Regex pattern that matches both youtu.be and youtube.com URLs const pattern = /(?:youtube\.com\/(?:[^\/]+\/.+\/|(?:v|e(?:mbed)?)\/|.*[?&]v=)|youtu\.be\/)([^"&?\/\s]{11})/; const match = url.match(pattern); return match ? match[1] : null; }; // Input URL from previous node const youtubeUrl = items[0].json.youtubeUrl; // Adjust this based on your workflow // Process the URL and return the video ID return [{ json: { videoId: extractYoutubeId(youtubeUrl) } }];Fetch video metadata and full transcript
The Get YouTube Video node calls the YouTube Data API with the videoId to retrieve title, description, and other metadata. The YouTube Transcript community node extracts the full transcript text. Note: this is a community node and only works on self-hosted n8n.
Concatenate transcript segments
The Split Out node splits the transcript array into individual records. The Concatenate node uses summarize aggregation with concatenate to join all text fields with spaces, producing a single concatenated_text string for the downstream LLM node.
Generate structured summary with GPT-4o-mini
The Summarize & Analyze Transcript node (Basic LLM Chain) connects to the gpt-4o-mini model with promptType set to define. The prompt instructs the model to break content into Level-2 topics, use bullet points, preserve technical accuracy, and organize by Definition/Background → Main characteristics → Implementation details → Advantages/Disadvantages.
Execution prompt · Source text。Summarize & Analyze Transcript node text field (promptType=define)
=Please analyze the given text and create a structured summary following these guidelines: 1. Break down the content into main topics using Level 2 headers (##) 2. Under each header: - List only the most essential concepts and key points - Use bullet points for clarity - Keep explanations concise - Preserve technical accuracy - Highlight key terms in bold 3. Organize the information in this sequence: - Definition/Background - Main characteristics - Implementation details - Advantages/Disadvantages 4. Format requirements: - Use markdown formatting - Keep bullet points simple (no nesting) - Bold important terms using **term** - Use tables for comparisons - Include relevant technical details Please provide a clear, structured summary that captures the core concepts while maintaining technical accuracy. Here is the text: {{ $json.concatenated_text }}Build response object
The Response Object node (Edit Fields/Set) assembles the final JSON with: summary (from LLM output text), topics (empty array), title (from YouTube snippet.title), description (snippet.description), id (video ID), and youtubeUrl (original input URL).
Return webhook response and push Telegram
The Respond to Webhook node returns the Response Object as the HTTP response. The Telegram node simultaneously sends a message to the configured chat with the video title and original URL, parse_mode set to HTML, and appendAttribution set to false.
Execution prompt · Source text。Telegram node text field
={{ $json.title }} {{ $json.youtubeUrl }}
Prompt you can copy
Setup guidance · Editorial suggestion。Give to setup assistant; confirm inputs and permissions first
This block is the prompt. Ads are never placed here.
You are an n8n workflow setup assistant. The user wants to recreate the "AI-powered YouTube video summarization & analysis" template. Assist in this order: 1. Confirm the user runs self-hosted n8n (community node restriction). 2. Check that three credentials are configured: YouTube Data API v3, OpenAI API Key, and Telegram Bot Token (if using Telegram). 3. Guide the user to import the workflow JSON from https://n8n.io/workflows/2679/ or install from the template library. 4. Verify the Webhook path (ytube) and response mode (responseNode). 5. Suggest testing with a public YouTube URL to validate transcript extraction and LLM summary output format.
To test: curl -X POST -H "Content-Type: application/json" -d '{"youtubeUrl":"https://www.youtube.com/watch?v=..."}' https://your-n8n/webhook/ytube
Source
⚡AI-powered YouTube video summarization & analysis · joe · n8n.io · 2024-12-29
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.