{
  "name": "Track competitor YouTube videos using WayinVideo summarization and Gmail",
  "nodes": [
    {
      "id": "a3cec5ab-e0cb-4b54-9d99-304c4f8d3b75",
      "name": "📋 Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1920,
        -2400
      ],
      "parameters": {
        "width": 502,
        "height": 984,
        "content": "## 🔍 Competitor Video Analyzer → 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 "
      }
    },
    {
      "id": "f34b2e45-57cb-4914-af88-dad77f8801ab",
      "name": "🎬 Submit Video for Summary",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1120,
        -1952
      ]
    },
    {
      "id": "11ce82a3-34db-466a-818c-0e4ff683f12d",
      "name": "⏳ Wait 30 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -880,
        -1952
      ]
    },
    {
      "id": "b4a73b87-6707-46b8-b2c9-72449557ead2",
      "name": "🔄 Poll for Summary Results",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -624,
        -1952
      ]
    },
    {
      "id": "638e98a1-ac08-49fd-a033-bd9bf349902b",
      "name": "✅ Summary Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        -384,
        -1952
      ]
    },
    {
      "id": "7cf6315b-da28-4ec7-b7de-755e7e0a72cd",
      "name": "📧 Build Competitor Analysis Email",
      "type": "n8n-nodes-base.code",
      "position": [
        -48,
        -1968
      ]
    },
    {
      "id": "2af75058-4d9b-4f96-98f8-67836064e0fd",
      "name": "📨 Send Analysis via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        288,
        -1968
      ]
    },
    {
      "id": "f923610b-c424-4ea1-a52d-9c03ebae8d4a",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        -2160
      ],
      "parameters": {
        "width": 336,
        "height": 256,
        "content": "## 🎬 Submit Video for AI Analysis\n\n• Takes video URL from user input\n• Sends it to WayinVideo API\n• Starts AI summary generation\n\n👉 This is where analysis begins"
      }
    },
    {
      "id": "efbd893a-7939-4bb8-96fd-d1fa162c6978",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -2160
      ],
      "parameters": {
        "width": 352,
        "height": 256,
        "content": "## ⏳ Wait & Fetch Results\n\n• Waits 30 seconds for processing\n• Checks API for summary results\n• Uses job ID to track progress\n\n👉 Gives time for AI to process video"
      }
    },
    {
      "id": "54e5395e-91ba-4be3-a4f8-d402c8869c02",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -2160
      ],
      "parameters": {
        "width": 304,
        "height": 256,
        "content": "## 🔁 Check if Summary is Ready\n\n• Verifies if status = SUCCEEDED\n• If NOT ready → waits again (loop)\n• If ready → moves forward\n\n👉 Smart retry system until result is ready"
      }
    },
    {
      "id": "be8d009a-9b61-4eaf-9231-f0d3eb660ef9",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -144,
        -2160
      ],
      "parameters": {
        "width": 288,
        "height": 240,
        "content": "## 📧 Build Email Report\n\n• Extracts title, summary, tags\n• Creates styled HTML email\n• Adds highlights with timestamps\n\n👉 Converts data into readable report"
      }
    },
    {
      "id": "e1473acc-3538-4f04-b549-b4eabb1f6b89",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        176,
        -2160
      ],
      "parameters": {
        "width": 272,
        "height": 240,
        "content": "## 📨 Send Email Report\n\n• Sends report via Gmail\n• Uses subject & HTML content\n• Delivers final analysis to inbox\n\n👉 Final output to user"
      }
    },
    {
      "id": "a1839725-6839-478d-b8ca-3ca8f538910e",
      "name": "Chat Message",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -1376,
        -1952
      ]
    }
  ],
  "connections": {
    "Chat Message": {
      "main": [
        [
          {
            "node": "🎬 Submit Video for Summary",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "✅ Summary Ready?": {
      "main": [
        [
          {
            "node": "📧 Build Competitor Analysis Email",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "⏳ Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏳ Wait 30 Seconds": {
      "main": [
        [
          {
            "node": "🔄 Poll for Summary Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎬 Submit Video for Summary": {
      "main": [
        [
          {
            "node": "⏳ Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔄 Poll for Summary Results": {
      "main": [
        [
          {
            "node": "✅ Summary Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📧 Build Competitor Analysis Email": {
      "main": [
        [
          {
            "node": "📨 Send Analysis via Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}