YouTube Video Summarizer with Telegram Notification
High-Level Summary
This workflow automatically processes YouTube videos by fetching their transcripts, generating a structured AI-powered summary using OpenAI's GPT-4o-mini, and sending the summary along with video metadata to a Telegram chat. It is triggered via a webhook, making it easy to integrate with other tools or services (e.g., a browser extension, a form, or another automation). The workflow is ideal for content curators, researchers, or teams who want to quickly digest video content without watching the full video.
Workflow Steps
- Webhook — Receives an incoming HTTP POST request containing a YouTube URL in the request body. This is the entry point of the workflow. (No auth)
- Get YouTube URL (Set node) — Extracts the
youtubeUrlfield from the incoming webhook payload and stores it as a string variable for downstream use. (No auth) - YouTube Video ID (Code node) — Runs a JavaScript function that parses the YouTube URL using a regex pattern to extract the 11-character video ID (supports both
youtube.comandyoutu.beformats). (No auth) - Get YouTube Video (YouTube node) — Uses the extracted video ID to fetch video metadata (title, description, etc.) from the YouTube Data API v3. (OAuth2 — requires a Google Cloud project with YouTube Data API enabled)
- YouTube Transcript (Community node:
n8n-nodes-youtube-transcription) — Fetches the transcript/captions for the video. This node requires the video ID (passed from the previous step). (No auth — uses public YouTube captions) - Split Out (SplitOut node) — Splits the transcript array into individual items so each text segment can be processed separately. (No auth)
- Concatenate (Summarize node) — Concatenates all transcript text segments into a single string, separated by spaces, to prepare the full transcript for analysis. (No auth)
- gpt-4o-mini (OpenAI Chat Model node) — Configures the OpenAI language model (GPT-4o-mini) that will be used for summarization. (API Key auth — requires an OpenAI API key)
- Summarize & Analyze Transcript (LLM Chain node) — Sends the concatenated transcript to the GPT-4o-mini model with a detailed prompt asking for a structured summary with headers, bullet points, bold terms, and tables. The output is a markdown-formatted analysis. (No auth — uses the model configured in the previous node)
- Response Object (Set node) — Assembles the final output object containing:
summary: The AI-generated summary texttopics: An empty array (placeholder for future use)title: The video title from YouTube metadatadescription: The video description from YouTube metadataid: The YouTube video IDyoutubeUrl: The original YouTube URL from the webhook (No auth)
- Respond to Webhook — Sends the assembled response object back to the original webhook caller (e.g., a browser extension or app). (No auth)
- Telegram — Sends a message to a specified Telegram chat containing the video title and the YouTube URL. (API Key auth — requires a Telegram Bot Token and chat ID)
Setup Instructions
To use this workflow, you will need the following accounts and credentials:
- OpenAI Account: Create an account at platform.openai.com and generate an API key. Add this as a credential in n8n under "OpenAI".
- Google Cloud Project: Enable the YouTube Data API v3 in your Google Cloud Console, create OAuth 2.0 credentials (Desktop app type), and add them in n8n under "YouTube OAuth2 API".
- Telegram Bot: Create a bot via @BotFather on Telegram to get a Bot Token. Find your chat ID (e.g., by messaging your bot and visiting
https://api.telegram.org/bot<YOUR_TOKEN>/getUpdates). Add the token as a credential in n8n under "Telegram API". - Webhook URL: After activating the workflow, copy the production webhook URL (e.g.,
https://your-n8n-instance.com/webhook/ytube). You will send POST requests to this URL with a JSON body like{"youtubeUrl": "https://www.youtube.com/watch?v=VIDEO_ID"}.
Use Cases and Variations
- Content Curation: Automatically summarize long conference talks, tutorials, or webinars and share them with your team on Telegram.
- Research Assistant: Collect video transcripts and AI summaries for later reference or database storage.
- Browser Extension Integration: Pair this workflow with a browser extension that sends the current YouTube URL to the webhook when clicked.
- Variations:
- Replace Telegram with Slack, Discord, or email notifications.
- Store summaries in a Google Sheet or Airtable for a searchable archive.
- Add a filter to skip videos shorter than a certain duration.
- Use a different LLM (e.g., Claude, Gemini) by swapping the OpenAI node.
- Add error handling to notify you if a video has no captions.
12 nodeswebhook triggerProductivity
WebhookYoutube TranscripterSplit OutRespond To WebhookTelegramSetCodeYou Tube
Workflow JSON
{
"nodes": [
{
"id": "9320d08a-4868-4103-abdf-3f8f54a7a0a0",
"name": "Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
0,
0
],
"webhookId": "9024e29e-9080-4cf5-9a6b-0d918468f195",
"parameters": {
"path": "ytube",
"options": {},
"httpMethod": "POST",
"responseMode": "responseNode"
},
"typeVersion": 2
},
{
"id": "a5cc8922-8124-4269-9cfd-e891b29cc2b7",
"name": "YouTube Transcript",
"type": "n8n-nodes-youtube-transcription.youtubeTranscripter",
"position": [
800,
0
],
"parameters": {},
"typeVersion": 1
},
{
"id": "ff3c0fd1-36d8-4d64-b405-0600efd4d93b",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
200,
260
],
"parameters": {
"options": {},
"fieldToSplitOut": "transcript"
},
"typeVersion": 1
},
{
"id": "423276e0-81bf-487a-bbdd-26e9b84fa755",
"name": "Respond to Webhook",
"type": "n8n-nodes-base.respondToWebhook",
"position": [
1200,
// ... truncated (copy to see full JSON)How to Import This Workflow
- 1Copy the workflow JSON above using the Copy Workflow JSON button.
- 2Open your n8n instance and go to Workflows.
- 3Click Import from JSON and paste the copied workflow.
Don't have an n8n instance? Start your free trial at n8nautomation.cloud