{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "YouTube Video Summarizer & Thumbnail Generator",
  "tags": [],
  "nodes": [
    {
      "id": "47f3c8bd-0b9d-4777-a4c9-caa8f10d032f",
      "name": "Sticky Note - Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        16
      ],
      "parameters": {
        "width": 668,
        "height": 780,
        "content": "## Try It Out!\n### Automatically summarize any YouTube video and generate a custom thumbnail using AI.\n\nThis workflow transcribes a YouTube video, uses AI to create a summary and an optimized thumbnail prompt, generates a professional thumbnail image, and uploads everything to Google Drive.\n\n### How it works\n1. **Manual Trigger** starts the workflow\n2. **Set YouTube URL** defines the video to process\n3. **deAPI Transcribe** extracts the full transcript using Whisper\n4. **AI Agent** summarizes the transcript and uses the deAPI Prompt Booster tool to craft an optimized thumbnail prompt\n5. **deAPI Generate Image** creates a professional YouTube thumbnail in landscape (1280x720)\n6. **Google Drive** uploads the thumbnail image\n\n### Requirements\n- [deAPI](https://deapi.ai) account for transcription and image generation\n- Anthropic account for AI Agent\n- Google Drive API access for file uploads\n- n8n instance must be on **HTTPS**\n\n### Need Help?\nJoin the [n8n Discord](https://discord.gg/n8n) or ask in the [Forum](https://community.n8n.io/)!\n\nHappy Automating!"
      },
      "typeVersion": 1
    },
    {
      "id": "705bc41b-6bd7-44bc-9380-6ed9c3aa6134",
      "name": "Sticky Note - Trigger",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        16
      ],
      "parameters": {
        "color": 7,
        "height": 412,
        "content": "## 1. Manual Trigger\nClick **Test workflow** to start.\n\nYou can swap this for a **Form Trigger** to let users submit YouTube URLs through a web form."
      },
      "typeVersion": 1
    },
    {
      "id": "08c7ea13-2df5-4212-a0a1-c198b1ce3a61",
      "name": "Sticky Note - Set URL",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 412,
        "content": "## 2. Set YouTube URL\nReplace the placeholder URL with any YouTube video link.\n\nSupported platforms:\n- YouTube\n- Twitch VODs\n- X (Twitter)\n- Kick"
      },
      "typeVersion": 1
    },
    {
      "id": "3a031393-6cd8-49fa-8cd8-e2b7a32d8cee",
      "name": "Sticky Note - Transcribe",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 260,
        "height": 412,
        "content": "## 3. Transcribe Video\n[deAPI Documentation](https://docs.deapi.ai)\n\nUses **Whisper Large V3** to transcribe the video with timestamps.\n\nThe transcript is passed to the AI Agent for summarization."
      },
      "typeVersion": 1
    },
    {
      "id": "c5527e3f-8b45-4a75-823f-ad305c716407",
      "name": "Sticky Note - AI Agent",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1504,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 464,
        "height": 652,
        "content": "## 4. AI-Powered Summary & Prompt\n[Read more about AI Agents](https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent)\n\nThe AI Agent analyzes the transcript and:\n- Writes a concise summary with key points\n- Crafts a thumbnail prompt using the **deAPI Image Prompt Booster** tool\n\nThe **Structured Output Parser** ensures consistent JSON output."
      },
      "typeVersion": 1
    },
    {
      "id": "5d737fa3-559d-43f7-a0e3-ea3d34cb9261",
      "name": "Sticky Note - Generate",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2064,
        16
      ],
      "parameters": {
        "color": 7,
        "width": 284,
        "height": 428,
        "content": "## 5. Generate Thumbnail\n[deAPI Documentation](https://docs.deapi.ai)\n\nGenerates a **1280x720** landscape image \u2014 the standard YouTube thumbnail size.\n\nUses the AI-boosted prompt for best results."
      },
      "typeVersion": 1
    },
    {
      "id": "95ed146a-5a15-48b3-928b-746f431f0462",
      "name": "Sticky Note - Upload",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2464,
        0
      ],
      "parameters": {
        "color": 7,
        "width": 328,
        "height": 444,
        "content": "## 6. Upload to Google Drive\n[Read more about Google Drive node](https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.googledrive)\n\nUploads the generated thumbnail image to your Google Drive.\n\nYou can also extend this to save the summary to a Google Doc or send it via Slack/email."
      },
      "typeVersion": 1
    },
    {
      "id": "f32cfb1d-28c0-4911-a01e-26ebeb16af99",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        528,
        272
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1a839833-bd9d-4e53-a9d6-545f153b3935",
      "name": "Set YouTube URL",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        272
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "youtube-url-field",
              "name": "youtubeUrl",
              "type": "string",
              "value": "https://www.youtube.com/watch?v=YOUR_VIDEO_ID"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "afa6e183-b8a9-44c4-9ad7-90ad54f6bf45",
      "name": "deAPI Transcribe Video",
      "type": "n8n-nodes-deapi.deapi",
      "position": [
        1232,
        272
      ],
      "parameters": {
        "options": {
          "waitTimeout": 600
        },
        "resource": "video",
        "videoUrl": "={{ $json.youtubeUrl }}",
        "operation": "transcribe",
        "includeTimestamps": false
      },
      "credentials": {
        "deApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "36c624a4-312e-4973-9ff0-530ad7dfc307",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1616,
        272
      ],
      "parameters": {
        "text": "=Here is the transcript of a YouTube video. Please summarize it and create a thumbnail prompt.\n\n{{ $json.data.transcription }}",
        "options": {
          "systemMessage": "You are a YouTube content expert. You will receive a video transcript.\n\nYour tasks:\n1. Write a concise summary of the video with 3-5 key bullet points.\n2. Create a compelling YouTube thumbnail image prompt that visually captures the video's main theme. Think bold, eye-catching, and clickable.\n3. Use the imagePromptBooster tool to enhance your thumbnail prompt.\n\nReturn the summary and the boosted thumbnail prompt in the required JSON format."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "357781f0-4a39-4932-962f-93d0fa15a8fb",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1856,
        512
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"summary\": \"- Key point 1\\n- Key point 2\\n- Key point 3\",\n  \"boosted_prompt\": \"a vivid, eye-catching YouTube thumbnail depicting...\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "3fc567fa-ab28-489a-a4ca-e390759e4cde",
      "name": "Image prompt booster in deAPI",
      "type": "n8n-nodes-deapi.deapiTool",
      "position": [
        1696,
        512
      ],
      "parameters": {
        "prompt": "={{ $fromAI('Prompt', ``, 'string') }}",
        "options": {},
        "resource": "prompt"
      },
      "credentials": {
        "deApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "f3c5e8f3-1909-465c-9dfc-0bad07336cca",
      "name": "Anthropic Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatAnthropic",
      "position": [
        1536,
        512
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "claude-opus-4-6",
          "cachedResultName": "Claude Opus 4.6"
        },
        "options": {}
      },
      "credentials": {
        "anthropicApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "063d6884-8832-44c5-9ddd-ee1262a5353e",
      "name": "deAPI Generate Thumbnail",
      "type": "n8n-nodes-deapi.deapi",
      "position": [
        2160,
        272
      ],
      "parameters": {
        "ratio": "landscape",
        "prompt": "={{ $json.output.boosted_prompt }}",
        "options": {
          "waitTimeout": 120,
          "Flux2LandscapeSize": "1280x720"
        }
      },
      "credentials": {
        "deApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6e7fda92-867f-4a21-a33a-b40aaa6aee42",
      "name": "Google Drive Upload",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2576,
        272
      ],
      "parameters": {
        "name": "=thumbnail_{{ $json.job_request_id }}.png",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "id",
          "value": "YOUR_GOOGLE_DRIVE_FOLDER_ID"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 3
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "AI Agent": {
      "main": [
        [
          {
            "node": "deAPI Generate Thumbnail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set YouTube URL": {
      "main": [
        [
          {
            "node": "deAPI Transcribe Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Anthropic Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "deAPI Transcribe Video": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "deAPI Generate Thumbnail": {
      "main": [
        [
          {
            "node": "Google Drive Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Image prompt booster in deAPI": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Set YouTube URL",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}