{
  "name": "Generate YouTube shorts using WayinVideo AI and upload clips to Google Drive",
  "nodes": [
    {
      "id": "e5946662-78f4-4051-ba5c-65328551140a",
      "name": "📋 Setup Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -320
      ],
      "parameters": {
        "width": 476,
        "height": 968,
        "content": "## 🎬 Video → AI Clips → Google Drive\n\n**What it does:**\nUser pastes a video URL in chat (YouTube, etc). WayinVideo AI automatically finds the best short clips, adds captions, reframes to 9:16, and upl"
      }
    },
    {
      "id": "0d68a3dc-c481-408d-87cd-b7870fc4d195",
      "name": "🎬 Submit Video to WayinVideo API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1168,
        160
      ]
    },
    {
      "id": "1fdc4b1c-e744-4419-9a26-bdff9a748b2a",
      "name": "⏳ Wait 30 Seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        -848,
        160
      ]
    },
    {
      "id": "cd70538d-78a0-43e2-9211-fffbed248d9d",
      "name": "🔄 Poll for Clip Results",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -560,
        160
      ]
    },
    {
      "id": "8abd5935-8293-45d0-8b8f-ec81f2c5e9eb",
      "name": "✅ Clips Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        -320,
        160
      ]
    },
    {
      "id": "547a364c-7c59-45ba-bce5-23c2db7b2619",
      "name": "⚙️ Extract Clip Details",
      "type": "n8n-nodes-base.code",
      "position": [
        128,
        144
      ]
    },
    {
      "id": "0ea44c90-35ca-41e9-93b0-b11b6e554179",
      "name": "⬇️ Download Clip File",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        464,
        144
      ]
    },
    {
      "id": "c7042cb0-d32e-45cd-b708-f5e1ce493be7",
      "name": "☁️ Upload Clip to Google Drive",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        736,
        144
      ]
    },
    {
      "id": "f06f33ce-dbf1-4244-b8f8-12f30cf90a3f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1280,
        -48
      ],
      "parameters": {
        "width": 336,
        "height": 256,
        "content": "## 🎬 Submit Video for Processing\n\n• Sends video URL to WayinVideo API\n• Starts AI clip generation process\n• Applies settings (duration, captions, format)\n\n👉 This is where clip creation begins"
      }
    },
    {
      "id": "8e92fc58-457c-4faa-82c8-99ab7add9750",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -848,
        -48
      ],
      "parameters": {
        "width": 384,
        "height": 256,
        "content": "## ⏳ Wait & Check Processing Status\n\n• Waits 30 seconds before checking\n• Requests API to check if clips are ready\n• Uses job ID to fetch results\n\n👉 Prevents instant API calls & allows processing time"
      }
    },
    {
      "id": "fa48d725-e2b4-4901-a122-67c64be8643a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -400,
        -48
      ],
      "parameters": {
        "width": 336,
        "height": 256,
        "content": "## 🔁 Check if Clips are Ready\n\n• Checks if clips data is available\n• If NOT ready → waits again (loop)\n• If ready → moves to next step\n\n👉 Smart loop until clips are generated"
      }
    },
    {
      "id": "663307a2-ecd4-4460-a848-90f8d55a997b",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        16,
        -48
      ],
      "parameters": {
        "width": 336,
        "height": 240,
        "content": "## ⚙️ Extract Clip Information\n\n• Loops through all generated clips\n• Extracts title, link, score, tags\n• Prepares clean structured output\n\n👉 Converts API response into usable data"
      }
    },
    {
      "id": "3d323aa3-5126-41be-aa14-2461a669db84",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        464,
        -48
      ],
      "parameters": {
        "width": 368,
        "height": 240,
        "content": "## 📥 Download & Save Clips\n\n• Downloads clip using export link\n• Uploads file to Google Drive\n• Saves with clip title\n\n👉 Final storage of generated clips"
      }
    }
  ],
  "connections": {
    "✅ Clips Ready?": {
      "main": [
        [
          {
            "node": "⚙️ Extract Clip Details",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "⏳ Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏳ Wait 30 Seconds": {
      "main": [
        [
          {
            "node": "🔄 Poll for Clip Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⬇️ Download Clip File": {
      "main": [
        [
          {
            "node": "☁️ Upload Clip to Google Drive",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔄 Poll for Clip Results": {
      "main": [
        [
          {
            "node": "✅ Clips Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⚙️ Extract Clip Details": {
      "main": [
        [
          {
            "node": "⬇️ Download Clip File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🎬 Submit Video to WayinVideo API": {
      "main": [
        [
          {
            "node": "⏳ Wait 30 Seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}