{
  "name": "Generate 360° product videos from photos with Veo 3 and Telegram",
  "nodes": [
    {
      "id": "b2b02fc9-ea89-4d96-893f-f9e530876ea8",
      "name": "📋 Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -9264,
        -336
      ],
      "parameters": {
        "width": 620,
        "height": 584,
        "content": "## 🎬 360° Product Video Generator\n\nTurn a single product photo into a cinematic 360° video using Google Veo 3 — delivered straight to Telegram.\n\n## How it works\n1. User sends a product photo to your T"
      }
    },
    {
      "id": "70a23ef7-b728-4388-b4e4-afe39ef8b657",
      "name": "Group 1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8528,
        -208
      ],
      "parameters": {
        "width": 428,
        "height": 348,
        "content": "## Receive & Validate\nListens for Telegram messages and checks that a photo was sent and is at least 480px. Rejects documents or text-only messages and replies with a clear error."
      }
    },
    {
      "id": "0cf4efdf-44ac-4673-a88c-cb25452ca036",
      "name": "Group 2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -8064,
        -176
      ],
      "parameters": {
        "width": 840,
        "height": 332,
        "content": "## Google Cloud Auth\nReads Service Account credentials from Google Sheets, signs a JWT locally, and exchanges it for a short-lived OAuth access token. Runs fresh on every request."
      }
    },
    {
      "id": "db7f81ba-92c6-4677-a921-93e879d0771b",
      "name": "Group 3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -7168,
        -288
      ],
      "parameters": {
        "width": 840,
        "height": 480,
        "content": "## Download & Convert\nDownloads the highest-resolution version of the photo from Telegram and converts it to Base64. Any conversion failure is caught and reported back to the user."
      }
    },
    {
      "id": "a8977c41-5e0f-4e02-91ce-3fef4a6ca60b",
      "name": "Group 4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -6272,
        -384
      ],
      "parameters": {
        "width": 620,
        "height": 508,
        "content": "## Submit to Veo 3\nBuilds the API payload with a cinematic 360° orbit prompt and submits a long-running job to Vertex AI Veo 3. Gets back an operation ID used for polling."
      }
    },
    {
      "id": "19948635-28b8-4c13-8ede-1a7bee91c42e",
      "name": "Group 5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -5616,
        -528
      ],
      "parameters": {
        "width": 1108,
        "height": 872,
        "content": "## Poll for Result\nChecks every 2 minutes whether the video is ready. Times out after 40 attempts (~10 min) and notifies the user with a friendly error if generation takes too long."
      }
    },
    {
      "id": "be8ea122-84d1-4264-a646-be1010aa4bb2",
      "name": "Group 6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4496,
        -432
      ],
      "parameters": {
        "width": 660,
        "height": 276,
        "content": "## Deliver Video\nConverts the Base64 video bytes to a file and sends it directly to the user in Telegram."
      }
    },
    {
      "id": "ee81c12f-2c54-441b-90a1-f5482c40b97e",
      "name": "Wait 2 Minutes",
      "type": "n8n-nodes-base.wait",
      "position": [
        -5552,
        -240
      ]
    },
    {
      "id": "99b5b684-d316-4c79-9f58-d190be2e85df",
      "name": "Send Timeout Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4784,
        144
      ]
    },
    {
      "id": "e545feb6-efa8-4bf0-9bf0-0bb5d3fae486",
      "name": "Check Timeout",
      "type": "n8n-nodes-base.if",
      "position": [
        -5184,
        32
      ]
    },
    {
      "id": "7d7f7f2c-0e25-473b-bf87-7339957295d7",
      "name": "Download Image",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -6896,
        -160
      ]
    },
    {
      "id": "83d5cd34-c7a8-454d-bea7-22854b9fea78",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -8480,
        -48
      ]
    },
    {
      "id": "1ed72edc-642e-4d2b-a33a-39eac6401c2c",
      "name": "2. Validate Input",
      "type": "n8n-nodes-base.code",
      "position": [
        -8256,
        -48
      ]
    },
    {
      "id": "1f36ad53-6c90-471e-b8a3-6686b96de5de",
      "name": "Check Auth Token Valid",
      "type": "n8n-nodes-base.if",
      "position": [
        -7344,
        -48
      ]
    },
    {
      "id": "3153c612-b11e-40ad-a24c-06b48b24f2eb",
      "name": "Send Validation Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -7120,
        32
      ]
    },
    {
      "id": "526add44-409e-41e6-b327-05c91a427708",
      "name": "Send Processing Message",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -7120,
        -160
      ]
    },
    {
      "id": "238d0cb6-789f-4cbd-b894-38525e8b18e8",
      "name": "Convert Image to Base64",
      "type": "n8n-nodes-base.code",
      "position": [
        -6672,
        -160
      ]
    },
    {
      "id": "5696a1e9-ef12-4d7e-bc24-5cfcec661fec",
      "name": "Conversion OK?",
      "type": "n8n-nodes-base.if",
      "position": [
        -6448,
        -160
      ]
    },
    {
      "id": "f4ac9dea-d831-413b-9ecc-1181a8ee0185",
      "name": "Send Conversion Error",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -6016,
        -48
      ]
    },
    {
      "id": "06685eae-cf1a-4469-84de-f2d06079121f",
      "name": "5. Prepare Veo Request",
      "type": "n8n-nodes-base.code",
      "position": [
        -6224,
        -240
      ]
    },
    {
      "id": "010b2b1c-fdde-454d-851d-e8d1aa5b7bfb",
      "name": "6. Call Vertex AI Veo 3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -6000,
        -240
      ]
    },
    {
      "id": "1343ec01-9309-40c6-b287-df7d3af9941b",
      "name": "Extract Operation Name",
      "type": "n8n-nodes-base.code",
      "position": [
        -5776,
        -240
      ]
    },
    {
      "id": "13ef8fde-d595-4fec-b48b-66e479cdd700",
      "name": "Poll Video Status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -5328,
        -320
      ]
    },
    {
      "id": "041a8843-5462-4ff0-ae89-d7985463618a",
      "name": "Is Video Ready?",
      "type": "n8n-nodes-base.if",
      "position": [
        -5104,
        -320
      ]
    },
    {
      "id": "4127d7d4-340d-4228-9ace-b287b6bb0526",
      "name": "Convert Video to File",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        -4880,
        -416
      ]
    },
    {
      "id": "82f5dcb0-62e4-43b7-9148-7bce5074361e",
      "name": "Continue Polling",
      "type": "n8n-nodes-base.code",
      "position": [
        -4880,
        -224
      ]
    },
    {
      "id": "6b7f1886-adda-4211-a4ff-a0b16e4bb131",
      "name": "Send Video to User",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -4224,
        -320
      ]
    },
    {
      "id": "8fb2a208-a649-4182-83d1-87d715e946a2",
      "name": "2. Build JWT from Sheet",
      "type": "n8n-nodes-base.code",
      "position": [
        -7792,
        -48
      ]
    },
    {
      "id": "faa1f906-1f3a-4b08-8fc1-fe117ea31a51",
      "name": "3. Get Access Token",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -7568,
        -48
      ]
    },
    {
      "id": "563b037e-91b8-4348-a994-abfa27fba9ec",
      "name": "1. Get Service Account Details",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -8016,
        -48
      ]
    }
  ],
  "connections": {
    "Check Timeout": {
      "main": [
        [
          {
            "node": "Send Timeout Error",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait 2 Minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Conversion OK?": {
      "main": [
        [
          {
            "node": "5. Prepare Veo Request",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Conversion Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image": {
      "main": [
        [
          {
            "node": "Convert Image to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait 2 Minutes": {
      "main": [
        [
          {
            "node": "Poll Video Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Video Ready?": {
      "main": [
        [
          {
            "node": "Convert Video to File",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Continue Polling",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Continue Polling": {
      "main": [
        [
          {
            "node": "Check Timeout",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "2. Validate Input",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Validate Input": {
      "main": [
        [
          {
            "node": "1. Get Service Account Details",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Poll Video Status": {
      "main": [
        [
          {
            "node": "Is Video Ready?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3. Get Access Token": {
      "main": [
        [
          {
            "node": "Check Auth Token Valid",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Video to File": {
      "main": [
        [
          {
            "node": "Send Video to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5. Prepare Veo Request": {
      "main": [
        [
          {
            "node": "6. Call Vertex AI Veo 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Auth Token Valid": {
      "main": [
        [
          {
            "node": "Send Processing Message",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Validation Error",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Operation Name": {
      "main": [
        [
          {
            "node": "Wait 2 Minutes",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "2. Build JWT from Sheet": {
      "main": [
        [
          {
            "node": "3. Get Access Token",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6. Call Vertex AI Veo 3": {
      "main": [
        [
          {
            "node": "Extract Operation Name",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Image to Base64": {
      "main": [
        [
          {
            "node": "Conversion OK?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Processing Message": {
      "main": [
        [
          {
            "node": "Download Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "1. Get Service Account Details": {
      "main": [
        [
          {
            "node": "2. Build JWT from Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}