{
  "id": "hrgSQUE3cV26S7rB",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Product Brand Animations with NanoBanana, Kling & LATE Publishing_Bilsimaging",
  "tags": [],
  "nodes": [
    {
      "id": "b6bb9d1b-b5a5-4fd7-9d37-e2c303c77682",
      "name": "Ask Approval (Images)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        800,
        1216
      ],
      "parameters": {
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "message": "Approve these previews? (Only then we\u2019ll render the videos)",
        "options": {
          "appendAttribution": false
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "9b0f65b5-1a6c-4892-af4d-6ae55c662f42",
      "name": "Approved?",
      "type": "n8n-nodes-base.if",
      "position": [
        1024,
        1216
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "approved-single",
              "operator": {
                "name": "filter.operator.equals",
                "type": "boolean",
                "operation": "isTrue"
              },
              "leftValue": "={{ $json.approved || $json.data?.approved || $json.payload?.approved }}"
            },
            {
              "id": "073d95f4-202e-4116-8b54-5bd8b24c68f9",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.data?.approved ?? $json.approved ?? $json.payload?.approved }}",
              "rightValue": "={{ true }}"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "a254cb1e-0b87-4fcf-b196-fe6f4b7c540d",
      "name": "Motion designer",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1728,
        1504
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {
          "maxIterations": 2,
          "systemMessage": "## Role: Master Motion Designer for Shorti Brand Animation. From ONE provided product image (and the Art Director's sophisticated context), craft two cinematic, kling-optimized animation sequences.\n\nDeliverables (JSON only):\n{\n  \"kling_prompt1\": \"<sophisticated cinematic sequence: multi-dimensional camera choreography + dynamic lighting orchestration + atmospheric integration; 9:16; 4\u20135s; 24fps; premium ease curves; no morphing>\",\n  \"kling_prompt2\": \"<complementary advanced movement: complex spatial transitions + environmental animation + focus dynamics; 9:16; 4\u20135s; 24fps; cinematic timing; no morphing>\"\n}\n\n## Advanced Motion Vocabulary:\n**Camera Choreography**: Fluid multi-axis push-in with simultaneous tilt reveal, sweeping orbital arc with depth transition, ascending crane movement with parallax layers, rotating reveal with rack-focus integration, floating dolly with environmental immersion\n\n**Lighting Dynamics**: Directional rim light sweep across surface, graduated shadow transition with atmospheric haze, reflective surface choreography with highlight migration, ambient temperature shift with color grading, volumetric light penetration with depth enhancement\n\n**Focus & Depth**: Selective rack-focus pull from foreground to product, depth-layered reveal with bokeh transition, multi-plane parallax with focus shift, foreground-to-background focus sweep, shallow depth breathing with product isolation\n\n**Environmental Integration**: Subtle atmospheric particle animation, spatial breathing effects with ambient movement, surface reflection dynamics, controlled environmental disturbance, ambient light temperature evolution\n\n## Enhanced Rules:\n- Image-only analysis with cinematic vision. No new objects/text. Preserve product identity with luxury standards.\n- Select ONE sophisticated sequence per beat: advanced camera choreography, dynamic lighting design, atmospheric integration, focus dynamics. Premium easing with cinematic timing.\n- Technical specs: 9:16, 24fps, 4\u20135s duration.\n- Combine movement types for elevated sequences: camera + lighting + focus or camera + environment + depth.\n\n## Quality Standards:\n- Avoid basic linear movements (simple push/pull/pan)\n- Integrate multiple motion elements per sequence\n- Use professional cinematography language\n- Ensure smooth acceleration curves with premium timing\n- Create complementary but distinct sequences\n\n## Output: Single compact JSON with sophisticated motion sequences.\n## Output strictly JSON (no backticks).\n"
        },
        "toolDescription": "Motion prompts generator"
      },
      "typeVersion": 2.2
    },
    {
      "id": "68ebece7-fc44-4748-afb3-c8c18b4b437d",
      "name": "Art Director",
      "type": "@n8n/n8n-nodes-langchain.agentTool",
      "position": [
        -1424,
        1504
      ],
      "parameters": {
        "text": "={{ $fromAI('Prompt__User_Message_', ``, 'string') }}",
        "options": {
          "maxIterations": 2,
          "systemMessage": "## Role: Master Art Director for Shorti Brand Animation. From ONE provided product image, design two sophisticated, elegant visual concepts suitable for premium vertical (9:16) brand animations.\n\nDeliverables (JSON only):\n{\n  \"title\": \"<compelling brand narrative; luxury positioning; \u226460 chars>\",\n  \"prompt1\": \"<refined edit of SAME image; cinematic lighting design/atmospheric depth/color grading mastery; 9:16>\",\n  \"prompt2\": \"<sophisticated variation; premium gradient environments/luxury solid backgrounds/atmospheric integration; 9:16>\",\n  \"environment\": \"<luxury production aesthetic with atmospheric details; \u226425 words>\",\n  \"sound\": \"<premium audio landscape; sophisticated brand alignment; ambient/instrumental; \u226420 words>\"\n}\n\n## Enhanced Visual Standards:\n**Lighting Design**: Cinematic three-point lighting, dramatic rim lighting, soft volumetric illumination, atmospheric haze integration, color temperature sophistication\n\n**Background Concepts**: Luxury gradient transitions, premium solid environments, atmospheric depth layers, sophisticated color palettes, ambient environmental integration\n\n**Color Grading**: Professional color correction, cinematic color palettes, brand-appropriate temperature, sophisticated contrast management, luxury aesthetic enhancement\n\n**Atmospheric Effects**: Subtle environmental haze, soft focus backgrounds, depth-of-field enhancement, ambient lighting effects, premium visual texture\n\n## Quality Guidelines:\n- Elevate beyond simple edits to sophisticated visual design\n- Maintain product identity while enhancing luxury perception\n- Use professional photography and cinematography language\n- Create premium brand positioning through visual sophistication\n- Ensure complementary but distinct aesthetic approaches\n\n## Strict Rules:\n- Image-only analysis, preserve exact product identity, no people/text/UI elements\n- Focus on premium visual enhancement rather than minimal changes\n- Both concepts must reflect luxury brand standards\n\nOutput: Single compact JSON with exact keys reflecting sophisticated visual design.\n\n## Output strictly JSON (no backticks).\n"
        },
        "toolDescription": "Still image edit prompts"
      },
      "typeVersion": 2.2
    },
    {
      "id": "a3a053b8-14fb-4772-b9c7-ebb1354e8bac",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -2480,
        944
      ],
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {
          "download": true
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "92578418-3400-4810-969b-3c5287a28e8a",
      "name": "Request Photo",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -2256,
        800
      ],
      "parameters": {
        "chatId": "={{ $json.message.chat.id }}",
        "message": "Welcome to Shorti Brand Animation \ud83d\udc4b\nPlease upload a product photo (jpg/jpeg/webp).",
        "options": {
          "appendAttribution": false,
          "messageButtonLabel": "Respond"
        },
        "operation": "sendAndWait",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "Please send  a product photo",
              "multipleFiles": false,
              "requiredField": true,
              "acceptFileTypes": "jpg, jpeg, webp"
            }
          ]
        },
        "responseType": "customForm"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "92c24fc7-03fd-4759-a03f-c7fc75116fbe",
      "name": "Set: Chat Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        -2256,
        1168
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "name": "chat_id",
              "type": "number",
              "value": "={{ $('Telegram Trigger').first().json.message.chat.id }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "20523084-5894-4830-86fc-28db3aae10bf",
      "name": "Upload Original Image (imgbb)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -768,
        784
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "Please_send__a_product_photo"
            },
            {
              "name": "key",
              "value": "={{ $json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "7080c6dd-cc6f-4550-b73f-7a23def70629",
      "name": "Google Gemini Chat Model16",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1696,
        1328
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "e8cd8fda-fab3-4f01-8696-58468743674d",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -1168,
        1344
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"title\": \"Ethereal Bloom \u2014 Celestial Awakening\",\n  \"prompt1\": \"Vertical 9:16; premium skincare jar suspended in weightless space; crystalline surface catching prismatic light; whisper-soft aurora backdrop; volumetric rays threading through translucent mist; liquid mercury reflections dancing beneath; no faces, hands, text, logos, numbers.\",\n  \"prompt2\": \"Vertical 9:16; same ethereal vessel; floating within gradient cosmos of deep amethyst dissolving to pearl luminescence; stardust particles swirling in slow motion; opalescent platform materializing from light itself; gossamer veils of energy embracing the form; no faces, hands, text, logos, numbers.\",\n  \"kling_prompt1\": \"Celestial revelation: fluid three-dimensional spiral ascent with synchronized tilt-reveal choreography; cascading light frequencies sweep across surfaces while atmospheric particles perform orbital dance; micro-parallax depth breathing with focus pull from infinite to intimate; 9:16; 4s; 24fps; no morphing.\",\n  \"kling_prompt2\": \"Transcendent orbit: weightless camera floating in figure-eight trajectory around suspended subject; dynamic rim lighting migration creates halo evolution; depth-of-field breathing with bokeh constellation transformation; environmental luminescence pulse synchronized with gentle rotation; 9:16; 4s; 24fps; no morphing.\",\n  \"environment\": \"Ethereal void studio with controlled aurora projections, crystalline pedestals, atmospheric haze generators, prismatic lighting arrays.\",\n  \"sound\": \"Crystalline harmonics layered with ambient cosmic whispers, subtle glass resonance, weightless atmospheric emergence.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "86873903-6ce5-4359-a39d-4ff6012c6bba",
      "name": "Creative Director (Orchestrator) agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -1536,
        1120
      ],
      "parameters": {
        "text": "## Project: Shorti Brand Animation \u2014 Premium 2-beat cinematic opener from ONE product image\n\n## Assets: Use ONLY the attached product image(s). No text description is provided.\n\n## Your job: Coordinate the Art Director and Motion Designer to produce a sophisticated, social-ready (IG/TikTok) opener with elevated cinematic quality. First get two refined edit prompts for image previews (from Art Director). Then get two matching premium animation prompts (from Motion Designer). Ensure everything is kling-optimized and preserves product integrity.\n\n## Enhanced constraints (apply to both sub-agents):\nPreserve product identity (shape/materials/colors/logo/brand essence). No morphing/warping/distortion.\nNo hands/faces/people. No on-screen text/letters/numbers/UI/watermarks.\nVertical 9:16 framing. Sophisticated, premium, luxury aesthetic.\nRefined image edits only (cinematic lighting design, atmospheric depth, elegant gradients/environments, color grading mastery).\nAdvanced pro moves for video (one sophisticated sequence per beat): \n- Fluid camera choreography: multi-axis push-in with tilt reveal, sweeping orbital arcs with depth transitions, ascending crane movements with parallax layers\n- Dynamic lighting: directional light sweeps, atmospheric rim lighting, graduated shadow transitions, reflective surface choreography\n- Focus dynamics: selective rack-focus pulls, depth-layered reveals, bokeh transition effects, foreground-to-background focus shifts\n- Environmental integration: subtle atmospheric animation, spatial breathing effects, ambient particle movement\n\nCinematic timing with premium ease curves; no basic linear movements or abrupt transitions.\n\n## What to collect and return (one object):\n\"title\", \"prompt1\", \"prompt2\", \"kling_prompt1\", \"kling_prompt2\", \"environment\", \"sound\"\n\n## Output format:\nReturn exactly one compact JSON object with only these keys (no prose, no markdown, no trailing commas).\nLanguage: English.\n",
        "options": {
          "maxIterations": 6,
          "systemMessage": "## Role: Elite Creative Director for Shorti Brand Animation. You are the master orchestrator who coordinates two specialized sub-agents: Art Director and Motion Designer to create sophisticated cinematic experiences.\n\n## Goal: From ONE provided product image, deliver a premium 2-beat cinematic micro-story (vertical 9:16) for luxury brand animation by intelligently merging sub-agents' outputs into ONE sophisticated JSON.\n\n## Tools:\n- Think: analyze image composition, brand essence, and cinematic potential; decide optimal routing and quality validation.\n\n## Input:\n- Exactly one product image (deep visual analysis only; text description may be absent).\n\n## Enhanced Rules:\n- Analyze ONLY the provided image with cinematic vision. Do not invent objects, text, logos, or UI.\n- Preserve product identity with luxury brand standards (shape, materials, colors, logo, brand essence). No morphing/warping/distortion.\n- No hands/faces/people. No on-screen text, letters, numbers, or watermarks.\n- Elevate motion to cinematic standards: sophisticated camera choreography, dynamic lighting design, atmospheric integration (no basic physics/VFX).\n- Language: English. Output must be strictly valid JSON (double quotes, no trailing commas).\n\n## Sophisticated Routing Strategy:\n1) Send image to **Art Director** with luxury aesthetic brief \u2192 obtain: { title, prompt1, prompt2, environment, sound }.\n2) Send same image + Art Director's sophisticated context to **Motion Designer** with cinematic motion brief \u2192 obtain: { kling_prompt1, kling_prompt2 }.\n3) Intelligently merge results with quality enhancement into EXACT schema. Elevate any basic elements to premium standards.\n\n## Quality Standards:\n- Title: Compelling brand narrative (luxury positioning)\n- Visual prompts: Cinematic lighting design, atmospheric depth\n- Motion prompts: Advanced camera choreography, dynamic lighting, sophisticated timing\n- Environment: Premium production aesthetic\n- Sound: Sophisticated audio landscape matching brand elevation\n\n## Tool Calling Protocol:\n- When invoking tools, pass comprehensive context as single string to parameter `input`.\n- Include quality expectations and cinematic vision in agent briefs.\n\n## Output Protocol:\n- Return final result as STRICT compact JSON with keys: title, prompt1, prompt2, kling_prompt1, kling_prompt2, environment, sound.\n- No backticks, no markdown, no additional text.\n\n### PREMIUM CINEMATIC JSON ONLY\nReturn one elevated JSON object reflecting sophisticated brand animation standards.",
          "passthroughBinaryImages": true
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "9c0c0fc5-fadf-4618-a989-44e304f8860f",
      "name": "Set Storyboard Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        -768,
        1024
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "6c72af85-66d8-4b34-be63-b7467bb2681a",
              "name": "title",
              "type": "string",
              "value": "={{ $json.output.title }}"
            },
            {
              "id": "f1633989-a547-4582-afae-a4d62591b47a",
              "name": "prompt1",
              "type": "string",
              "value": "={{ $json.output.prompt1 }}"
            },
            {
              "id": "cb3a586a-2b6e-412e-b9ff-6f79af6efc4b",
              "name": "prompt2",
              "type": "string",
              "value": "={{ $json.output.prompt2 }}"
            },
            {
              "id": "1dbf84a7-9327-435c-91af-1fd942d0b59e",
              "name": "kling_prompt1",
              "type": "string",
              "value": "={{ $json.output.kling_prompt1 }}"
            },
            {
              "id": "4db5aec6-7f0c-412d-acea-95812943380d",
              "name": "kling_prompt2",
              "type": "string",
              "value": "={{ $json.output.kling_prompt2 }}"
            },
            {
              "id": "4f9bcdea-6370-43f8-993e-99f1df59c640",
              "name": "sound",
              "type": "string",
              "value": "={{ $json.output.sound }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "c03e9283-e1c1-46bb-854e-b0414de76f4f",
      "name": "Merge Vars + Photo",
      "type": "n8n-nodes-base.merge",
      "position": [
        -544,
        1008
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition",
        "numberInputs": 3
      },
      "typeVersion": 3.1
    },
    {
      "id": "6546589a-a0f1-4f16-bc88-c15761fd4b83",
      "name": "Gen Image A",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -320,
        640
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $json.prompt1 }}\",\"image_urls\":[\"{{ $json.data.url }}\"],\"num_images\":1}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6b7e3fd6-b4e7-4426-ad20-5cda42fc0ba0",
      "name": "Split Image A",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -96,
        640
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "3ebd8c3d-180e-48a9-817d-408ed0a7404a",
      "name": "Download Image A",
      "type": "n8n-nodes-base.httpRequest",
      "options": {
        "response": {
          "response": {
            "responseFormat": "file"
          }
        }
      },
      "position": [
        128,
        640
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "faeb02b4-a851-4234-a929-707c437e8d5d",
      "name": "Upload Edited A (imgbb)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        704
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "photo2"
            },
            {
              "name": "key",
              "value": "={{ $('Set: YOUR API KEY (ImgBB)').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "6298ccea-a6f2-4905-9f10-481825db5bb0",
      "name": "Gen Image B",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -320,
        1216
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $json.prompt2 }}\",\"image_urls\":[\"{{ $json.data.url }}\"],\"num_images\":1}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "4186e701-368b-4e8c-ab9b-0a1d3097f654",
      "name": "Split Image B",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        -96,
        1216
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "322e1015-41d8-4bb5-8735-5a79e71aebeb",
      "name": "Download Image B",
      "type": "n8n-nodes-base.httpRequest",
      "options": {
        "response": {
          "response": {
            "responseFormat": "file"
          }
        }
      },
      "position": [
        128,
        1216
      ],
      "parameters": {
        "url": "={{ $json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "9064983c-7285-4c87-8ed3-54aae6dc3746",
      "name": "Upload Edited B (imgbb)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        576,
        896
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "photo3"
            },
            {
              "name": "key",
              "value": "={{ $('Set: YOUR API KEY (ImgBB)').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "cc2b98a1-0413-4afe-bfb6-43e5c2a061c7",
      "name": "Merge Edited URLs",
      "type": "n8n-nodes-base.merge",
      "position": [
        800,
        832
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "6a65a9a6-454e-4caa-b56f-1dcbe2a5b423",
      "name": "Aggregate Edited URLs",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1024,
        832
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "f0ce04c4-ace4-4eb5-bdfe-afad2f9338db",
      "name": "Wait A",
      "type": "n8n-nodes-base.wait",
      "position": [
        1696,
        704
      ],
      "parameters": {
        "amount": 40
      },
      "typeVersion": 1.1
    },
    {
      "id": "aada3fbb-2c09-43c1-a3d4-49c383cfe3a0",
      "name": "Animation Completed? A",
      "type": "n8n-nodes-base.if",
      "position": [
        2144,
        704
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "animation-completed-a",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "363f1aa3-7aaa-4be4-9b90-cc65db1dc9bb",
      "name": "Wait B",
      "type": "n8n-nodes-base.wait",
      "position": [
        1696,
        992
      ],
      "parameters": {
        "amount": 40
      },
      "typeVersion": 1.1
    },
    {
      "id": "a073a747-5ec7-478a-8f59-2f7a07c2e0d3",
      "name": "Animation Completed? B",
      "type": "n8n-nodes-base.if",
      "position": [
        2144,
        992
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "animation-completed-b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.status }}",
              "rightValue": "COMPLETED"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b7e3bbca-60d8-4916-9fb8-a01df36ec1e1",
      "name": "FFmpeg Compose",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3488,
        848
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/ffmpeg-api/compose",
        "body": "={\n  \"tracks\": [\n    {\n      \"id\": \"v1\",\n      \"type\": \"video\",\n      \"keyframes\": [\n        {\n          \"url\": \"{{$json.data[0].video.url}}\",\n          \"timestamp\": 0,\n          \"duration\": 5\n        },\n        {\n          \"url\": \"{{$json.data[1].video.url}}\",\n          \"timestamp\": 5,\n          \"duration\": 5\n        }\n      ]\n    }\n  ]\n}\n",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "e4c1ee8c-cd99-4d44-8f8c-ff736b4225b7",
      "name": "Notify: Stitching",
      "type": "n8n-nodes-base.telegram",
      "position": [
        3712,
        752
      ],
      "parameters": {
        "text": "Finalizing\u2026 stitching clips together. Almost there!",
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "b6be2028-a699-4526-895a-52a69e3ac6b3",
      "name": "Wait Compose",
      "type": "n8n-nodes-base.wait",
      "position": [
        3712,
        944
      ],
      "parameters": {
        "amount": 30
      },
      "typeVersion": 1.1
    },
    {
      "id": "fe0fd1d8-3c7a-4aa4-a8d4-9c791c74a04e",
      "name": "Create Soundtrack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4176,
        944
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/mmaudio-v2",
        "body": "={\n  \"prompt\": \"Premium ambient soundscape for luxury brand with characteristics: {{ $('Set Storyboard Vars').first().json.sound }}\",\n  \"video_url\": \"{{ $json.video_url }}\",\n  \"num_steps\": 25,\n  \"duration\": 10,\n  \"cfg_strength\": 10.5,\n  \"negative_prompt\": \"no voice\"\n}\n",
        "method": "POST",
        "options": {
          "batching": {
            "batch": {
              "batchSize": 1,
              "batchInterval": 2000
            }
          }
        },
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ceaf16d0-4742-4208-aecf-4d26699cf876",
      "name": "Wait Soundtrack",
      "type": "n8n-nodes-base.wait",
      "position": [
        4384,
        944
      ],
      "parameters": {
        "amount": 100
      },
      "typeVersion": 1.1
    },
    {
      "id": "0e374488-129a-490b-a191-4d1eb1c38ca2",
      "name": "Get Soundtrack",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4608,
        944
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/mmaudio-v2/requests/{{ $json.request_id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "80361d91-d5a5-4859-a0c6-5cff03c87dbe",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        6416,
        1184
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "776907a2-89b5-40cc-9528-d469659d2b8d",
      "name": "Send message and wait for response",
      "type": "n8n-nodes-base.telegram",
      "position": [
        6432,
        1344
      ],
      "parameters": {
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "message": "Would you like me to share this on your social channels (late.dev) ?",
        "options": {
          "appendAttribution": false
        },
        "operation": "sendAndWait",
        "approvalOptions": {
          "values": {
            "approvalType": "double"
          }
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d519447b-791f-4087-982a-ba570963a60a",
      "name": "Send Image A",
      "type": "n8n-nodes-base.telegram",
      "position": [
        576,
        512
      ],
      "parameters": {
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {
          "caption": "Concept A"
        },
        "binaryPropertyName": "photo2"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "94381793-b216-4c3d-ab8e-7ef15c9c26ed",
      "name": "Think",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        -1280,
        1360
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "50ad1d69-3ad4-4fd3-9aa8-66c89723bd1d",
      "name": "start processing",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -768,
        1216
      ],
      "parameters": {
        "text": "=\u2705 Got it \u2014 we'll start processing now.\n\ud83c\udfac Title: {{ $json.output.title }}\n\n\ud83d\udcdd Here are the prompts we'll proceed with:\n\n\ud83c\udfa8 Prompt 1: {{ $json.output.prompt1 }}\n\n\ud83c\udfad Prompt 2: {{ $json.output.prompt2 }}",
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "2696b816-976c-42f7-af26-9c4ca0b3dc98",
      "name": "Send video Concept A",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2816,
        640
      ],
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
        "operation": "sendVideo",
        "binaryData": true,
        "additionalFields": {
          "caption": "Video Concept A"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "6b944b22-90d7-44d4-bc14-1fa2330aa728",
      "name": "Send video Concept B",
      "type": "n8n-nodes-base.telegram",
      "position": [
        2816,
        1072
      ],
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
        "operation": "sendVideo",
        "binaryData": true,
        "additionalFields": {
          "caption": "Send video Concept B"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "dd1bb4d3-f2c0-4f25-8b4a-2487da5ca0a9",
      "name": "Send Full Video (No Upscale)",
      "type": "n8n-nodes-base.telegram",
      "position": [
        5072,
        1072
      ],
      "parameters": {
        "chatId": "={{ $('Telegram Trigger').first().json.message.chat.id }}",
        "operation": "sendVideo",
        "binaryData": true,
        "additionalFields": {
          "caption": "Full video (no upscale)"
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "654cd746-c509-4d12-81e3-4772f6d738a7",
      "name": "kling Queue A",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1472,
        704
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/kling-video/v1.6/pro/image-to-video",
        "body": "={\"image_url\":\"{{ $('Aggregate Edited URLs').item.json.data[0].data.url }}\",\"prompt\":\"{{$('Set Storyboard Vars').first().json.kling_prompt1 }}\",\"aspect_ratio\":\"9:16\",\"duration\": \"5\"}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "312c002c-2a4e-45f6-b663-82c1fa162bfb",
      "name": "kling Queue B",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1472,
        992
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/kling-video/v1.6/pro/image-to-video",
        "body": "={\"image_url\":\"{{ $('Aggregate Edited URLs').item.json.data[1].data.url }}\",\"prompt\":\"{{$('Set Storyboard Vars').first().json.kling_prompt2 }}\",\"aspect_ratio\":\"9:16\",\"duration\": \"5\"}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c1a42567-2590-4907-b672-32551d4f1b6b",
      "name": "Kling Status A",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1920,
        640
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $json.request_id }}/status",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8552612b-a4c7-4914-969d-9f48dea623d3",
      "name": "Kling Status B",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1920,
        928
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $json.request_id }}/status",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "2aa9b6f3-18f1-4aa2-995e-47eeeabd7e29",
      "name": "Kling Result A",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2368,
        704
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $json.request_id }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "63538bd9-430e-4370-a09f-1d533e8a7210",
      "name": "Download A",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2592,
        640
      ],
      "parameters": {
        "url": "={{ $json.video.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0cace1fa-4b3f-406a-ad17-bd74ac86ecba",
      "name": "Download B",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2592,
        1072
      ],
      "parameters": {
        "url": "={{ $json.video.url }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "1ac158b6-55ca-49d5-8c07-0b512931a434",
      "name": "Merge Kling Results",
      "type": "n8n-nodes-base.merge",
      "position": [
        2976,
        816
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.1
    },
    {
      "id": "31bb1339-1806-472f-bd81-09bee3792d86",
      "name": "Aggregate Results",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3264,
        848
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "3af7679d-d716-4520-9f63-4a18e90f164b",
      "name": "Get  Video",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3936,
        944
      ],
      "parameters": {
        "url": "={{ $json.response_url }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ac5a71ed-5c67-4ca8-a962-8b2f81f16f26",
      "name": "Download Final Video (No Upscale)",
      "type": "n8n-nodes-base.httpRequest",
      "options": {
        "response": {
          "response": {
            "responseFormat": "file"
          }
        }
      },
      "position": [
        4832,
        944
      ],
      "parameters": {
        "url": "={{ $json.video.url }}",
        "options": {
          "response": {
            "response": {}
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "66c0302e-3872-488e-9765-83dae6562a7c",
      "name": "Combine",
      "type": "n8n-nodes-base.merge",
      "position": [
        5280,
        960
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "e2cb0ef1-a58b-483f-8b3f-dec0af5d0324",
      "name": "Upscale",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5504,
        960
      ],
      "parameters": {
        "url": "https://queue.fal.run/fal-ai/topaz/upscale/video ",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n     \"video_url\":\"{{ $json.video.url }}\",\n     \"upscale_factor\": 2\n   }",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "03f64c53-f4b7-4c07-8bbf-a749e3a5081b",
      "name": "Get Result",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5968,
        960
      ],
      "parameters": {
        "url": "={{ $json.response_url }}",
        "options": {
          "response": {
            "response": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "08044112-cba4-4abe-bfe8-b9cdbd97ad3b",
      "name": "Send Image B",
      "type": "n8n-nodes-base.telegram",
      "position": [
        576,
        1216
      ],
      "parameters": {
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "operation": "sendPhoto",
        "binaryData": true,
        "additionalFields": {
          "caption": "Concept B"
        },
        "binaryPropertyName": "photo3"
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "f154ff19-a49f-4b21-a3e4-bdeb20be6754",
      "name": "Kling Result B",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2368,
        992
      ],
      "parameters": {
        "url": "=https://queue.fal.run/fal-ai/kling-video/requests/{{ $json.request_id }}",
        "options": {
          "response": {
            "response": {}
          }
        },
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "6807e4ae-ef6f-48a3-ad44-9ce1d5b3c391",
      "name": "Share to Instagram",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7344,
        1344
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"content\": \"Check out this amazing reel! \ud83c\udfa5 {{ $('Set Storyboard Vars').item.json.title }}\",\n  \"platforms\": [\n    { \"platform\": \"instagram\", \"accountId\":\"{{ $json.accounts[0]._id }}\" }\n  ],\n  \"mediaItems\": [\n    { \"type\": \"video\", \"url\": \"{{ $('Get Result').item.json.video.url }}\" }\n  ]\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "lateApi"
      },
      "credentials": {
        "lateApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7be673ba-0702-4f8d-b467-ab55febc671d",
      "name": "Share to Youtube Shorts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7344,
        1568
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"content\": \"Check out this amazing short! {{ $('Set Storyboard Vars').item.json.title }} #Shorts\",\n  \"platforms\": [\n    { \"platform\": \"youtube\", \"accountId\": \"{{ $json.accounts[2]._id }}\" }\n  ],\n  \"mediaItems\": [\n    { \"type\": \"video\", \"url\": \"{{ $('Get Result').item.json.video.url }}\" }\n  ],\n  \"publishNow\": true\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "lateApi"
      },
      "credentials": {
        "lateApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "c0648543-0ecd-415e-ae33-1b5ec30ede50",
      "name": "Share to tiktok",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        7344,
        1088
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/posts",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"content\": \"Check out this amazing reel! \ud83c\udfa5 {{ $('Set Storyboard Vars').item.json.title }}\ud83c\udfa5\ud83d\udd25\",\n  \"platforms\": [\n    {\n      \"platform\": \"tiktok\",\n      \"accountId\": \"{{ $json.accounts[1]._id }}\",\n      \"platformSpecificData\": {\n        \"tiktokSettings\": {\n          \"privacy_level\": \"PUBLIC_TO_EVERYONE\",\n          \"video_made_with_ai\": true,\n          \"allow_comment\": true,\n          \"allow_duet\": true,\n          \"allow_stitch\": true,\n          \"commercial_content_type\": \"none\",\n          \"content_preview_confirmed\": true,\n          \"express_consent_given\": true\n        }\n      }\n    }\n  ],\n  \"mediaItems\": [\n    { \"type\": \"video\", \"url\": \"{{ $('Get Result').item.json.video.url }}\" }\n  ],\n  \"scheduledFor\": null,\n  \"timezone\": \"UTC\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "lateApi"
      },
      "credentials": {
        "lateApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "8f594b2b-4196-4c73-85bf-51ffe66a72bf",
      "name": "Get All Social Media Accounts",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6880,
        1344
      ],
      "parameters": {
        "url": "https://getlate.dev/api/v1/accounts",
        "options": {},
        "sendHeaders": true,
        "authentication": "predefinedCredentialType",
        "headerParameters": {
          "parameters": [
            {}
          ]
        },
        "nodeCredentialType": "lateApi"
      },
      "credentials": {
        "lateApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "83560faa-89a3-4fc7-a635-fb5c7e91db3d",
      "name": "Google Gemini Chat Model15",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1376,
        1632
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "650c3118-3cf2-4834-b6ec-c0eb916f8b9b",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        -1664,
        1632
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "aebd6390-d070-4965-9dd3-5a0b5d7320b1",
      "name": "Merge Vars + Photo1",
      "type": "n8n-nodes-base.merge",
      "position": [
        -2032,
        1120
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "4817bf2b-6f8d-42d8-9490-aaa1da31060c",
      "name": "Notify: Rejected",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1248,
        1312
      ],
      "parameters": {
        "text": "No worries \u2014 we won\u2019t render these. Send another product image anytime to generate fresh previews.",
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "8f73662a-601e-4352-b733-3049d8591a76",
      "name": "Gate: Render Approved",
      "type": "n8n-nodes-base.merge",
      "position": [
        1248,
        928
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "6ad82e2e-9d33-46ac-8697-fdbe6c76da79",
      "name": "Wait2",
      "type": "n8n-nodes-base.wait",
      "position": [
        5744,
        960
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 3
      },
      "typeVersion": 1.1
    },
    {
      "id": "cad817c5-a3a4-4683-b9a6-f617cf9c5c88",
      "name": "Rename -> photo B",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        1216
      ],
      "parameters": {
        "jsCode": "return items.map(i=>({json:{},binary:{photo3:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "876f6403-b44e-4f68-9ead-e504322175f8",
      "name": "Rename -> photo A",
      "type": "n8n-nodes-base.code",
      "position": [
        352,
        640
      ],
      "parameters": {
        "jsCode": "return items.map(i=>({json:{},binary:{photo2:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "0d3eb4fc-0e66-4b00-aa8a-4a724e550d0c",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2496,
        -16
      ],
      "parameters": {
        "color": 7,
        "width": 640,
        "height": 1808,
        "content": "### \ud83c\udfaf Command Center \n\n## \ud83d\udcf1 Input & Coordination Hub\n**Telegram Trigger \u2192 Request Photo \u2192 Set Chat Vars**\n\n\ud83e\udd16 Central command where AI agents receive product images and initialize autonomous brand animation creation. All agent communications flow through this coordination center.\n\n**Smart Process:**\n- \ud83d\udcf8 User uploads product photo via Telegram  \n- \ud83d\ude80 System activates intelligent agent network\n- \ud83d\udd04 Automated workflow coordination begins\n- \ud83d\udca1 Creative AI agents start planning\n\n*Transform product images into brand animations! \ud83c\udfac*\n\n## \ud83d\udcf7 ImgBB API Setup Required\n\n**Essential Configuration:**\n- Sign up at https://imgbb.com/\n- Generate API key from account settings\n- Replace \u201cPASTE_YOUR_IMGBB_API_KEY_HERE\u201d with your real key in the \u201cSet: YOUR API KEY (ImgBB)\u201d node.\n\n\n*Required for workflow to function properly*"
      },
      "typeVersion": 1
    },
    {
      "id": "d5882fd1-1479-4f93-a632-808887f37416",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1776,
        -16
      ],
      "parameters": {
        "width": 736,
        "height": 1808,
        "content": "### \ud83e\udde0 Vision Intelligence Network\n\n## \ud83c\udfa8 Multi-Agent Creative Direction\n**Creative Director \u2192 Art Director \u2192 Motion Designer \u2192 Think**\n\n**AI Agent Roles:**\n- \ud83d\udc41\ufe0f **Vision Agent**: Analyzes product imagery & strategy  \n- \u270d\ufe0f **Art Director**: Generates professional editing prompts\n- \ud83c\udfac **Motion Designer**: Creates cinematic movement instructions\n- \ud83c\udfaf **Orchestrator**: Coordinates autonomous collaboration\n\n**Powered by:** Gemini 2.5 Pro multi-agent coordination\n\n*Intelligent creative team working in perfect harmony!*"
      },
      "typeVersion": 1
    },
    {
      "id": "fd6e70ab-4a61-474d-9963-e3caa5c2dba5",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -816,
        -16
      ],
      "parameters": {
        "color": 2,
        "width": 1296,
        "height": 1808,
        "content": "### \ud83c\udfa8 Content Generation Engine\n\n## \ud83d\uddbc\ufe0f Autonomous Image Processing\n**Upload Original \u2192 Gen Image A/B \u2192 Download/Rename**\n\n\ud83c\udfaf Art Director directives executed through AI image editing. Creates dual visual concepts while preserving product identity.\n\n**Process Flow:**\n- \ud83d\udce4 Upload original product image\n- \u2728 Generate enhanced variations (A & B)\n- \ud83d\udcbe Download and rename for pipeline\n- \ud83d\udd04 Prepare for video generation\n\n**Technology:** Gemini Flash image-to-image generation\n\n*Smart visual enhancement maintaining brand integrity!*\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "da89b64f-bafb-4cdc-bc98-3f23ed2b4bff",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4320,
        -16
      ],
      "parameters": {
        "color": 3,
        "width": 928,
        "height": 2208,
        "content": "# \ud83c\udfacGenerate Product Brand Animations with NanoBanana, Kling & LATE Publishing \n\n( Shorti Brand Animation Engine By bilsimaging.com \ud83d\ude80 with Late Social Media integration + Telegram Approval)\n\nThis n8n workflow automates video creation by connecting multiple AI services in sequence to generate professional short-form brand content from product images at scale, with integrated social media distribution powered by Late.dev.\n\n## \ud83d\udcf8\u27a1\ufe0f\ud83d\udcf1 Transform Product Images Into Social Media Videos\n\n**\ud83e\udd16 Intelligent Brand Animation Pipeline with Social Distribution**\n\nConverts static product photos into dynamic animated videos for social platforms through coordinated AI services. Manages complete production cycle from image analysis to automated social media publishing across multiple platforms.\n\n**\u2728 Output Deliverables:**\n- \ud83d\udcf1 9:16 vertical videos optimized for social media\n- \ud83c\udfa5 Product showcase animations with professional camera movements\n- \u26a1 Dynamic visual effects and smooth transitions\n- \ud83c\udfb5 AI-generated contextual background music\n- \ud83c\udf10 Multi-platform format optimization\n\n## \ud83c\udfd7\ufe0f Workflow Architecture\n\n**\ud83e\udde0 AI-Powered Processing Pipeline:**\n\n**\ud83d\udc41\ufe0f Image Intelligence** - Google Gemini analyzes product imagery and generates strategic editing and motion directives\n\n**\u2728 Visual Enhancement** - Gemini Flash creates professional styled variations with optimized lighting and backgrounds\n\n**\ud83c\udfac Motion Generation** - Kling AI transforms static images into dynamic video using intelligent motion prompts\n\n**\ud83c\udfbc Audio Synthesis** - MMAudio v2 generates contextually appropriate soundtracks matching visual narrative\n\n**\ud83d\udc8e Quality Optimization** - Topaz AI upscaling delivers premium output quality enhancement\n\n**\ud83d\udcf2 Distribution Automation** - Late.dev API executes multi-platform publishing strategies\n\n**\ud83d\udee0\ufe0f Core Capabilities:**\n- \ud83d\uddbc\ufe0f Advanced image processing (enhancement, background replacement, lighting optimization)\n- \ud83c\udfa5 Cinematic motion generation (camera movements, focus transitions, parallax effects)\n- \u2699\ufe0f Precise format optimization (9:16 aspect ratio, 4-5 second duration, 24fps)\n- \ud83c\udfaf Intelligent audio-visual synchronization\n- \ud83d\udce6 Batch processing for scalable content production\n\n## \ud83d\udc64 User Experience Journey\n\n**\ud83d\udd04 Streamlined Process Flow:**\n1. \ud83d\udce4 Upload product image via Telegram interface\n2. \ud83e\udde0 AI system analyzes and generates strategic styling plans\n3. \ud83d\udc40 Preview dual concept variations for approval\n4. \u26a1 Automated video animation generation\n5. \ud83d\udd27 Quality enhancement and audio integration\n6. \ud83d\udcf1 Automated social media publishing across all connected platforms\n7. \ud83c\udf89 Real-time confirmation of successful posts and engagement tracking\n\n**\ud83d\udcf1 Social Media Workflow:**\n- \ud83d\udd17 One-time social account connection via Late.dev\n- \ud83c\udfaf Automated platform-specific content optimization\n- \ud83d\udcc5 Intelligent scheduling based on optimal posting times\n- \ud83d\udcca Real-time publishing status and error notifications\n- \ud83d\udd04 Cross-platform content synchronization\n\n**\u23f1\ufe0f Performance:** 5-10 minute total processing time + instant social media publishing across all platforms\n\n## \ud83d\udcbc Business Applications\n\n**\ud83d\uded2 E-commerce Solutions:** Professional product videos for online retailers without in-house video production capabilities\n\n**\ud83d\udcf1 Social Media Marketing:** Consistent brand content creation across multiple platforms and campaigns\n\n**\ud83c\udfea Small Business Enablement:** Enterprise-level video capabilities for resource-constrained businesses\n\n**\ud83d\udcc8 Volume Content Production:** Scalable solution for high-volume content needs where manual creation becomes cost-prohibitive\n\n## \u2699\ufe0f Technical Infrastructure\n\n**\ud83d\udd0c Required API Services:**\n1. **\ud83e\udde0 Google Gemini API** - Multi-agent creative direction and intelligent image editing\n2. **\ud83c\udfac Fal.AI API** - Kling video generation, MMAudio synthesis, and Topaz upscaling services\n3. **\ud83d\udcf1 Telegram Bot Token** - User interface and real-time agent communication\n4. **\ud83d\udcf7 ImgBB API** - Distributed image hosting and agent asset management\n5. **\ud83c\udf10 Late.dev API** - Autonomous cross-platform social media publishing\n\n\n**\u26a0\ufe0f Current Limitations:** Output quality dependent on input image quality\n\n\"\ud83d\udd27 TECHNICAL REQUIREMENTS: This is an advanced workflow requiring management of multiple API accounts, credential rotation, and understanding of AI service limitations. \n\nCreated with love by https://shortibrand.bilsimaging.com/"
      },
      "typeVersion": 1
    },
    {
      "id": "f797662b-e010-43f9-84c2-57e05d92a7b4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -16
      ],
      "parameters": {
        "color": 6,
        "width": 896,
        "height": 1808,
        "content": "### \ud83d\udee1\ufe0f Human Oversight Gate\n\n## \u2705 Strategic Approval Checkpoint\n**Send Image A/B \u2192 Ask Approval \u2192 Approved? \u2192 Notify**\n\n**Quality Control Process:**\n- \ud83d\udcf8 AI agents present visual concepts for validation\n- \ud83d\udcb0 Prevents unnecessary resource expenditure  \n- \ud83d\udc64 Maintains human oversight of autonomous decisions\n- \u26a1 Cost-saving approval before expensive video rendering\n\n**Benefits:**\n- \ud83c\udfaf Ensures output meets expectations\n- \ud83d\udcb8 Optimizes processing costs\n- \ud83d\udd04 Allows iteration before final production\n\n*Smart checkpoint saving time and resources!*"
      },
      "typeVersion": 1
    },
    {
      "id": "c214b81e-6c84-4c32-91b7-4f411f2efed2",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1472,
        -16
      ],
      "parameters": {
        "color": 2,
        "width": 1472,
        "height": 1808,
        "content": "### \ud83c\udfac Cinematic Production Studio\n\n## \ud83c\udfa5 Motion Agent Video Generation\n**Kling Queue A/B \u2192 Wait \u2192 Animation Check \u2192 Results**\n\n**Autonomous Video Creation:**\n- \ud83c\udfaf Motion Agent directs Kling AI parameters\n- \u23f1\ufe0f Intelligent status monitoring & resource management\n- \ud83d\udcf9 Professional camera movements & effects\n- \ud83d\udd04 Automated completion verification\n\n**Output Specifications:**\n- \ud83d\udcf1 9:16 vertical format for social platforms\n- \u26a1 4-5 second duration, 24fps\n- \ud83c\udfa8 Cinematic quality animations\n\n*AI-powered video production at scale!*"
      },
      "typeVersion": 1
    },
    {
      "id": "4b37d4a1-0404-478c-8515-563b3ab61e4e",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3040,
        -16
      ],
      "parameters": {
        "color": 2,
        "width": 1936,
        "height": 1808,
        "content": "### \ud83c\udfb5 Audio Intelligence Lab\n\n## \ud83c\udfbc Soundtrack Generation & Composition\n**FFmpeg Compose \u2192 Create Soundtrack \u2192 Audio Integration**\n\n**Audio Agent Tasks:**\n- \ud83c\udfa7 Contextual soundtrack generation (MMAudio v2)\n- \ud83c\udfac Video composition & synchronization\n- \ud83d\udd04 Autonomous post-production pipeline\n- \u26a1 Real-time audio-visual matching\n\n**Features:**\n- \ud83c\udfa8 AI-generated audio matching visual narrative\n- \ud83c\udfaf Scene-appropriate ambient soundscapes\n- \ud83d\udcf1 Optimized for social media platforms\n\n*Intelligent audio that enhances your brand story!*"
      },
      "typeVersion": 1
    },
    {
      "id": "25e346b4-50af-475c-99d3-3aca861b3b15",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5216,
        -16
      ],
      "parameters": {
        "color": 2,
        "width": 1008,
        "height": 1824,
        "content": "\u26a1 Quality Enhancement Engine\n\ud83d\udd27 Autonomous Upscaling System\nUpscale \u2192 Wait \u2192 Get Result \u2192 Download Enhanced\nQuality Control Process:\n\n\ud83c\udfa8 Topaz AI upscaling for premium output\n\u23f1\ufe0f Intelligent processing time management\n\ud83c\udfaf Autonomous quality parameter optimization\n\ud83d\udcc8 Professional-grade video enhancement\n\nEnhancement Features:\n\n\ud83d\udd0d Resolution improvement and clarity boost\n\ud83c\udfac Cinematic quality refinement\n\ud83d\udcf1 Social media format optimization\n\ud83d\udc8e Premium visual output standards\n\nTransforming good videos into exceptional content!"
      },
      "typeVersion": 1
    },
    {
      "id": "321d09d2-ee50-4b57-8b9e-676816677fe6",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6352,
        -16
      ],
      "parameters": {
        "color": 4,
        "width": 1184,
        "height": 1824,
        "content": "### \ud83d\udcf1 Social Distribution Network\n\n## \ud83c\udf10 Multi-Platform Publishing Agent\n**Get Accounts \u2192 Share to Instagram/TikTok/YouTube**\n\n**Social Agent Features:**\n- \ud83c\udfaf Platform-specific optimization & formatting\n- \ud83d\ude80 Automated publishing via Late.dev API\n- \ud83d\udcca Intelligent distribution decisions\n- \ud83d\udd04 Cross-platform content adaptation\n\n**Supported Platforms:**\n- \ud83d\udcf8 Instagram Reels with engagement optimization\n- \ud83c\udfb5 TikTok with trend-aware formatting\n- \ud83d\udcfa YouTube Shorts with SEO optimization and more\n\n**Integration:** Late.dev API automation http://late.dev/\napi docs https://getlate.dev/docs\n*Seamless brand presence across all major platforms!*\n"
      },
      "typeVersion": 1
    },
    {
      "id": "f730a4a7-cbd7-4ab2-8775-d5403e531a4f",
      "name": "Merge API + Photo",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1472,
        784
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "69b26970-a06a-433e-923d-36b17f34ffd8",
      "name": "Set: YOUR API KEY (ImgBB)",
      "type": "n8n-nodes-base.set",
      "position": [
        -2032,
        592
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "a7d62af0-baf3-4349-abe9-a75b91edc3f2",
              "name": "imgbb_api_key",
              "type": "string",
              "value": "PASTE_YOUR_IMGBB_API_KEY_HERE"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "a50fcbeb-6c17-47a5-9609-a6873e8f46de",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        7600,
        -16
      ],
      "parameters": {
        "color": 5,
        "width": 1840,
        "height": 1824,
        "content": "\n# \ud83d\ude80 Bonus Quick Guide: Using Late\n\n### 1. **Get Your API Key**\n\n* Log in to [getlate.dev](https://getlate.dev).\n* Copy your **API key** from the dashboard.\n* You\u2019ll use this in every request:\n\n  ```\n  Authorization: Bearer YOUR_TOKEN_HERE\n  ```\n\n---\n\n### 2. **Understand Profiles**\n\n* A **profile** is a container for your brand/client.\n* Each profile can hold **one account per platform** (TikTok, Instagram, YouTube, etc.).\n* Get your profiles:\n\n  ```bash\n  curl -s https://getlate.dev/api/v1/profiles \\\n    -H \"Authorization: Bearer $LATE_API_KEY\"\n  ```\n\n---\n\n### 3. **List Accounts**\n\n* Accounts are the actual connected socials.\n* Get all accounts for a profile:\n\n  ```bash\n  curl -s \"https://getlate.dev/api/v1/accounts?profileId=PROFILE_ID\" \\\n    -H \"Authorization: Bearer $LATE_API_KEY\"\n  ```\n\n---\n\n### 4. **Upload or Reference Media**\n\n* Option A: Use a **public MP4 URL**.\n* Option B: Upload with `/v1/media` (multipart). It returns a hosted `url` for your post.\n\n---\n\n### 5. **Create a Post**\n\n* Minimal example:\n\n  ```bash\n  curl -X POST https://getlate.dev/api/v1/posts \\\n    -H \"Authorization: Bearer $LATE_API_KEY\" \\\n    -H \"Content-Type: application/json\" \\\n    -d '{\n      \"content\": \"Check out this amazing short! #Shorts\",\n      \"platforms\": [\n        { \"platform\": \"youtube\", \"accountId\": \"YOUTUBE_ACCOUNT_ID\" }\n      ],\n      \"mediaItems\": [\n        { \"type\": \"video\", \"url\": \"https://example.com/video.mp4\" }\n      ],\n      \"publishNow\": true\n    }'\n  ```\n\n---\n\n### 6. **Tips & Troubleshooting**\n\n* \u2705 Always fetch `accountId` via `/v1/accounts` using the **same API key**.\n* \u2705 Use `publishNow: true` or a proper `scheduledFor` datetime.\n* \u26a0\ufe0f If you get `403` \u2192 wrong key vs account mismatch.\n* \u26a0\ufe0f If you get `500` \u2192 test with minimal body and a known-good MP4.\n\n---\n\n\ud83d\udc49 That\u2019s it: **Profile \u2192 Account \u2192 Media \u2192 Post**.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "c603e19a-0fac-4784-9e4d-7bc88aa103c5",
      "name": "Send Final Video Url",
      "type": "n8n-nodes-base.telegram",
      "position": [
        6528,
        720
      ],
      "parameters": {
        "text": "=Your animation is ready \\(upscaled\\)\\:\n`={{ $('Get Result').item.json.video.url }}`",
        "chatId": "={{ $('Set: Chat Vars').first().json.chat_id }}",
        "additionalFields": {
          "parse_mode": "MarkdownV2",
          "appendAttribution": false
        }
      },
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "64ae32bf-2d50-442e-b10f-674aaeac9737",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3344,
        -16
      ],
      "parameters": {
        "color": 5,
        "width": 640,
        "height": 2208,
        "content": "## \ud83d\udccb Installation Instructions\n\n1. **\ud83d\udce5 Import Workflow**: Copy the JSON and import into your n8n instance\n2. **\ud83d\udd11 Configure Credentials**: Add all required API keys in n8n and  Replace \u201cPASTE_YOUR_IMGBB_API_KEY_HERE\u201d with your real key in the \u201cSet: YOUR API KEY (ImgBB)\u201d node.credentials\n3. **\ud83e\udd16 Setup Telegram Bot**: Create bot via @BotFather and add token\n4. **\u2705 Test Services**: Verify all external APIs are accessible\n5. **\ud83d\udd17 Configure Social Accounts**: Connect Late.dev if using auto-publishing\n6. **\ud83d\ude80 Start Workflow**: Activate and send a product photo to your bot\n\n## \ud83c\udd98 Support & Contact\n\n**Need Help? \ud83e\udd1d**\n- **\ud83d\udce7 Email**: bilsimaging@gmail.com\n- **\ud83c\udf1f n8n Creator Community**: https://n8n.partnerlinks.io/bilsimaging \n\nFor technical assistance, workflow customization, or implementation support, reach out via email. We're here to help you get the most out of your Shorti Brand Animation workflow! \ud83d\udcaa\n\n---\n\n\ud83d\udce7 Technical Support: bilsimaging@gmail.com or contact@bilsimaging.com\n![](https://shortibrand.bilsimaging.com/images/exemple.png)\n[![Shortibrand](https://shortibrand.bilsimaging.com/images/shorti-brand-animation-preview.jpg)](https://shortibrand.bilsimaging.com/)"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": "IGRES856HVOWEGOJ",
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveDataSuccessExecution": "all"
  },
  "versionId": "fd5a6f97-cf1e-4ae3-8198-9cf3b661bc68",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Send message and wait for response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think": {
      "ai_tool": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait2": {
      "main": [
        [
          {
            "node": "Get Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait A": {
      "main": [
        [
          {
            "node": "Kling Status A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait B": {
      "main": [
        [
          {
            "node": "Kling Status B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine": {
      "main": [
        [
          {
            "node": "Upscale",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upscale": {
      "main": [
        [
          {
            "node": "Wait2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Approved?": {
      "main": [
        [
          {
            "node": "Gate: Render Approved",
            "type": "main",
            "index": 1
          }
        ],
        [
          {
            "node": "Notify: Rejected",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download A": {
      "main": [
        [
          {
            "node": "Send video Concept A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download B": {
      "main": [
        [
          {
            "node": "Send video Concept B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get  Video": {
      "main": [
        [
          {
            "node": "Create Soundtrack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Result": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Final Video Url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gen Image A": {
      "main": [
        [
          {
            "node": "Split Image A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gen Image B": {
      "main": [
        [
          {
            "node": "Split Image B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Art Director": {
      "ai_tool": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send Image B": {
      "main": [
        [
          {
            "node": "Ask Approval (Images)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Compose": {
      "main": [
        [
          {
            "node": "Get  Video",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Request Photo": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set: YOUR API KEY (ImgBB)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Merge API + Photo",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Split Image A": {
      "main": [
        [
          {
            "node": "Download Image A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Image B": {
      "main": [
        [
          {
            "node": "Download Image B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "kling Queue A": {
      "main": [
        [
          {
            "node": "Wait A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "kling Queue B": {
      "main": [
        [
          {
            "node": "Wait B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "FFmpeg Compose": {
      "main": [
        [
          {
            "node": "Notify: Stitching",
            "type": "main",
            "index": 0
          },
          {
            "node": "Wait Compose",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Soundtrack": {
      "main": [
        [
          {
            "node": "Download Final Video (No Upscale)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kling Result A": {
      "main": [
        [
          {
            "node": "Merge Kling Results",
            "type": "main",
            "index": 0
          },
          {
            "node": "Download A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kling Result B": {
      "main": [
        [
          {
            "node": "Merge Kling Results",
            "type": "main",
            "index": 1
          },
          {
            "node": "Download B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kling Status A": {
      "main": [
        [
          {
            "node": "Animation Completed? A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Kling Status B": {
      "main": [
        [
          {
            "node": "Animation Completed? B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set: Chat Vars": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Motion designer": {
      "ai_tool": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Wait Soundtrack": {
      "main": [
        [
          {
            "node": "Get Soundtrack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image A": {
      "main": [
        [
          {
            "node": "Rename -> photo A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Image B": {
      "main": [
        [
          {
            "node": "Rename -> photo B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Request Photo",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set: Chat Vars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "start processing": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Aggregate Results": {
      "main": [
        [
          {
            "node": "FFmpeg Compose",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create Soundtrack": {
      "main": [
        [
          {
            "node": "Wait Soundtrack",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge API + Photo": {
      "main": [
        [
          {
            "node": "Upload Original Image (imgbb)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Edited URLs": {
      "main": [
        [
          {
            "node": "Aggregate Edited URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename -> photo A": {
      "main": [
        [
          {
            "node": "Upload Edited A (imgbb)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Image A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename -> photo B": {
      "main": [
        [
          {
            "node": "Upload Edited B (imgbb)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Image B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Vars + Photo": {
      "main": [
        [
          {
            "node": "Gen Image A",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gen Image B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Kling Results": {
      "main": [
        [
          {
            "node": "Aggregate Results",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Vars + Photo1": {
      "main": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Storyboard Vars": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Send video Concept A": {
      "main": [
        [
          {
            "node": "Merge Kling Results",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Send video Concept B": {
      "main": [
        [
          {
            "node": "Merge Kling Results",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Aggregate Edited URLs": {
      "main": [
        [
          {
            "node": "Gate: Render Approved",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Ask Approval (Images)": {
      "main": [
        [
          {
            "node": "Approved?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gate: Render Approved": {
      "main": [
        [
          {
            "node": "kling Queue A",
            "type": "main",
            "index": 0
          },
          {
            "node": "kling Queue B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Animation Completed? A": {
      "main": [
        [
          {
            "node": "Kling Result A",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait A",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Animation Completed? B": {
      "main": [
        [
          {
            "node": "Kling Result B",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait B",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Edited A (imgbb)": {
      "main": [
        [
          {
            "node": "Merge Edited URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Edited B (imgbb)": {
      "main": [
        [
          {
            "node": "Merge Edited URLs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Motion designer",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Set: YOUR API KEY (ImgBB)": {
      "main": [
        [
          {
            "node": "Merge API + Photo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model15": {
      "ai_languageModel": [
        [
          {
            "node": "Art Director",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model16": {
      "ai_languageModel": [
        [
          {
            "node": "Creative Director (Orchestrator) agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Send Full Video (No Upscale)": {
      "main": [
        [
          {
            "node": "Combine",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get All Social Media Accounts": {
      "main": [
        [
          {
            "node": "Share to Youtube Shorts",
            "type": "main",
            "index": 0
          },
          {
            "node": "Share to Instagram",
            "type": "main",
            "index": 0
          },
          {
            "node": "Share to tiktok",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Original Image (imgbb)": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Download Final Video (No Upscale)": {
      "main": [
        [
          {
            "node": "Send Full Video (No Upscale)",
            "type": "main",
            "index": 0
          },
          {
            "node": "Combine",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send message and wait for response": {
      "main": [
        [
          {
            "node": "Get All Social Media Accounts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Creative Director (Orchestrator) agent": {
      "main": [
        [
          {
            "node": "Set Storyboard Vars",
            "type": "main",
            "index": 0
          },
          {
            "node": "start processing",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}