{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "23425883-d0c7-498b-af48-c82044436def",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3184,
        4048
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7c56b8ed-6eff-4098-8f54-85a686ce5d12",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3744,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "40512f46-051b-42bd-b14c-aa6616a6a148",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4192,
        4128
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8c69af8b-0086-4911-8bbd-3c18d54fac2c",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5520,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "07c61af2-00b3-4f16-bb40-09217fbeef31",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6192,
        4048
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "252349de-fc9a-4ee9-8ef1-168ab28e8f24",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6864,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "edbe216a-209c-4141-ad93-2eb6421b2988",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5792,
        4480
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "2fab5f88-2526-4c38-8765-682f457a9b14",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6640,
        4448
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "7ce79aaf-a40c-4aad-80bb-55557bc0a565",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5792,
        4992
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "a0c35e6b-c105-4018-80d8-bfad4ec1c155",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8064,
        4320
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "3a7c7128-c479-4e7c-a848-4d0f1b245f03",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8736,
        4464
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "b9a041e1-8280-402d-99de-b955374c860f",
      "name": "Manual Workflow Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        3792,
        4240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "57536045-0ec7-44c6-9058-754c7e86c5ea",
      "name": "Google Gemini Brainstormer",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        4336,
        4464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "f0a6856c-9a86-4df5-af3d-6eb89e7921b0",
      "name": "Google Gemini Creative Session",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        4640,
        4464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "637ecabc-9fc6-4c13-b0e3-bc445715b0eb",
      "name": "Content Creation Director",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4656,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "d280f70b-1b49-414c-9648-2a3cf15b5bc0",
      "name": "Idea Generation Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        4240,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "3faca87e-ce50-4cd6-bfad-0cb6bc39f3fb",
      "name": "Parse Structured Output",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        4768,
        4464
      ],
      "parameters": {},
      "typeVersion": 1.3
    },
    {
      "id": "ae7b6dd4-4ac8-4133-83ec-cd0368f36b63",
      "name": "DeepSeek Conversational AI",
      "type": "@n8n/n8n-nodes-langchain.lmChatDeepSeek",
      "position": [
        4864,
        4672
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "b176d573-e917-483f-b5c2-0c0bdf54c772",
      "name": "Google Gemini Prompt Design",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5264,
        4464
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "43c4d92f-8eed-402e-8a14-3d38c8bc59e8",
      "name": "Prompt Optimization Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        5168,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "4ebd95fe-fdc9-4c00-a5f1-2aeb1cd3dcc7",
      "name": "Google Gemini Complementary Ideas",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        5936,
        5392
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "6cbd4bbc-148a-4645-b22d-a42fcec62dd7",
      "name": "Post to Creatomate API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7888,
        5104
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "9637c2d9-2782-481a-94c4-528d82cc8217",
      "name": "Wait for Rendering",
      "type": "n8n-nodes-base.wait",
      "position": [
        8112,
        4528
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "d7197e13-b6e9-4552-8dba-4b6266fe1bb2",
      "name": "Check Render Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8336,
        4448
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "8f6b5a85-436b-4870-9033-faddd87f3c99",
      "name": "Upload Ad to Cloud Storage",
      "type": "n8n-nodes-base.googleCloudStorage",
      "position": [
        7360,
        4240
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 2000
    },
    {
      "id": "812b4acd-6f0c-40db-8a8b-661e8581e2cd",
      "name": "Upload Complementary File",
      "type": "n8n-nodes-base.googleCloudStorage",
      "position": [
        7360,
        4592
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 2000
    },
    {
      "id": "d197c3b9-8af1-4391-bc37-2fae347e8019",
      "name": "Complementary Insights Chain",
      "type": "@n8n/n8n-nodes-langchain.chainLlm",
      "position": [
        5840,
        5168
      ],
      "parameters": {},
      "typeVersion": 1.7
    },
    {
      "id": "637fad87-f37b-4ade-a83c-6751b550dc5b",
      "name": "Build Creatomate Request",
      "type": "n8n-nodes-base.code",
      "position": [
        7664,
        4592
      ],
      "parameters": {},
      "executeOnce": true,
      "typeVersion": 2
    },
    {
      "id": "ffd022d3-8e2c-47b5-85f5-85251a50a006",
      "name": "Set Input Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        4016,
        4240
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "20fce3cb-b883-449e-9323-377052a3a067",
      "name": "Configure API Settings",
      "type": "n8n-nodes-base.set",
      "position": [
        5568,
        4240
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "fa02a493-ba2e-48ad-ae33-eca2093fd5d6",
      "name": "Generate JWT Token",
      "type": "n8n-nodes-base.jwt",
      "position": [
        5792,
        4240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "13245bf3-6456-49f4-b20a-86eea61fe0c5",
      "name": "Fetch OAuth Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6016,
        4240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0a9c7b13-cc5e-4c13-ab60-f4c755730d9e",
      "name": "Initiate Video Creation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6240,
        4240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "3204138b-50d2-45ca-9e5c-9de7e312b636",
      "name": "Wait for Video Processing",
      "type": "n8n-nodes-base.wait",
      "position": [
        6464,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "867801a6-007f-466d-8d3a-cb158f69bce0",
      "name": "Check Processing Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6688,
        4176
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "a2a27ee0-d569-4b5a-87a4-0167e286fb9b",
      "name": "Route by Processing Outcome",
      "type": "n8n-nodes-base.switch",
      "position": [
        6912,
        4240
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "cab3973c-0b4c-4145-b4e8-03984b6dc9cd",
      "name": "Convert Ad to File",
      "type": "n8n-nodes-base.convertToFile",
      "notes": "At this step, the video should be generated and ready to convert to 9:16 aspect ratio",
      "position": [
        7136,
        4240
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "0e838b93-7980-4b60-b9a2-cb735a393f68",
      "name": "Start Complementary Video Creation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6240,
        4592
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "afa92a97-a6ed-4d31-a99d-9ccc10af863a",
      "name": "Wait for Complementary Video",
      "type": "n8n-nodes-base.wait",
      "position": [
        6464,
        4592
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "7cde9589-535f-4d94-b384-bced0cff8575",
      "name": "Check Complementary Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6688,
        4560
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "20a0f0c9-1a6f-4e02-bd6b-5112204ffe0c",
      "name": "Route Complementary Outcome",
      "type": "n8n-nodes-base.switch",
      "position": [
        6912,
        4624
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "19f0258f-9049-4491-800e-fff15f6ae649",
      "name": "Convert Complementary to File",
      "type": "n8n-nodes-base.convertToFile",
      "notes": "At this step, the video should be generated and ready to convert to 9:16 aspect ratio",
      "position": [
        7136,
        4624
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "75999404-8a2b-4a84-b5df-0693d4243aba",
      "name": "Route Final Video Outcome",
      "type": "n8n-nodes-base.switch",
      "position": [
        8560,
        4576
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "4c678417-0bdf-4f8c-bdef-eff447601cce",
      "name": "Download Final Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8784,
        4592
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "e365cf56-dd49-4797-9258-1399ef2efc6a",
      "name": "Send Video via Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        9008,
        4592
      ],
      "parameters": {},
      "typeVersion": 1.2
    }
  ],
  "connections": {
    "Fetch OAuth Token": {
      "main": [
        [
          {
            "node": "Initiate Video Creation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Ad to File": {
      "main": [
        [
          {
            "node": "Upload Ad to Cloud Storage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate JWT Token": {
      "main": [
        [
          {
            "node": "Fetch OAuth Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Rendering": {
      "main": [
        [
          {
            "node": "Check Render Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Render Status": {
      "main": [
        [
          {
            "node": "Route Final Video Outcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Input Variables": {
      "main": [
        [
          {
            "node": "Idea Generation Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Final Video": {
      "main": [
        [
          {
            "node": "Send Video via Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Idea Generation Chain": {
      "main": [
        [
          {
            "node": "Content Creation Director",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Configure API Settings": {
      "main": [
        [
          {
            "node": "Generate JWT Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Creatomate API": {
      "main": [
        [
          {
            "node": "Wait for Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Processing Status": {
      "main": [
        [
          {
            "node": "Route by Processing Outcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Initiate Video Creation": {
      "main": [
        [
          {
            "node": "Wait for Video Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Workflow Trigger": {
      "main": [
        [
          {
            "node": "Set Input Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Structured Output": {
      "ai_outputParser": [
        [
          {
            "node": "Content Creation Director",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Build Creatomate Request": {
      "main": [
        [
          {
            "node": "Post to Creatomate API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Creation Director": {
      "main": [
        [
          {
            "node": "Prompt Optimization Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prompt Optimization Chain": {
      "main": [
        [
          {
            "node": "Configure API Settings",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route Final Video Outcome": {
      "main": [
        [
          {
            "node": "Download Final Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Build Creatomate Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Rendering",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Complementary File": {
      "main": [
        [
          {
            "node": "Build Creatomate Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Video Processing": {
      "main": [
        [
          {
            "node": "Check Processing Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Complementary Status": {
      "main": [
        [
          {
            "node": "Route Complementary Outcome",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DeepSeek Conversational AI": {
      "ai_languageModel": [
        [
          {
            "node": "Parse Structured Output",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Brainstormer": {
      "ai_languageModel": [
        [
          {
            "node": "Idea Generation Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Upload Ad to Cloud Storage": {
      "main": [
        [
          {
            "node": "Complementary Insights Chain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Prompt Design": {
      "ai_languageModel": [
        [
          {
            "node": "Prompt Optimization Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Route Complementary Outcome": {
      "main": [
        [
          {
            "node": "Convert Complementary to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Complementary Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Processing Outcome": {
      "main": [
        [
          {
            "node": "Convert Ad to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Video Processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Complementary Insights Chain": {
      "main": [
        [
          {
            "node": "Start Complementary Video Creation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Complementary Video": {
      "main": [
        [
          {
            "node": "Check Complementary Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Complementary to File": {
      "main": [
        [
          {
            "node": "Upload Complementary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Creative Session": {
      "ai_languageModel": [
        [
          {
            "node": "Content Creation Director",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Complementary Ideas": {
      "ai_languageModel": [
        [
          {
            "node": "Complementary Insights Chain",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Start Complementary Video Creation": {
      "main": [
        [
          {
            "node": "Wait for Complementary Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}