AutomationFlowsEmail & Gmail › Summarize Competitor YouTube Videos to Gmail

Summarize Competitor YouTube Videos to Gmail

Original n8n title: Track Competitor Youtube Videos Using Wayinvideo Summarization and Gmail

ByIncrementors @incrementors on n8n.io

Paste any competitor's YouTube URL in chat — and this n8n workflow does everything automatically. WayinVideo API reads the entire video, extracts the summary, key highlights with timestamps, and hashtags — then builds a clean styled HTML report and delivers it straight to your…

Chat trigger trigger★★★★☆ complexityAI-powered13 nodesHTTP RequestGmailChat Trigger
Email & Gmail Trigger: Chat trigger Nodes: 13 Complexity: ★★★★☆ AI nodes: yes Added:

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

This workflow follows the Chat Trigger → Gmail 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
{
  "nodes": [
    {
      "id": "a3cec5ab-e0cb-4b54-9d99-304c4f8d3b75",
      "name": "\ud83d\udccb Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -2400
      ],
      "parameters": {
        "width": 502,
        "height": 984,
        "content": "## \ud83d\udd0d Competitor Video Analyzer \u2192 Email Report\n\n**What it does:**\nUser pastes a competitor's YouTube URL in chat. WayinVideo AI generates a full summary with key highlights & tags. The workflow builds a styled HTML report and emails it automatically.\n\n**How it works:**\n1. \ud83d\udcac User sends a competitor video URL via chat\n2. \ud83c\udfac Video is submitted to WayinVideo for AI summarization\n3. \u23f3 Waits 30s, then polls until summary is ready\n4. \ud83d\udd04 If not ready \u2192 waits 30s again (auto-retry loop)\n5. \ud83d\udce7 Builds a styled HTML email with title, summary, highlights & hashtags\n6. \ud83d\udce8 Sends the report to your email via Gmail\n\n---\n\n**\ud83d\udd11 Credentials to Add:**\n- Gmail \u2192 Connect OAuth2 credential\n\n**\ud83d\udd27 Placeholders to Fill:**\n\n`YOUR_WAYINVIDEO_API_KEY`\n\u2192 Your WayinVideo API Bearer token\n  Get it from: wayinvideo.com/dashboard/api\n  (used in both Submit & Poll nodes)\n\n`YOUR_REPORT_EMAIL@domain.com`\n\u2192 Email address where the analysis report will be sent\n  (in the Send Gmail node)\n\n---\n\n**\u2699\ufe0f Customise (in Submit node):**\n- `target_lang` \u2192 Change summary language\n  e.g. \"en\", \"hi\", \"es\", \"fr\"\n\n**\u2699\ufe0f Customise (in Build Email node):**\n- Edit HTML template to match your brand colors\n- Add/remove sections like hashtags or highlights\n\n---\n\n**\u26a0\ufe0f Note:**\nLong videos may take >30s to process.\nThe workflow auto-retries every 30s until the summary is ready."
      },
      "typeVersion": 1
    },
    {
      "id": "f34b2e45-57cb-4914-af88-dad77f8801ab",
      "name": "\ud83c\udfac Submit Video for Summary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1120,
        -1952
      ],
      "parameters": {
        "url": "https://wayinvideo-api.wayin.ai/api/v2/summaries",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "video_url",
              "value": "={{ $json.chatInput }}"
            },
            {
              "name": "target_lang",
              "value": "en"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_WAYINVIDEO_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "11ce82a3-34db-466a-818c-0e4ff683f12d",
      "name": "\u23f3 Wait 30 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -880,
        -1952
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 30
      },
      "typeVersion": 1
    },
    {
      "id": "b4a73b87-6707-46b8-b2c9-72449557ead2",
      "name": "\ud83d\udd04 Poll for Summary Results",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -624,
        -1952
      ],
      "parameters": {
        "url": "=https://wayinvideo-api.wayin.ai/api/v2/summaries/results/{{ $('\ud83c\udfac Submit Video for Summary').item.json.data.id }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer YOUR_WAYINVIDEO_API_KEY"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            },
            {
              "name": "x-wayinvideo-api-version",
              "value": "v2"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "638e98a1-ac08-49fd-a033-bd9bf349902b",
      "name": "\u2705 Summary Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        -384,
        -1952
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 3,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "cond-succeeded",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.data.status }}",
              "rightValue": "SUCCEEDED"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "7cf6315b-da28-4ec7-b7de-755e7e0a72cd",
      "name": "\ud83d\udce7 Build Competitor Analysis Email",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        -1968
      ],
      "parameters": {
        "jsCode": "const data = $json.data;\n\nconst title = data.title || 'Untitled Video';\nconst summary = data.summary || 'No summary available.';\nconst tags = (data.tags || []).join(' ');\nconst videoUrl = $('\ud83c\udfac Submit Video for Summary').item.json.body?.video_url || $('Chat Message').item.json.chatInput || '';\n\n// Build highlights section\nlet highlightsHtml = '';\nif (data.highlights && data.highlights.length > 0) {\n  for (const h of data.highlights) {\n    const startSec = Math.floor(h.start / 1000);\n    const endSec = Math.floor(h.end / 1000);\n    const mins = m => Math.floor(m / 60);\n    const secs = m => m % 60;\n    const timeLabel = `${String(mins(startSec)).padStart(2,'0')}:${String(secs(startSec)).padStart(2,'0')} - ${String(mins(endSec)).padStart(2,'0')}:${String(secs(endSec)).padStart(2,'0')}`;\n\n    let eventsHtml = '';\n    if (h.events && h.events.length > 0) {\n      eventsHtml = '<ul style=\"margin:4px 0 0 0; padding-left:18px;\">';\n      for (const e of h.events) {\n        const eSec = Math.floor(e.timestamp / 1000);\n        const eTime = `${String(mins(eSec)).padStart(2,'0')}:${String(secs(eSec)).padStart(2,'0')}`;\n        eventsHtml += `<li style=\"color:#555; font-size:13px; margin-bottom:3px;\">[${eTime}] ${e.desc}</li>`;\n      }\n      eventsHtml += '</ul>';\n    }\n\n    highlightsHtml += `\n      <div style=\"border-left:3px solid #4A90E2; padding:8px 12px; margin-bottom:12px; background:#f9f9f9; border-radius:0 6px 6px 0;\">\n        <p style=\"margin:0 0 4px 0; font-weight:600; color:#1a1a1a; font-size:14px;\">${h.desc}</p>\n        <p style=\"margin:0 0 4px 0; color:#888; font-size:12px;\">${timeLabel}</p>\n        ${eventsHtml}\n      </div>`;\n  }\n}\n\nconst emailBody = `\n<div style=\"font-family:Arial,sans-serif; max-width:640px; margin:0 auto;\">\n\n  <div style=\"background:#4A90E2; padding:20px 24px; border-radius:8px 8px 0 0;\">\n    <h2 style=\"margin:0; color:#fff; font-size:20px;\">Competitor Video Analysis</h2>\n    <p style=\"margin:4px 0 0 0; color:#dce8f8; font-size:13px;\">Powered by WayinVideo + n8n</p>\n  </div>\n\n  <div style=\"border:1px solid #e0e0e0; border-top:none; padding:20px 24px; border-radius:0 0 8px 8px;\">\n\n    <h3 style=\"margin:0 0 6px 0; color:#1a1a1a;\">${title}</h3>\n    <p style=\"margin:0 0 16px 0;\">\n      <a href=\"${videoUrl}\" style=\"color:#4A90E2; font-size:13px;\">${videoUrl}</a>\n    </p>\n\n    <h4 style=\"margin:0 0 8px 0; color:#333; border-bottom:1px solid #eee; padding-bottom:6px;\">Summary</h4>\n    <p style=\"color:#444; line-height:1.6; margin:0 0 20px 0;\">${summary}</p>\n\n    <h4 style=\"margin:0 0 10px 0; color:#333; border-bottom:1px solid #eee; padding-bottom:6px;\">Key Highlights</h4>\n    ${highlightsHtml || '<p style=\"color:#888;\">No highlights available.</p>'}\n\n    <h4 style=\"margin:16px 0 8px 0; color:#333; border-bottom:1px solid #eee; padding-bottom:6px;\">Hashtags</h4>\n    <p style=\"color:#4A90E2; font-size:13px; margin:0;\">${tags}</p>\n\n  </div>\n\n  <p style=\"color:#bbb; font-size:11px; text-align:center; margin-top:12px;\">Generated by WayinVideo + n8n automation</p>\n</div>\n`;\n\nreturn [{\n  json: {\n    subject: `Competitor Analysis: ${title}`,\n    body: emailBody\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "2af75058-4d9b-4f96-98f8-67836064e0fd",
      "name": "\ud83d\udce8 Send Analysis via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        288,
        -1968
      ],
      "parameters": {
        "sendTo": "YOUR_REPORT_EMAIL@domain.com",
        "message": "={{ $json.body }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ $json.subject }}"
      },
      "typeVersion": 2.1
    },
    {
      "id": "f923610b-c424-4ea1-a52d-9c03ebae8d4a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -2160
      ],
      "parameters": {
        "color": 7,
        "width": 336,
        "height": 256,
        "content": "## \ud83c\udfac Submit Video for AI Analysis\n\n\u2022 Takes video URL from user input\n\u2022 Sends it to WayinVideo API\n\u2022 Starts AI summary generation\n\n\ud83d\udc49 This is where analysis begins"
      },
      "typeVersion": 1
    },
    {
      "id": "efbd893a-7939-4bb8-96fd-d1fa162c6978",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -2160
      ],
      "parameters": {
        "color": 7,
        "width": 352,
        "height": 256,
        "content": "## \u23f3 Wait & Fetch Results\n\n\u2022 Waits 30 seconds for processing\n\u2022 Checks API for summary results\n\u2022 Uses job ID to track progress\n\n\ud83d\udc49 Gives time for AI to process video"
      },
      "typeVersion": 1
    },
    {
      "id": "54e5395e-91ba-4be3-a4f8-d402c8869c02",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -2160
      ],
      "parameters": {
        "color": 7,
        "width": 304,
        "height": 256,
        "content": "## \ud83d\udd01 Check if Summary is Ready\n\n\u2022 Verifies if status = SUCCEEDED\n\u2022 If NOT ready \u2192 waits again (loop)\n\u2022 If ready \u2192 moves forward\n\n\ud83d\udc49 Smart retry system until result is ready"
      },
      "typeVersion": 1
    },
    {
      "id": "be8d009a-9b61-4eaf-9231-f0d3eb660ef9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -2160
      ],
      "parameters": {
        "color": 7,
        "width": 288,
        "height": 240,
        "content": "## \ud83d\udce7 Build Email Report\n\n\u2022 Extracts title, summary, tags\n\u2022 Creates styled HTML email\n\u2022 Adds highlights with timestamps\n\n\ud83d\udc49 Converts data into readable report"
      },
      "typeVersion": 1
    },
    {
      "id": "e1473acc-3538-4f04-b549-b4eabb1f6b89",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -2160
      ],
      "parameters": {
        "color": 7,
        "width": 272,
        "height": 240,
        "content": "## \ud83d\udce8 Send Email Report\n\n\u2022 Sends report via Gmail\n\u2022 Uses subject & HTML content\n\u2022 Delivers final analysis to inbox\n\n\ud83d\udc49 Final output to user"
      },
      "typeVersion": 1
    },
    {
      "id": "a1839725-6839-478d-b8ca-3ca8f538910e",
      "name": "Chat Message",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1376,
        -1952
      ],
      "parameters": {
        "public": true,
        "options": {},
        "initialMessages": "Hi! Send me a competitor YouTube video URL and I will summarize it and email you the key insights.\n\nExample: https://www.youtube.com/watch?v=XXXXXXXXX"
      },
      "typeVersion": 1.1
    }
  ],
  "connections": {
    "Chat Message": {
      "main": [
        [
          {
            "node": "\ud83c\udfac Submit Video for Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2705 Summary Ready?": {
      "main": [
        [
          {
            "node": "\ud83d\udce7 Build Competitor Analysis Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u23f3 Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u23f3 Wait 30 Seconds": {
      "main": [
        [
          {
            "node": "\ud83d\udd04 Poll for Summary Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83c\udfac Submit Video for Summary": {
      "main": [
        [
          {
            "node": "\u23f3 Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd04 Poll for Summary Results": {
      "main": [
        [
          {
            "node": "\u2705 Summary Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udce7 Build Competitor Analysis Email": {
      "main": [
        [
          {
            "node": "\ud83d\udce8 Send Analysis via Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

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

About this workflow

Paste any competitor's YouTube URL in chat — and this n8n workflow does everything automatically. WayinVideo API reads the entire video, extracts the summary, key highlights with timestamps, and hashtags — then builds a clean styled HTML report and delivers it straight to your…

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

More Email & Gmail workflows → · Browse all categories →

Related workflows

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

Email & Gmail

"I used to spend hours every week just copy-pasting product descriptions to find the right tariff codes for our international shipments. It was tedious and prone to errors." - Accounting specialist.

Chat Trigger, HTTP Request, Google Sheets +1
Email & Gmail

This template adapts Andrej Karpathy’s LLM Council concept for use in n8n, creating a workflow that collects, evaluates, and synthesizes multiple large language model (LLM) responses to reduce individ

Chat Trigger, HTTP Request, Email Send
Email & Gmail

In this workflow, we augment the original prompt using the InfraNodus GraphRAG system that will extract a reasoning ontology from a graph that you create (or that you can copy from our repository of p

Chat Trigger, HTTP Request
Email & Gmail

This template is ideal for HR teams, startup founders, operations leads, remote-first companies, and freelancers managing onboarding manually or across multiple tools.

Google Sheets Trigger, Jira, HubSpot Trigger +7
Email & Gmail

Splitout Googlecalendar. Uses gmail, googleCalendar, lmChatOpenAi, informationExtractor. Event-driven trigger; 61 nodes.

Gmail, Google Calendar, OpenAI Chat +5