AI Chatbot for YouTube Summarization and Analysis - n8n Workflow

Deploy a powerful n8n workflow chatbot to analyze YouTube videos. Extract transcripts, fetch details, and generate structured summaries using an n8n agent and custom n8n node logic.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Content Researchers: Individuals needing quick, structured summaries of technical YouTube content. n8n Developers: Users interested in learning how to create complex n8n Agent workflows utilizing custom tools and code nodes. Digital Marketers: Professionals looking to rapidly analyze video content for repurposing into text formats. Automation Enthusiasts: Anyone seeking advanced n8n templates integrating external APIs (YouTube Data) with conversational AI.

Overview

This comprehensive n8n workflow solves the problem of manually sifting through long YouTube videos for key information. It leverages the power of a conversational AI Agent, allowing users to simply paste a video ID and ask for a detailed summary or analysis. The workflow is structured into two main parts: the interactive AI Chatbot and a dedicated YouTube Video Processing Tool. This tooling approach, a key feature of advanced n8n workflow design, ensures that the AI only retrieves and processes the extensive transcript data when necessary, maximizing efficiency. By combining native n8n node functionality with custom scripting, this particular n8n workflow provides a reusable and highly customizable solution for video content analysis.

How it Works

This powerful automation operates on a dual-trigger system, showcasing an advanced application of n8n templates:


  1. Chat Trigger: The process begins when the user sends a message via the When chat message received n8n trigger node.

  2. Agent Orchestration: The YouTube Video Agent (a LangChain Agent) receives the message and analyzes the user's intent. Its system prompt is designed to recognize and extract the YouTube video ID.

  3. Tool Invocation: If a video ID is detected, the Agent autonomously decides to call the YouTube Processing Tool n8n node.

  4. Tool Execution (Internal Workflow Call): The YouTube Processing Tool is implemented using the When Executed by Another Workflow n8n trigger.

It first uses Workflow Variables to define the necessary VIDEOID and the GOOGLEAPI_KEY.
It then forks into two parallel paths: one uses an n8n code node (Create YouTube API URL) and an HTTP Request n8n node (Get YouTube Video Details) to fetch video metadata from the Google Data API. The other uses a custom n8n node (Get YouTube Transcript) to scrape the transcript.
* The transcript segments are processed (Split Out and Combine) into a single text item.

  1. Data Consolidation: The metadata and the full transcript are merged and aggregated (Merge YouTube Details & Transcript and Create One JSON Object).

  2. Response Generation: The consolidated data is returned to the YouTube Video Agent. The Agent then uses the retrieved transcript and its detailed system instructions to generate a structured, technically accurate summary, which is finally returned to the user via the When chat message received n8n trigger's response mechanism.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n template: Copy the provided JSON code and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Setup OpenAI Credentials: Configure the required API keys for the Language Model (LLM) nodes (gpt-4o-mini1). You must ensure these credentials are linked correctly in the respective n8n node settings.

  3. Configure YouTube API Key: In the Workflow Variables n8n node, replace [Your-Google-API-Key] with your actual Google API key, which must have access to the YouTube Data API V3. This is crucial for the Get YouTube Video Details n8n node to function.

  4. Activate the Workflow: Set the When chat message received n8n trigger to active and make a note of its webhook URL to start chatting with your AI Agent.

  5. Initial Testing: Execute the entire n8n workflow manually using the test input provided in the When Executed by Another Workflow n8n trigger to ensure the data retrieval part works correctly before relying on the AI Agent interaction.

Node Details

This advanced n8n workflow relies on several specialized and custom n8n node types:

When chat message received (n8n trigger): The primary n8n trigger for the chatbot. It listens for incoming chat inputs, supplying the user's message (chatInput) to the agent.
YouTube Video Agent: The core intelligence. This LangChain Agent n8n node handles decision-making, using its gpt-4o-mini model (or DeepSeek as an alternative) to decide whether to answer directly or invoke a tool.
Function: Orchestrates the conversational flow and summary generation.
Key Configuration: Contains an extremely detailed system message instructing the AI on how to structure the output (using Markdown headers, bullet points, and specific content organization) and explicitly instructing it to identify and extract the videoId for tool use.
YouTube Processing Tool: An essential toolWorkflow n8n node that allows the agent to call the video extraction logic embedded within the same n8n workflow.
Function: Exposes the video processing capabilities to the AI Agent.
Key Configuration: Description clearly states its purpose: "Call this tool to get details and transcript from a YouTube video. Get the videoId from the user's prompt."
Get YouTube Transcript (Code n8n node): A custom n8n code node that uses the external youtube-transcript library.
Function: Fetches the complete textual transcript based on the provided VIDEO_ID.
Key Configuration: Requires youtube-transcript to be available in the n8n environment (via npm i -g youtube-transcript).
Get YouTube Video Details (HTTP Request n8n node): Uses the youtubeUrl constructed by the preceding code node.
Function: Retrieves official metadata (title, statistics, description) from the YouTube Data API V3.

Related n8n Workflows

Free

Nodes: 14 Nodes
Updated: December 26 2025
View all
Created by
Joseph LePage
Joseph LePage

As an AI Automation consultant based in Canada, I partner with forward-thinking organizations to implement AI solutions that streamline operations and drive growth.

Featured*