AutomationFlowsAI & RAG › Youtube Report Generator

Youtube Report Generator

ByMauricio Perera @rckflr on n8n.io

This template enables users to generate analytical reports from YouTube video subtitles, providing insights into the thematic content of the video. Designed for efficiency and simplicity, it processes video subtitles without requiring an API key, making it an accessible solution…

Webhook trigger★★★★☆ complexityAI-powered8 nodesHTTP RequestChain LlmGoogle Gemini Chat
AI & RAG Trigger: Webhook Nodes: 8 Complexity: ★★★★☆ AI nodes: yes Added:

This workflow corresponds to n8n.io template #2663 — we link there as the canonical source.

This workflow follows the Chainllm → HTTP Request recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "nP0jpScffi653CjX",
  "name": "YouTube Subtitles Report Generator",
  "tags": [],
  "nodes": [
    {
      "id": "60e90a8d-d97a-4e9b-91f4-cc24af3bf22d",
      "name": "Trigger Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -280,
        0
      ],
      "parameters": {
        "path": "c18956b9-f9b7-4fc8-b01c-67d5c9eeddd9",
        "options": {},
        "responseMode": "responseNode"
      },
      "typeVersion": 2
    },
    {
      "id": "8c51d64f-e380-4bee-9ce6-d0417a833167",
      "name": "Extract Subtitles URLs",
      "type": "n8n-nodes-base.code",
      "position": [
        320,
        0
      ],
      "parameters": {
        "jsCode": "// Get the HTML content\nconst html = items[0].json.data;\n\n// Search for the subtitles block in the HTML\nconst match = html.match(/\\\"captions\\\":\\\\{.*?\\\\}/);\n\nif (!match) {\n    throw new Error(\"No subtitles information found in the HTML.\");\n}\n\n// Extract the subtitles block\nconst captionsBlock = match[0];\n\n// Search for all base URLs of subtitles\nconst baseUrlMatches = [...captionsBlock.matchAll(/\\\"baseUrl\\\":\\\"(.*?)\\\"/g)];\n\nif (!baseUrlMatches.length) {\n    throw new Error(\"No subtitle URLs found.\");\n}\n\n// Decode and clean all base URLs\nconst baseUrls = baseUrlMatches.map(match => \n    decodeURIComponent(match[1]).replace(/\\\\\\u0026/g, \"&\")\n);\n\n// Return all URLs as the node's output\nreturn baseUrls.map(url => ({ json: { baseUrl: url } }));\n"
      },
      "typeVersion": 2
    },
    {
      "id": "87193be8-889e-464c-b4b6-08486b5f187c",
      "name": "Fetch Video HTML",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -20,
        0
      ],
      "parameters": {
        "url": "https://www.youtube.com/watch",
        "options": {},
        "sendQuery": true,
        "sendHeaders": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "v",
              "value": "={{ $json.query.id }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "User-Agent",
              "value": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"
            },
            {
              "name": "Accept",
              "value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8"
            },
            {
              "name": "Accept-Language",
              "value": "en-US,en;q=0.5"
            },
            {
              "name": "Connection",
              "value": "keep-alive"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "73db26d3-7934-4dfe-af79-4827c64a9872",
      "name": "Fetch Subtitles Content",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        660,
        0
      ],
      "parameters": {
        "url": "={{ $json.baseUrl }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "fb7aa63c-9664-4311-ba29-8e46eb3b02e2",
      "name": "Generate Analytical Report",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        900,
        0
      ],
      "parameters": {
        "text": "={{ $json.data }}",
        "messages": {
          "messageValues": [
            {
              "message": "**Prompt:**  \nYour task is to process subtitles in XML format and generate an **analytical report** focusing on the main theme of the transcript. The report should focus solely on the theme and must not explicitly refer to the source of the content (e.g., avoid phrases like \"this video\" or \"this dialogue\").  \n\n**Instructions:**  \n1. **Input:**  \n   - You will receive subtitles in XML format. This format will include tags such as <text>, <cue>, or similar that structure the data.  \n2. **Extraction:**  \n   - Ignore the XML tags and extract only the textual content.  \n   - Maintain consistency and logical flow of the content during extraction.  \n3. **Analysis:**  \n   - Identify the main ideas, key concepts, recurring themes, and connections between them.  \n   - Focus on the themes discussed and their overall relevance.  \n4. **Report:**  \n   - Write a direct and analytical report that synthesizes the central theme.  \n   - Use formal and objective language without referencing the format or source of the subtitles.  \n   - Ensure the report is clear, well-structured, and centered on the theme.  \n\n**Report Format:**  \n- **Title:** A brief phrase capturing the essence of the main theme.  \n- **Body of the report:** An analytical description of the main theme in **a maximum of 3 paragraphs**, with concise and coherent explanations.  \n\n**Example Output:**  \n\n**Title:** The Ethical Challenges of Artificial Intelligence  \n\n**Report:**  \nArtificial intelligence presents significant challenges in areas such as privacy, fairness, and automated decision-making. Its implementation in critical sectors such as healthcare, justice, and security has sparked debates about inherent biases and lack of transparency. Additionally, there is growing concern over the ethical implications of automation, including its impact on employment and the global economy. Finally, the importance of establishing strong regulatory frameworks is highlighted to balance technological innovation with the protection of human rights.  \n\nApply this structure to any XML subtitle to transform it into a clear and professional thematic report."
            }
          ]
        },
        "promptType": "define"
      },
      "typeVersion": 1.5
    },
    {
      "id": "64604d71-c0ef-465d-a2f2-9dabd8456a89",
      "name": "AI Model Configuration",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        980,
        200
      ],
      "parameters": {
        "options": {
          "temperature": 0.4
        },
        "modelName": "models/gemini-1.5-flash-002"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "fabb904d-b27d-4202-9b2d-8b1d76c6a597",
      "name": "Return Analytical Report",
      "type": "n8n-nodes-base.respondToWebhook",
      "position": [
        1260,
        0
      ],
      "parameters": {
        "options": {},
        "respondWith": "text",
        "responseBody": "={{ $json.text }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "c7345678-9abc-4ef0-8bdf-1234567890ab",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -500,
        0
      ],
      "parameters": {
        "height": 200,
        "content": "This workflow processes YouTube video subtitles to generate a thematic analytical report.\n\nSteps:\n1. Trigger the workflow using the Webhook node with a YouTube video ID.\n2. Fetch HTML content and extract subtitle data.\n3. Process the subtitles and generate an AI-powered analytical report.\n4. Return the report as the response to the webhook.\n\nNotes:\n- This workflow extracts data directly from YouTube's public HTML, requiring no API key.\n- Execution costs depend on the language model used and the length of the video (token count).\n- Using the free tier of models like Google Gemini is recommended to minimize costs."
      },
      "typeVersion": 1
    }
  ],
  "active": true,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "01e378ed-fb29-4826-9d43-5ed5cf8579de",
  "connections": {
    "Trigger Webhook": {
      "main": [
        [
          {
            "node": "Fetch Video HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Video HTML": {
      "main": [
        [
          {
            "node": "Extract Subtitles URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Model Configuration": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Analytical Report",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Extract Subtitles URLs": {
      "main": [
        [
          {
            "node": "Fetch Subtitles Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Subtitles Content": {
      "main": [
        [
          {
            "node": "Generate Analytical Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Analytical Report": {
      "main": [
        [
          {
            "node": "Return Analytical Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This template enables users to generate analytical reports from YouTube video subtitles, providing insights into the thematic content of the video. Designed for efficiency and simplicity, it processes video subtitles without requiring an API key, making it an accessible solution…

Source: https://n8n.io/workflows/2663/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

ANIS_HUB 1. Uses gmail, googleDrive, googleSheets, httpRequest. Webhook trigger; 89 nodes.

Gmail, Google Drive, Google Sheets +3
AI & RAG

CLINICAINTEGRAL_secretary. Uses postgres, mcpClientTool, googleDriveTool, toolWorkflow. Webhook trigger; 89 nodes.

Postgres, Mcp Client Tool, Google Drive Tool +14
AI & RAG

secretaria. Uses postgres, n8n-nodes-evolution-api, openAi, httpRequest. Webhook trigger; 71 nodes.

Postgres, N8N Nodes Evolution Api, OpenAI +12
AI & RAG

Resume Screening & Behavioral Interviews with Gemini, Elevenlabs, & Notion ATS copy. Uses outputParserStructured, chainLlm, googleDrive, stickyNote. Webhook trigger; 67 nodes.

Output Parser Structured, Chain Llm, Google Drive +9
AI & RAG

Candidate Engagement | Resume Screening | AI Voice Interviews | Applicant Insights

Output Parser Structured, Chain Llm, Google Drive +9