{
  "name": "Generate AI video clips from YouTube using Reka Vision API and Gmail",
  "nodes": [
    {
      "id": "687c7261-d156-4de8-9d09-2d86d713674e",
      "name": "When New Video",
      "type": "n8n-nodes-base.rssFeedReadTrigger",
      "position": [
        176,
        160
      ]
    },
    {
      "id": "bb24f83a-4eff-47fc-b69c-fe593b21f531",
      "name": "Counter Init",
      "type": "n8n-nodes-base.set",
      "position": [
        624,
        160
      ]
    },
    {
      "id": "3969f57a-82ec-4789-b2b9-5f9088d2dffb",
      "name": "Counter +1",
      "type": "n8n-nodes-base.set",
      "position": [
        1296,
        80
      ]
    },
    {
      "id": "60f7d423-5948-45f4-b8f3-6ff90ada58f1",
      "name": "If MAX Reached",
      "type": "n8n-nodes-base.if",
      "position": [
        1744,
        256
      ]
    },
    {
      "id": "0c430d67-fecd-435b-8b7f-2a917fcb977a",
      "name": "If Completed",
      "type": "n8n-nodes-base.if",
      "position": [
        1520,
        80
      ]
    },
    {
      "id": "b9657926-f93d-462d-949d-ff590ba87c84",
      "name": "Send Failure EMail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1968,
        256
      ]
    },
    {
      "id": "ec4cbbbb-7c1b-4b52-a830-c1787a73d6f1",
      "name": "Send Clip Ready EMail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1744,
        32
      ]
    },
    {
      "id": "96e99df0-74f5-4216-825f-1155d200591b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1392,
        352
      ],
      "parameters": {
        "width": 288,
        "height": 112,
        "content": "## if MAX Reached\n\nExit after 10 check to avoid infinite loop"
      }
    },
    {
      "id": "397177ca-9ed9-4a8e-b85a-92e351cfdf39",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -16,
        -80
      ],
      "parameters": {
        "width": 400,
        "height": 176,
        "content": "##  When New Video\nSet the Feed URL to the YouTube channel you want to follow \nex: https://www.youtube.com/feeds/videos.xml?channel_id=UCAr20GBQayL-nFPWFnUHNAA\n"
      }
    },
    {
      "id": "5f9a5b4a-dacb-40ea-8ff6-3b3010e1626a",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -720,
        -320
      ],
      "parameters": {
        "width": 624,
        "height": 816,
        "content": "## Try It Out!\n\n**This n8n template demonstrates how to use Reka API via HTTP to AI generate a clip automatically from a YouTube video and send an email notifications.**\n\n## How it works\n\n* Looking at"
      }
    },
    {
      "id": "1f54a8bf-0fdf-4bea-8010-9943313bbb5c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        864,
        -128
      ],
      "parameters": {
        "width": 432,
        "height": 192,
        "content": "## 💡 Waiting\nGenerating the clip can take time. The video need to be downloaded to your Reka's librart, analyzed, edit, then render. Adjust the waiting duration according the duration of your video. \n"
      }
    },
    {
      "id": "e9b9278f-cbc8-4675-a025-8881e1374c50",
      "name": "Create Reel Creation Job",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        400,
        160
      ]
    },
    {
      "id": "8d9664e5-2868-438c-96b5-d4ff45c4ee0a",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        336
      ],
      "parameters": {
        "width": 784,
        "height": 864,
        "content": "## Create Reel Creation Job\n\nThis API call will upload the video into your Reka's library and create a job for the clip.\n\n### Parameters\n- `video_urls` (string, required): URLs of input videos\n- `prom"
      }
    },
    {
      "id": "4f597663-96f5-4727-b1ed-793c967511d5",
      "name": "Get Job Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1072,
        80
      ]
    },
    {
      "id": "886c856e-f40a-41d7-973d-4733250d675e",
      "name": "Wait 10 minutes",
      "type": "n8n-nodes-base.wait",
      "position": [
        848,
        160
      ]
    }
  ],
  "connections": {
    "Counter +1": {
      "main": [
        [
          {
            "node": "If Completed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Counter Init": {
      "main": [
        [
          {
            "node": "Wait 10 minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If Completed": {
      "main": [
        [
          {
            "node": "Send Clip Ready EMail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "If MAX Reached",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Job Status": {
      "main": [
        [
          {
            "node": "Counter +1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If MAX Reached": {
      "main": [
        [
          {
            "node": "Send Failure EMail",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 10 minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When New Video": {
      "main": [
        [
          {
            "node": "Create Reel Creation Job",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 10 minutes": {
      "main": [
        [
          {
            "node": "Get Job Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Reel Creation Job": {
      "main": [
        [
          {
            "node": "Counter Init",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}