Ai Agent "Summarize YouTube Videos"

Summarize YouTube Videos Ai Agent
				
					{
  "nodes": [
    {
      "id": "6d908a58-8893-48da-8311-8c28ebd8ec62",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -520,
        -280
      ],
      "parameters": {
        "color": 7,
        "width": 1160,
        "height": 120,
        "content": "**Summarize YouTube videos**\n\nThis project automates the summarization of YouTube videos, transforming lengthy content into concise, actionable insights. By leveraging AI and workflow automation, it extracts video transcripts, analyzes key points, and generates summaries, saving time for content creators, researchers, and professionals. Perfect for staying informed, conducting research, or repurposing video content efficiently."
      },
      "typeVersion": 1
    },
    {
      "id": "98de613a-1b1e-4b46-915f-7bebcfd6a931",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        120
      ],
      "parameters": {
        "width": 230,
        "height": 80,
        "content": "Add the full YouTube URL. ☝️\nYou can change this input to a webhook or anything else."
      },
      "typeVersion": 1
    },
    {
      "id": "064208d4-52c3-46a9-9f9f-d37258189d06",
      "name": "Request YouTube Transcript",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -200,
        -20
      ],
      "parameters": {
        "url": "Apify API_KEY Here ???",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n    \"startUrls\": [\n        \"{{ $json['Full URL'] }}\"\n    ]\n}",
        "sendBody": true,
        "specifyBody": "json"
      },
      "typeVersion": 4.2
    },
    {
      "id": "ba5e52fd-18b1-4232-961c-b53b01e21202",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -280,
        -140
      ],
      "parameters": {
        "color": 3,
        "width": 280,
        "height": 340,
        "content": "Once you follow the Setup Instructions (mentioned in the template page description), you can insert the full URL endpoint, which includes both the POST Endpoint and API Key. πŸ‘‡"
      },
      "typeVersion": 1
    },
    {
      "id": "f3caad55-0c7d-4e8e-8649-79cc25b4e6aa",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        380,
        -20
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "8d72e533-a053-4317-9437-9d80d3ed098f",
      "name": "Summarization of a YouTube script",
      "type": "@n8n/n8n-nodes-langchain.chainSummarization",
      "position": [
        40,
        -20
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "8f4e1c7c-286b-48aa-8f50-404e8f1d430b",
      "name": "YouTube video URL",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -420,
        -20
      ],
      "webhookId": "3dc17600-3020-40b1-be8f-e65ef45269b6",
      "parameters": {
        "options": {
          "path": "ddd"
        },
        "formTitle": "Summarize YouTube video's",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Full URL"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "fb861e09-d415-4f32-a4de-a6ff84ac7f7b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        380,
        120
      ],
      "parameters": {
        "color": 4,
        "height": 100,
        "content": "☝️ Optional\nIf the workflow ends here, Consider checking with another enrichment service."
      },
      "typeVersion": 1
    },
    {
      "id": "17c0dc77-bee4-4271-b957-e0c793537a03",
      "name": "Summarization Engine",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        40,
        160
      ],
      "parameters": {
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "g0eql8rqZWICDd5g",
          "name": "OpenAi"
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "a8d5362e-459e-4a76-8ee2-b1eb977215a2",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        40,
        -140
      ],
      "parameters": {
        "color": 5,
        "width": 280,
        "content": "The summarization node works automatically and professionally, recognizing the input text and processing it directly without requiring any enhancements from your sideπŸ‘‡"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "YouTube video URL": {
      "main": [
        [
          {
            "node": "Request YouTube Transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization Engine": {
      "ai_languageModel": [
        [
          {
            "node": "Summarization of a YouTube script",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Request YouTube Transcript": {
      "main": [
        [
          {
            "node": "Summarization of a YouTube script",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarization of a YouTube script": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
				
			

Workflow Summary: “Summarize YouTube Videos”

βœ… Purpose

Automatically summarizes YouTube videos using AI by:

  1. Taking a YouTube video URL.

  2. Fetching its transcript (via Apify API).

  3. Passing the transcript to a summarization node (LangChain/OpenAI).

  4. Returning the summarized result.


🧩 Key Nodes & Flow

  1. Form Trigger (YouTube video URL)

    • Accepts the full YouTube video URL from a form.

    • Webhook path: ddd

  2. Request YouTube Transcript (HTTP Request)

    • Sends the URL to Apify (or similar API) to fetch transcript.

    • ⚠️ Note: The URL in this node is placeholder text:
      "Apify API_KEY Here ???" β†’ Needs replacement with the real API endpoint including the key.

  3. Summarization of a YouTube script

    • LangChain node connected to lmChatOpenAi.

    • Automatically processes the text and returns a concise summary.

  4. Summarization Engine

    • OpenAI chat model (likely GPT-4 or GPT-3.5) providing the LLM backend for the summarizer.

  5. No Operation

    • Placeholder node signaling the end of the workflow (optionally expandable).


🧠 Suggestions & Enhancements

1. πŸ”‘ Fix Transcript API Request

Your Request YouTube Transcript node needs the actual Apify Actor or endpoint that extracts YouTube transcripts. Here’s how to fix:

  • Replace Apify API_KEY Here ??? with the full POST request URL like:

    bash
    https://api.apify.com/v2/actor-tasks/<ACTOR_ID>/run-sync-get-dataset-items?token=<YOUR_API_KEY>
  • Example JSON Body:

    json
    { "startUrls": [ { "url": "{{ $json['Full URL'] }}" } ] }

2. ✨ Improve Summary Output

You can add a Markdown formatting or export step after summarization to:

  • Send result to Notion, Google Docs, or email.

  • Present a clean summary with bullet points or sections (e.g., Overview, Key Points, Action Items).

3. πŸ“€ Output Option

Consider adding:

  • Webhook Response Node: So the user sees the summary directly after submission.

  • Or connect a Gmail/Telegram/Slack node to notify or deliver results.

4. πŸ§ͺ Add Testing or Retry Logic

If the Apify/Transcript fetch fails, retry with a delay or provide fallback messaging.


πŸ”§ Bonus: Agent Logic (Conceptual)

Your workflow represents a multi-agent system with:

  • Input Agent: Takes URL input.

  • Scraper Agent: Fetches raw transcript.

  • Summarizer Agent: Converts transcript into insights.

  • Orchestrator (n8n): Coordinates task execution.


βœ… Final Output Options

You can extend the No-Op end to:

  • Display summary via webhook response.

  • Store in Google Sheets.

  • Post to a private Notion workspace.

  • Create a downloadable .txt or .pdf.

Scroll to Top