{
  "id": "FalZAFU8kILwprZN",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Generate ADs Carrosuseles",
  "tags": [],
  "nodes": [
    {
      "id": "2c2f2d0b-8fb5-4949-b23e-156c307a1bb0",
      "name": "Structured Output Parser2",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        624,
        416
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"title\": \"Pendulum, Shadow, and the Silent Lunar Mark\",\n  \"prompt1\": \"Vertical 9:16 top-down altar, matte black cloth; brass pendulum centered over minimalist star map of dots and thin lines; warm rim light; high contrast; no faces, no hands, no text, no letters, no numbers, no logos.\",\n  \"prompt2\": \"Vertical 9:16 macro side view; pendulum slows above a crescent metal cutout; precise shadow alignment on matte cloth; thin incense smoke; no faces, no hands, no text, no letters, no numbers, no logos.\",\n  \"prompt3\": \"Vertical 9:16 top-down; silver lunar talisman placed into the crescent cutout; shadow shape unchanged; clean composition; subtle micro-glitter specks; no faces, no hands, no text, no letters, no numbers, no logos.\",\n  \"prompt4\": \"Vertical 9:16 macro; candle off-frame flickers; highlight sweep across talisman; star map lines glint briefly; centered framing; no faces, no hands, no text, no letters, no numbers, no logos.\",\n  \"prompt5\": \"Vertical 9:16 top-down locked; pendulum fully still above talisman center; single glint travels once around edge then fades; pristine background; no faces, no hands, no text, no letters, no numbers, no logos.\",\n \"i2v_prompt1\": \"Animate frame 1 with gentle parallax and light sweep; may describe camera path/motion cues; preserve product/brand; no morphing; 9:16; ~4s; 24fps\",\n  \"i2v_prompt2\": \"Animate frame 2 (edit of frame 1): subtle motion consistent with the stated change (e.g., slight yaw/push\u2011in, highlight roll); preserve product; no morphing; 9:16; ~4s; 24fps\",\n  \"i2v_prompt3\": \"Animate frame 3 (edit of frame 2): continue the narrative motion (e.g., controlled tilt/glint/reveal); preserve product; no morphing; 9:16; ~4s; 24fps\",\n  \"i2v_prompt4\": \"Animate frame 4 (edit of frame 3): finishing move (e.g., short arc or glint wrap) into a clean hold; preserve product; no morphing; 9:16; ~4s; 24fps\",\n  \"environment\": \"Candlelit altar, matte black cloth, high contrast, thin incense smoke.\",\n  \"sound\": \"Soft candle crackle, faint ticking, distant single chime.\"\n}"
      },
      "typeVersion": 1.2
    },
    {
      "id": "ec34e5ee-7283-49df-9330-d3d5688d6008",
      "name": "Think2",
      "type": "@n8n/n8n-nodes-langchain.toolThink",
      "position": [
        480,
        432
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "cff00366-7e39-4704-98f0-7acfc5052454",
      "name": "Storyboard Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        352,
        176
      ],
      "parameters": {
        "text": "==Use this product description:\n\n{{ $json[\"Product description\"] }}\n\nCreate a promotional carousel of 4 images for social media. Focus on showing the product IN USE by real people with promotional text.\n\nYour task:\n1. Design 4 independent images showing different aspects of the product\n2. Include people using/enjoying the product naturally\n3. Add promotional text elements, benefits or call-to-actions\n4. Create an engaging carousel for Instagram/TikTok/Facebook\n\nFor the product context, consider:\n- Real people using the product in everyday situations\n- Visible promotional text (offers, benefits, CTAs)\n- Authentic environments related to product usage\n- Compositions that generate engagement and conversion\n\nReturn ONLY a compact JSON with these keys (no prose):\n{\n  \"title\": \"<\u226460 chars, catchy hook title that captures attention>\",\n  \"prompt1\": \"<Image 1: Person using the product - vertical 9:16, includes visible promotional text, natural environment>\",\n  \"prompt2\": \"<Image 2: Key product benefit in use - shows results or satisfaction, with benefit text>\",\n  \"prompt3\": \"<Image 3: Product in lifestyle context - person enjoying, text with offer or CTA>\",\n  \"prompt4\": \"<Image 4: Hero shot of product with person - impactful final composition, text with call-to-action>\",\n  \"i2v_prompt1\": \"Static promotional image for carousel - no animation needed\",\n  \"i2v_prompt2\": \"Static promotional image for carousel - no animation needed\", \n  \"i2v_prompt3\": \"Static promotional image for carousel - no animation needed\",\n  \"i2v_prompt4\": \"Static promotional image for carousel - no animation needed\",\n  \"environment\": \"<\u226425 words: authentic environment where product is used, real situations>\",\n  \"sound\": \"<\u226420 words: modern catchy commercial music - suitable for social media ads>\"\n}\n\nRules:\n\u2022 INCLUDE people using the product naturally and authentically\n\u2022 ADD visible promotional text in images (offers, benefits, CTAs)\n\u2022 Show product in real usage situations\n\u2022 Focus on generating engagement and conversion\n\u2022 Attractive compositions for social media\n\u2022 Maintain visual coherence between the 4 images\n\u2022 Language should follow input description language\n\u2022 Output strictly valid JSON",
        "options": {
          "systemMessage": "Role: You are a creative director specialized in promotional ads for social media. You will produce a 4-image carousel (vertical 9:16) to promote products. The goal is to create authentic content that generates engagement and conversions.\n\nContent rules:\n\n- ALWAYS include people using the product naturally\n- Add visible promotional text in images (offers, benefits, CTAs)\n- Show product in real usage situations\n- Create attractive compositions for Instagram/TikTok/Facebook\n- Maintain visual coherence between the 4 images\n- Focus on generating engagement and conversion\n- Output strictly valid compact JSON, no prose, no markdown.\n\nLanguage: Follow the input description language (ES/EN)."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "61f46059-25ed-4aef-8cfa-f7f0dd22fec3",
      "name": "Set Storyboard Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        784,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "603206a7-a63d-4fc1-8771-f5e6581b6b64",
              "name": "title",
              "type": "string",
              "value": "={{ $json.output.title }}"
            },
            {
              "id": "13789e95-b7c3-4952-afaa-5b86e212b225",
              "name": "prompt1",
              "type": "string",
              "value": "={{ $json.output.prompt1 }}"
            },
            {
              "id": "fb657b62-be6f-4d12-a2e5-884862394515",
              "name": "prompt2",
              "type": "string",
              "value": "={{ $json.output.prompt2 }}"
            },
            {
              "id": "90c41c48-b79d-4fde-aff6-7fbdcb287526",
              "name": "prompt3",
              "type": "string",
              "value": "={{ $json.output.prompt3 }}"
            },
            {
              "id": "74fca959-7fb8-4578-b98d-a9910f622845",
              "name": "prompt4",
              "type": "string",
              "value": "={{ $json.output.prompt4 }}"
            },
            {
              "id": "3257de17-c23a-4378-83d0-3583cd2662f7",
              "name": "i2v_prompt1",
              "type": "string",
              "value": "={{ $json.output.i2v_prompt1 }}"
            },
            {
              "id": "7b07631e-fbbe-40c3-a2cf-1d567a1338b0",
              "name": "i2v_prompt2",
              "type": "string",
              "value": "={{ $json.output.i2v_prompt2 }}"
            },
            {
              "id": "43beff27-abd0-40cf-8040-eefdab3829f3",
              "name": "i2v_prompt3",
              "type": "string",
              "value": "={{ $json.output.i2v_prompt3 }}"
            },
            {
              "id": "2b68fbbe-1800-4ecc-ba45-7ae281c477e0",
              "name": "i2v_prompt4",
              "type": "string",
              "value": "={{ $json.output.i2v_prompt4 }}"
            },
            {
              "id": "15224724-31ad-4fda-a812-f5b7b9593342",
              "name": "environment",
              "type": "string",
              "value": "={{ $json.output.environment }}"
            },
            {
              "id": "fbceb288-b55b-4c1d-828f-e47f66c6fa23",
              "name": "sound",
              "type": "string",
              "value": "={{ $json.output.sound }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "976a12fc-c1b9-420d-90ec-04d0258d0699",
      "name": "Gemini 2.5 Flash - Generate Image 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        112
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $('Set Storyboard Vars').item.json.prompt1 }}\",\"image_urls\":[\"{{ $('Upload Original Image to imgbb').item.json.data.url }}\"],\"num_images\":{{ $('Set APIs Vars').item.json.number_of_images }}}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "ad1e115e-08f4-4656-836b-90c6db366899",
      "name": "Separate Image Outputs 2",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1840,
        112
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "45ba3521-6164-4995-bf78-9ea52efb964f",
      "name": "Rename to photo 2",
      "type": "n8n-nodes-base.code",
      "position": [
        2272,
        112
      ],
      "parameters": {
        "jsCode": "return items.map((i)=>({json:{url: i.json.url},binary:{photo2:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "b12681c2-dd64-4acf-8c42-0c419991263e",
      "name": "Upload Image to imgbb 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2464,
        112
      ],
      "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 APIs Vars').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "e592e915-46a1-469a-953e-2337df8c0221",
      "name": "Gemini 2.5 Flash - Generate Image 3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        288
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $('Set Storyboard Vars').item.json.prompt2 }}\",\"image_urls\":[\"{{ $('Upload Original Image to imgbb').item.json.data.url }}\"],\"num_images\":{{ $('Set APIs Vars').item.json.number_of_images }}}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "a75f08e9-ec69-47e0-ac71-158423e400d1",
      "name": "Separate Image Outputs 3",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1840,
        288
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "3815e60f-354c-4bd4-8759-10f908173718",
      "name": "Rename to photo 3",
      "type": "n8n-nodes-base.code",
      "position": [
        2288,
        288
      ],
      "parameters": {
        "jsCode": "return items.map((i)=>({json:{url: i.json.url},binary:{photo3:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "11dd5e8d-c707-4e2e-bde9-cd631e785800",
      "name": "Upload Image to imgbb 3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2464,
        288
      ],
      "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 APIs Vars').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "09d03a28-18d9-4a18-9e19-e1a88565615b",
      "name": "Gemini 2.5 Flash - Generate Image 4",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        464
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $('Set Storyboard Vars').item.json.prompt3 }}\",\"image_urls\":[\"{{ $('Upload Original Image to imgbb').item.json.data.url }}\"],\"num_images\":{{ $('Set APIs Vars').item.json.number_of_images }}}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "92633196-e4f4-4071-8b4b-c1f13c1048ce",
      "name": "Separate Image Outputs 4",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1840,
        464
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "50a908f7-743b-4c79-9d0a-9a1072f024d7",
      "name": "Rename to photo 4",
      "type": "n8n-nodes-base.code",
      "position": [
        2272,
        464
      ],
      "parameters": {
        "jsCode": "return items.map((i)=>({json:{url: i.json.url},binary:{photo4:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "a673791c-56d4-4dee-9d64-23f962ad5830",
      "name": "Upload Image to imgbb 4",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2464,
        464
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "photo4"
            },
            {
              "name": "key",
              "value": "={{ $('Set APIs Vars').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "4862f52b-c740-485f-8d34-0c74494b0e80",
      "name": "Gemini 2.5 Flash - Generate Image 5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1616,
        608
      ],
      "parameters": {
        "url": "https://fal.run/fal-ai/gemini-25-flash-image/edit",
        "body": "={\"prompt\":\"{{ $('Set Storyboard Vars').item.json.prompt4 }}\",\"image_urls\":[\"{{ $('Upload Original Image to imgbb').item.json.data.url }}\"],\"num_images\":{{ $('Set APIs Vars').item.json.number_of_images }}}",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "raw",
        "authentication": "genericCredentialType",
        "rawContentType": "application/json",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "0511fe72-5146-4c6d-94c2-ea19633ec8d6",
      "name": "Separate Image Outputs 5",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1840,
        608
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "images"
      },
      "typeVersion": 1
    },
    {
      "id": "60310f46-ac3c-41d9-8751-b0c34279da0a",
      "name": "Rename to photo 5",
      "type": "n8n-nodes-base.code",
      "position": [
        2256,
        608
      ],
      "parameters": {
        "jsCode": "return items.map((i)=>({json:{url: i.json.url},binary:{photo5:i.binary.data}}));"
      },
      "typeVersion": 2
    },
    {
      "id": "a7f3e9cf-e992-418e-ab56-f8d1e1a8c4ec",
      "name": "Upload Image to imgbb 5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2464,
        608
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "photo5"
            },
            {
              "name": "key",
              "value": "={{ $('Set APIs Vars').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "4dc8427d-b260-46bd-8549-c6064c43538e",
      "name": "Generate Carousel Description",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2928,
        208
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert at creating descriptions for Instagram/TikTok carousels."
            },
            {
              "content": "=I'm going to upload a carousel of 4 promotional images of a PRODUCT (9:16). Create an advertising description for Instagram/TikTok based on these prompts:\n1) {{ $('Set Storyboard Vars').item.json.prompt1 }}\n2) {{ $('Set Storyboard Vars').item.json.prompt2 }}\n3) {{ $('Set Storyboard Vars').item.json.prompt3 }}\n4) {{ $('Set Storyboard Vars').item.json.prompt4 }}\n\nIMPORTANT: Respond only with the description (\u2264 150 characters), benefit-oriented with a strong CTA. If the prompts are in Spanish, respond in Spanish; if in English, respond in English."
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.4
    },
    {
      "id": "990aa43c-5b1e-42e1-b617-5b5496ce4875",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        2640,
        176
      ],
      "parameters": {
        "numberInputs": 4
      },
      "typeVersion": 3.1
    },
    {
      "id": "ab1018a7-34eb-4052-9ef2-00c77365f582",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2752,
        208
      ],
      "parameters": {
        "options": {},
        "aggregate": "aggregateAllItemData"
      },
      "typeVersion": 1
    },
    {
      "id": "b4afdc4e-84cb-4703-bd25-5f1ef7d6536f",
      "name": "Photo Upload Form",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -48,
        96
      ],
      "parameters": {
        "path": "generate-ad",
        "options": {},
        "formTitle": "Generate ads",
        "formFields": {
          "values": [
            {
              "fieldType": "file",
              "fieldLabel": "photo",
              "multipleFiles": false,
              "requiredField": true
            },
            {
              "fieldType": "textarea",
              "fieldLabel": "Product description",
              "placeholder": "Describe the product"
            }
          ]
        },
        "formDescription": "Upload photo and descriptipon"
      },
      "typeVersion": 2.1
    },
    {
      "id": "37fb078e-5d18-4df9-b0eb-d945cc7e6b31",
      "name": "Set APIs Vars",
      "type": "n8n-nodes-base.set",
      "position": [
        992,
        176
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "65f5780e-7894-4d4c-b1d7-b6b922aceebe",
              "name": "number_of_images",
              "type": "number",
              "value": 1
            },
            {
              "id": "e6d64db7-8c79-4f8f-96bf-edbc1faa365d",
              "name": "size_of_image",
              "type": "string",
              "value": "1024x1024"
            },
            {
              "id": "5614f0f0-92d2-4a42-98a7-401f43308b55",
              "name": "openai_image_model",
              "type": "string",
              "value": "gemini-25-flash-image"
            },
            {
              "id": "9ab52e7d-a777-4857-96bd-ae9e06317e54",
              "name": "format_image",
              "type": "string",
              "value": "webp"
            },
            {
              "id": "a7d62af0-baf3-4349-abe9-a75b91edc3f2",
              "name": "imgbb_api_key",
              "type": "string",
              "value": "imgbb_token"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "05379653-a84d-44ec-8e24-f5d3111bf19f",
      "name": "Merge Vars + Photo1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1200,
        112
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.1
    },
    {
      "id": "0ab18fb1-0622-4159-920f-09e841f20f89",
      "name": "Upload Original Image to imgbb",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1392,
        112
      ],
      "parameters": {
        "url": "https://api.imgbb.com/1/upload",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "bodyParameters": {
          "parameters": [
            {
              "name": "image",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "photo"
            },
            {
              "name": "key",
              "value": "={{ $('Set APIs Vars').item.json.imgbb_api_key }}"
            }
          ]
        }
      },
      "retryOnFail": true,
      "typeVersion": 4.2
    },
    {
      "id": "c5987763-e130-447d-81c8-9145a1203504",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        384,
        384
      ],
      "parameters": {
        "options": {},
        "modelName": "models/gemini-2.5-pro"
      },
      "credentials": {
        "googlePalmApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "04f07d15-0e5f-4ba5-9898-c6c780e87bd4",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2112,
        112
      ],
      "parameters": {
        "url": "={{ $('Separate Image Outputs 2').item.json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "44e0a96b-635c-4acc-86bf-fe52946dc318",
      "name": "HTTP Request1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2112,
        288
      ],
      "parameters": {
        "url": "={{ $('Separate Image Outputs 3').item.json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "05153a04-5759-43bc-a000-3e2a525bfdee",
      "name": "HTTP Request2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2096,
        464
      ],
      "parameters": {
        "url": "={{ $('Separate Image Outputs 4').item.json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "6eae5662-3221-4828-895c-5b36c2593d7e",
      "name": "HTTP Request3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2080,
        608
      ],
      "parameters": {
        "url": "={{ $('Separate Image Outputs 5').item.json.url }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "ec5261c7-1964-4a0e-8d61-8a81e2820d48",
      "name": "Upload Post",
      "type": "n8n-nodes-upload-post.uploadPost",
      "position": [
        3200,
        208
      ],
      "parameters": {
        "user": "testttt",
        "title": "={{ $json.message.content }}",
        "photos": "={{ $('Upload Image to imgbb 2').item.json.data.url }},{{ $('Upload Image to imgbb 3').item.json.data.url }},{{ $('Upload Image to imgbb 4').item.json.data.url }},{{ $('Upload Image to imgbb 5').item.json.data.url }}",
        "platform": [
          "instagram",
          "tiktok",
          "youtube",
          "facebook"
        ],
        "facebookPageId": "facebook_page_id"
      },
      "credentials": {
        "uploadPostApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "15d119de-fd19-483a-a38e-125ae05dc990",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Think2": {
      "ai_tool": [
        [
          {
            "node": "Storyboard Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "Generate Carousel Description",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "Rename to photo 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Rename to photo 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request2": {
      "main": [
        [
          {
            "node": "Rename to photo 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request3": {
      "main": [
        [
          {
            "node": "Rename to photo 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set APIs Vars": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Storyboard Agent": {
      "main": [
        [
          {
            "node": "Set Storyboard Vars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Photo Upload Form": {
      "main": [
        [
          {
            "node": "Merge Vars + Photo1",
            "type": "main",
            "index": 0
          },
          {
            "node": "Storyboard Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename to photo 2": {
      "main": [
        [
          {
            "node": "Upload Image to imgbb 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename to photo 3": {
      "main": [
        [
          {
            "node": "Upload Image to imgbb 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename to photo 4": {
      "main": [
        [
          {
            "node": "Upload Image to imgbb 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Rename to photo 5": {
      "main": [
        [
          {
            "node": "Upload Image to imgbb 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Vars + Photo1": {
      "main": [
        [
          {
            "node": "Upload Original Image to imgbb",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Storyboard Vars": {
      "main": [
        [
          {
            "node": "Set APIs Vars",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to imgbb 2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Image to imgbb 3": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Upload Image to imgbb 4": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Upload Image to imgbb 5": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Storyboard Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Separate Image Outputs 2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separate Image Outputs 3": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separate Image Outputs 4": {
      "main": [
        [
          {
            "node": "HTTP Request2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Separate Image Outputs 5": {
      "main": [
        [
          {
            "node": "HTTP Request3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser2": {
      "ai_outputParser": [
        [
          {
            "node": "Storyboard Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Generate Carousel Description": {
      "main": [
        [
          {
            "node": "Upload Post",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Upload Original Image to imgbb": {
      "main": [
        [
          {
            "node": "Gemini 2.5 Flash - Generate Image 2",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gemini 2.5 Flash - Generate Image 3",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gemini 2.5 Flash - Generate Image 4",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gemini 2.5 Flash - Generate Image 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.5 Flash - Generate Image 2": {
      "main": [
        [
          {
            "node": "Separate Image Outputs 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.5 Flash - Generate Image 3": {
      "main": [
        [
          {
            "node": "Separate Image Outputs 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.5 Flash - Generate Image 4": {
      "main": [
        [
          {
            "node": "Separate Image Outputs 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Gemini 2.5 Flash - Generate Image 5": {
      "main": [
        [
          {
            "node": "Separate Image Outputs 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}