{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "381bed7f-738e-4550-a884-04ede7356524",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3728,
        3984
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "622ec285-548c-4b3c-b57f-6017b8e5bf13",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4288,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "75cd421c-c284-4767-a6e8-428bc00d08e6",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4736,
        4128
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "235e9c08-1924-49a9-87a9-0507728cb1d5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5360,
        4048
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "f29c2f31-4f8f-44e9-be19-22dc83d18238",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5984,
        3984
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "cee95cad-845e-4506-be2f-ce90df218d08",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7328,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "8a801f90-995e-43ad-bf33-4c81d2d01add",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7776,
        4048
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "9c9ab707-874f-4668-81bf-5d556f3a6c43",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        8704,
        4112
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "278f4d6c-9c66-4088-9f74-d619f970d6f3",
      "name": "Convert Data to File Format",
      "type": "n8n-nodes-base.convertToFile",
      "notes": "At this step, the video should be generated and ready to convert to 9:16 aspect ratio",
      "position": [
        7376,
        4240
      ],
      "parameters": {},
      "notesInFlow": true,
      "typeVersion": 1.1
    },
    {
      "id": "26cf664a-a4aa-4dea-beef-217eba3ba6ef",
      "name": "Route by Condition",
      "type": "n8n-nodes-base.switch",
      "position": [
        7152,
        4224
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "ec53dfdf-e4b3-4277-9996-2a82601d0b42",
      "name": "Post to API for Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6928,
        4096
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "b1acdb47-575b-4567-95a5-1f90e8d4ce51",
      "name": "Wait 20 Seconds A",
      "type": "n8n-nodes-base.wait",
      "position": [
        6704,
        4160
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "d1101323-210d-42d0-bfdf-767dd6d11f90",
      "name": "Post to Start Video Generation",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6480,
        4160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "0323bb31-9a79-41d1-b68e-7f8fa29e55c5",
      "name": "Generate JWT Token",
      "type": "n8n-nodes-base.jwt",
      "position": [
        6032,
        4160
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "18327181-ac64-4465-96d9-4ad7c0a21ed3",
      "name": "Fetch OAuth Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6256,
        4160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "4d572345-20b6-43cd-b8e0-ed9139655a69",
      "name": "Set API and Project Details",
      "type": "n8n-nodes-base.set",
      "position": [
        5808,
        4160
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "8c79260a-b1a6-4c5c-ad04-ca5198e79daf",
      "name": "Fetch Final Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8752,
        4240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "6b63af2a-b7f5-4b72-a6ae-89ab315fbc90",
      "name": "Send Video via Telegram",
      "type": "n8n-nodes-base.telegram",
      "position": [
        8976,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "b0b8102b-2d9b-4a32-ba81-37fd6b11e60f",
      "name": "AI Describe Product Image",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        5184,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "f7ed53af-04d1-4e87-b4a8-282dc0727419",
      "name": "AI Generate VeoPrompt",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        5408,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "1a9d34a0-bc9f-4fec-a2bf-daaa54cff990",
      "name": "Upload File to Google Cloud Storage",
      "type": "n8n-nodes-base.googleCloudStorage",
      "position": [
        7600,
        4240
      ],
      "parameters": {},
      "retryOnFail": true,
      "typeVersion": 1,
      "waitBetweenTries": 2000
    },
    {
      "id": "03d2472f-abae-4842-bbab-c636898df520",
      "name": "Post to Add Captions API",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7824,
        4240
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "06272ae3-15a7-46b4-964a-127e4933cf51",
      "name": "Wait for Render Completion",
      "type": "n8n-nodes-base.wait",
      "position": [
        8048,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "bb36c741-a057-42a7-a8b6-009fbf7be4ac",
      "name": "Check If Captions Added",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        8272,
        4160
      ],
      "parameters": {},
      "typeVersion": 4.2
    },
    {
      "id": "f46b88af-2974-44ca-b80d-8488f9ffdd42",
      "name": "AI Messaging Model",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        4784,
        4240
      ],
      "parameters": {},
      "typeVersion": 1.8
    },
    {
      "id": "4c5c2ee6-78df-49ea-b643-770969beb6af",
      "name": "Manual Workflow Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        4336,
        4240
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "1088b429-44fc-4199-8939-968bbaff67af",
      "name": "Set Form Data",
      "type": "n8n-nodes-base.set",
      "position": [
        4560,
        4240
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "a4be7a81-9772-482c-9591-65652af52e54",
      "name": "Route by Caption Status",
      "type": "n8n-nodes-base.switch",
      "position": [
        8512,
        4240
      ],
      "parameters": {},
      "typeVersion": 3.2
    }
  ],
  "connections": {
    "Set Form Data": {
      "main": [
        [
          {
            "node": "AI Messaging Model",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Final Video": {
      "main": [
        [
          {
            "node": "Send Video via Telegram",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch OAuth Token": {
      "main": [
        [
          {
            "node": "Post to Start Video Generation",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 20 Seconds A": {
      "main": [
        [
          {
            "node": "Post to API for Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Messaging Model": {
      "main": [
        [
          {
            "node": "AI Describe Product Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate JWT Token": {
      "main": [
        [
          {
            "node": "Fetch OAuth Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Condition": {
      "main": [
        [
          {
            "node": "Convert Data to File Format",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "AI Generate VeoPrompt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 20 Seconds A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Generate VeoPrompt": {
      "main": [
        [
          {
            "node": "Set API and Project Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to API for Status": {
      "main": [
        [
          {
            "node": "Route by Condition",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check If Captions Added": {
      "main": [
        [
          {
            "node": "Route by Caption Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Workflow Trigger": {
      "main": [
        [
          {
            "node": "Set Form Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Route by Caption Status": {
      "main": [
        [
          {
            "node": "Fetch Final Video",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Post to Add Captions API",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Render Completion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Render Completion",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait for Render Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Add Captions API": {
      "main": [
        [
          {
            "node": "Wait for Render Completion",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Describe Product Image": {
      "main": [
        [
          {
            "node": "AI Generate VeoPrompt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Render Completion": {
      "main": [
        [
          {
            "node": "Check If Captions Added",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Data to File Format": {
      "main": [
        [
          {
            "node": "Upload File to Google Cloud Storage",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set API and Project Details": {
      "main": [
        [
          {
            "node": "Generate JWT Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Post to Start Video Generation": {
      "main": [
        [
          {
            "node": "Wait 20 Seconds A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload File to Google Cloud Storage": {
      "main": [
        [
          {
            "node": "Post to Add Captions API",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}