{
  "name": "YouTube video → summary by email",
  "nodes": [
    {
      "parameters": {
        "content": "## Summary by email\nPaste a YouTube link in the form; the summary arrives by email.\n\n**YouTubeTranscriptAPI key (once):** Credentials → New → Header Auth. Name: `Authorization`. Value: `Bearer tk_live_…` (your key from youtubetranscriptapi.com/dashboard/keys). Call it *YouTubeTranscriptAPI key* and pick it in every YouTube node.\n\n**Also:** add your OpenAI key in *OpenAI Chat Model* (or swap in another model) and connect Gmail in *Email the summary*.\n\n**Cost:** 1 credit per video. Videos without captions are free and stop the run.",
        "width": 440,
        "height": 380,
        "color": 5
      },
      "id": "2bf8e87d-0cbb-4a22-8b03-3686314d5ccf",
      "name": "Setup",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -520,
        -60
      ]
    },
    {
      "parameters": {
        "formTitle": "Summarize a YouTube video",
        "formDescription": "Paste a link and get a summary by email.",
        "formFields": {
          "values": [
            {
              "fieldLabel": "YouTube link",
              "placeholder": "https://www.youtube.com/watch?v=…",
              "requiredField": true
            },
            {
              "fieldLabel": "Email",
              "fieldType": "email",
              "requiredField": true
            }
          ]
        },
        "options": {}
      },
      "id": "b07b6f50-2cbe-4b86-8ccf-34fafd22becd",
      "name": "YouTube link form",
      "type": "n8n-nodes-base.formTrigger",
      "typeVersion": 2.2,
      "position": [
        0,
        0
      ],
      "webhookId": "92971eb2-62c0-4b8a-82c0-30e7d4ee9130"
    },
    {
      "parameters": {
        "url": "https://youtubetranscriptapi.com/api/v2/youtube/transcript",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "video_url",
              "value": "={{ $json['YouTube link'] }}"
            },
            {
              "name": "format",
              "value": "text"
            },
            {
              "name": "include_timestamp",
              "value": "false"
            },
            {
              "name": "send_metadata",
              "value": "true"
            }
          ]
        },
        "options": {}
      },
      "id": "184569c2-dcd7-423c-8e79-83ed5d8b840b",
      "name": "Get transcript",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        240,
        0
      ]
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Title: {{ $json.metadata.title }}\nChannel: {{ $json.metadata.author_name }}\n\nTranscript:\n{{ $json.transcript }}",
        "messages": {
          "messageValues": [
            {
              "message": "Summarize this YouTube video for someone who hasn't watched it. Start with a one-paragraph overview, then 5 key points as bullets, then one line on who should watch it. Use only what the transcript says."
            }
          ]
        },
        "hasOutputParser": false
      },
      "id": "4fe825cb-c91a-4c49-8e36-4934e4c609e9",
      "name": "Summarize",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "typeVersion": 1.6,
      "position": [
        480,
        0
      ]
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "id": "439d0829-ac6b-4bab-80fd-b7297645c779",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        480,
        220
      ]
    },
    {
      "parameters": {
        "sendTo": "={{ $('YouTube link form').item.json.Email }}",
        "subject": "=Summary: {{ $('Get transcript').item.json.metadata.title }}",
        "emailType": "text",
        "message": "={{ $json.text }}\n\nVideo: {{ $('YouTube link form').item.json['YouTube link'] }}",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "c20e2555-d530-453b-8ec4-0da0a11fc957",
      "name": "Email the summary",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        800,
        0
      ],
      "webhookId": "6e0d3646-7360-4892-83b0-965d591e7aaa"
    }
  ],
  "connections": {
    "YouTube link form": {
      "main": [
        [
          {
            "node": "Get transcript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get transcript": {
      "main": [
        [
          {
            "node": "Summarize",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Summarize": {
      "main": [
        [
          {
            "node": "Email the summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Summarize",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "meta": {
    "templateCredsSetupCompleted": false
  }
}