{
  "name": "Generate LinkedIn carousel images from text with Mistral AI & S3 Storage",
  "nodes": [
    {
      "id": "dfc8e928-9d00-488a-95a4-053f9162e121",
      "name": "Mistral Cloud Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
      "position": [
        -688,
        560
      ]
    },
    {
      "id": "092210eb-16ab-4170-9b71-c4e583a154cb",
      "name": "S32",
      "type": "n8n-nodes-base.s3",
      "position": [
        672,
        0
      ]
    },
    {
      "id": "dc6e5379-94bb-401e-bfff-2a811ee74c92",
      "name": "AI Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -528,
        240
      ]
    },
    {
      "id": "3d38c797-3e57-4f7c-b058-4d79feda76f7",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -384,
        624
      ]
    },
    {
      "id": "bb457a7a-12db-4aa5-9eb2-fb3b4c283ea7",
      "name": "S3",
      "type": "n8n-nodes-base.s3",
      "position": [
        688,
        272
      ]
    },
    {
      "id": "265c513e-7676-4888-9dfe-3c89105728bb",
      "name": "S34",
      "type": "n8n-nodes-base.s3",
      "position": [
        688,
        848
      ]
    },
    {
      "id": "0f887d69-5511-4940-82ea-4986a568500e",
      "name": "S35",
      "type": "n8n-nodes-base.s3",
      "position": [
        688,
        544
      ]
    },
    {
      "id": "4499b279-35d4-441d-b861-a4fc82b2ff65",
      "name": "Edit Image3",
      "type": "n8n-nodes-base.editImage",
      "position": [
        480,
        544
      ]
    },
    {
      "id": "82e24636-fdbd-423d-9ae2-ca929950001f",
      "name": "When chat message received",
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "position": [
        -720,
        240
      ]
    },
    {
      "id": "eb1ffe83-86f8-445f-8800-542f8647ebcb",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1376,
        432
      ]
    },
    {
      "id": "3c914108-6208-4227-bafb-aa734758462f",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1680,
        320
      ],
      "parameters": {
        "width": null,
        "height": 288,
        "content": "## format for output"
      }
    },
    {
      "id": "10f73d89-cb0b-4dc3-8e22-947e11865320",
      "name": "Sticky Note17",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1088,
        240
      ],
      "parameters": {
        "width": 528,
        "height": 400,
        "content": "## Merge & Aggregate (Output)\nMerge collects all uploaded images. Aggregate builds the final message with markdown image embeds and download links. Final node returns one combined response to the user"
      }
    },
    {
      "id": "66402c28-11b1-45d9-95b1-2c8bf4a78860",
      "name": "Sticky Note18",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -240
      ],
      "parameters": {
        "width": 176,
        "height": 1296,
        "content": "## S3 Uploads\nUploads final images to `bucketname` bucket. Confirm public access or signed URLs. Filenames use `safeName` to avoid collisions.\n"
      }
    },
    {
      "id": "7d89a875-4669-4c7a-8bab-9695b88dfaf8",
      "name": "Sticky Note19",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        416,
        -240
      ],
      "parameters": {
        "width": 208,
        "height": 1024,
        "content": " ## Edit Image nodes\nRender title and subtext on templates using multiStep operations. Font size and position are set per template. Test with long and short titles to confirm line breaks.\n"
      }
    },
    {
      "id": "ea65b155-8dbc-4181-a9e1-065b5247b9a3",
      "name": "Sticky Note20",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -240
      ],
      "parameters": {
        "width": null,
        "height": 1312,
        "content": "## Image Templates (Google Drive)\nGoogle Drive nodes provide background templates. Replace cached fileIds with your template PNGs. Use 4 templates for 4 cards. Keep templates high-res and consistent a"
      }
    },
    {
      "id": "be169d36-c428-4f68-afbf-bd46463ab8ee",
      "name": "Sticky Note21",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -832,
        80
      ],
      "parameters": {
        "width": null,
        "height": 320,
        "content": "## Chat Trigger (Input)\nReceives user post. Custom CSS configures UI and allows file/template selection."
      }
    },
    {
      "id": "9f3627df-f50f-465f-9052-430676606cfe",
      "name": "Sticky Note22",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        80
      ],
      "parameters": {
        "width": 368,
        "height": 320,
        "content": "## AI Agent (Core)\nCleans input and returns three banner items as JSON: title1/subtext1, title2/subtext2, title3/subtext3. Titles must be short (≤5 words). Agent MUST return valid JSON for the output "
      }
    },
    {
      "id": "62ae92f2-bae7-4b93-8630-ff988fb2803c",
      "name": "Sticky Note23",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1376,
        48
      ],
      "parameters": {
        "width": 400,
        "height": 576,
        "content": "# Carousel Image Generator — Overview\n\n## How it works\nThis workflow turns a user post into a 3–4 slide carousel. The chat trigger accepts text. The AI Agent cleans input and returns 3 short title+sub"
      }
    },
    {
      "id": "d4967366-709d-4849-a751-6fefe828d616",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -464,
        496
      ],
      "parameters": {
        "width": null,
        "height": 256,
        "content": "## Structured Output Parser\nValidates AI JSON. If parser fails the agent will not produce safe fields."
      }
    },
    {
      "id": "325e40e0-a502-476a-9a2d-a95b2d9543b3",
      "name": "normalize title,name 1",
      "type": "n8n-nodes-base.set",
      "position": [
        0,
        0
      ]
    },
    {
      "id": "aa06261d-79a8-4ffe-bf61-d5cc0052dae6",
      "name": "normalize title,name 2",
      "type": "n8n-nodes-base.set",
      "position": [
        -16,
        272
      ]
    },
    {
      "id": "df23c6ac-41db-4351-9512-e0242af3be7a",
      "name": "normalize title,name 3",
      "type": "n8n-nodes-base.set",
      "position": [
        -16,
        544
      ]
    },
    {
      "id": "bfe2487f-4f47-41a5-a308-625845617d9b",
      "name": "normalize title,name 4",
      "type": "n8n-nodes-base.set",
      "position": [
        0,
        848
      ]
    },
    {
      "id": "b2a0231c-d8d6-4ce2-952c-e623b90c5ad7",
      "name": "Google Drive get image 1",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        224,
        0
      ]
    },
    {
      "id": "af5f51f0-30e4-45e8-9dfc-581f24da40cb",
      "name": "Google Drive (get image template)",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        224,
        272
      ]
    },
    {
      "id": "a42e63e1-305f-405e-a7f4-a822589e867e",
      "name": "Google Drive (get image template)3",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        224,
        544
      ]
    },
    {
      "id": "79c1618c-f84b-4ac3-8702-a45c95763375",
      "name": "Google Drive (get image template)4",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        224,
        848
      ]
    },
    {
      "id": "f8de24bd-bbcb-4044-8be5-7f34f46515ce",
      "name": "Edit Image 1",
      "type": "n8n-nodes-base.editImage",
      "position": [
        464,
        0
      ]
    },
    {
      "id": "6f02870b-4c92-47cc-894c-dbedfe3fe802",
      "name": "Edit Image2",
      "type": "n8n-nodes-base.editImage",
      "position": [
        480,
        272
      ]
    },
    {
      "id": "ab4e817b-aa6d-477d-baec-d0128c61caee",
      "name": "get s3 url image 1",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        0
      ]
    },
    {
      "id": "a606ef60-6bdf-4580-8be6-215e530a77a3",
      "name": "get s3 url image 2",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        272
      ]
    },
    {
      "id": "b74c88e4-5c90-4c8b-86a8-81498bc03da0",
      "name": "get s3 url image 3",
      "type": "n8n-nodes-base.set",
      "position": [
        896,
        544
      ]
    },
    {
      "id": "c8c8c909-cd5d-41c4-9cdd-b60a6e381bd6",
      "name": "get s3 url image 4",
      "type": "n8n-nodes-base.set",
      "position": [
        880,
        848
      ]
    },
    {
      "id": "f5d6b6bb-eb65-448e-b3e8-3e687458989b",
      "name": "Merge1",
      "type": "n8n-nodes-base.merge",
      "position": [
        1184,
        400
      ]
    },
    {
      "id": "692e7421-1470-4b37-b32d-c09505ad4a21",
      "name": "output format",
      "type": "n8n-nodes-base.set",
      "position": [
        1760,
        432
      ]
    },
    {
      "id": "d8155ed5-d9e7-4c5b-84d2-6e1478c922fc",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -912,
        864
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "![image](https://qpmrmtlfwlixlplwpllz.supabase.co/storage/v1/object/public/dbtdigi/Dbtnew4.png)\n\n\ntemplate example"
      }
    },
    {
      "id": "0f445086-97aa-4f70-92ca-739175ff773e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        864
      ],
      "parameters": {
        "width": null,
        "height": 400,
        "content": "![image](https://qpmrmtlfwlixlplwpllz.supabase.co/storage/v1/object/public/dbtdigi/Dbtnew2.png)\n\n\ntemplate example"
      }
    }
  ],
  "connections": {
    "S3": {
      "main": [
        [
          {
            "node": "get s3 url image 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "S32": {
      "main": [
        [
          {
            "node": "get s3 url image 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "S34": {
      "main": [
        [
          {
            "node": "get s3 url image 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "S35": {
      "main": [
        [
          {
            "node": "get s3 url image 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge1": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent": {
      "main": [
        [
          {
            "node": "normalize title,name 1",
            "type": "main",
            "index": 0
          },
          {
            "node": "normalize title,name 2",
            "type": "main",
            "index": 0
          },
          {
            "node": "normalize title,name 4",
            "type": "main",
            "index": 0
          },
          {
            "node": "normalize title,name 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "output format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Image2": {
      "main": [
        [
          {
            "node": "S3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Image3": {
      "main": [
        [
          {
            "node": "S35",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Image 1": {
      "main": [
        [
          {
            "node": "S32",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get s3 url image 1": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get s3 url image 2": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "get s3 url image 3": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "get s3 url image 4": {
      "main": [
        [
          {
            "node": "Merge1",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "normalize title,name 1": {
      "main": [
        [
          {
            "node": "Google Drive get image 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "normalize title,name 2": {
      "main": [
        [
          {
            "node": "Google Drive (get image template)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "normalize title,name 3": {
      "main": [
        [
          {
            "node": "Google Drive (get image template)3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "normalize title,name 4": {
      "main": [
        [
          {
            "node": "Google Drive (get image template)4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive get image 1": {
      "main": [
        [
          {
            "node": "Edit Image 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mistral Cloud Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive (get image template)": {
      "main": [
        [
          {
            "node": "Edit Image2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive (get image template)3": {
      "main": [
        [
          {
            "node": "Edit Image3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Drive (get image template)4": {
      "main": [
        [
          {
            "node": "S34",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}