{
  "name": "Generate and publish Instagram carousels with Gemini and Google Slides",
  "nodes": [
    {
      "id": "5f4e7c74-2195-40a5-aeca-a4a98d952316",
      "name": "Structured Output Parser1",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1952,
        3072
      ]
    },
    {
      "id": "95fd7d65-0d6c-4c93-bcd0-c687d21051d4",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        3632,
        2848
      ]
    },
    {
      "id": "7b9c1803-a9d8-4c94-b06e-3f3637b681ca",
      "name": "⏰ Initial Processing Wait1",
      "type": "n8n-nodes-base.wait",
      "position": [
        5632,
        2880
      ]
    },
    {
      "id": "7748facc-ce7b-46f2-93c5-0406b24c4934",
      "name": "🔍 Check Processing Status2",
      "type": "n8n-nodes-base.set",
      "position": [
        5472,
        2880
      ]
    },
    {
      "id": "4675bcbe-47c9-4023-a474-77dbe2147f91",
      "name": "Container HTTP Carousel1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5296,
        2880
      ]
    },
    {
      "id": "9077f671-ea84-417e-ae2c-a9315bd78a8c",
      "name": "make a link",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        3296,
        2928
      ]
    },
    {
      "id": "a47f8723-2316-4eb9-8769-6021de0cbe53",
      "name": "get the imgs from slides",
      "type": "n8n-nodes-base.googleSlides",
      "position": [
        2992,
        2928
      ]
    },
    {
      "id": "bed59240-3d86-4bfb-b3a5-47d99cd9fe4e",
      "name": "convert",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        3152,
        2928
      ]
    },
    {
      "id": "8cbc2fbc-9a31-455f-a443-e1a821dbc449",
      "name": "add data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3792,
        2848
      ]
    },
    {
      "id": "720e6f9e-0e9d-4770-8535-e626f024636b",
      "name": "get data",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        3936,
        2848
      ]
    },
    {
      "id": "402d3673-c331-4896-89ff-4268323d93a7",
      "name": "get last row",
      "type": "n8n-nodes-base.code",
      "position": [
        4080,
        2848
      ]
    },
    {
      "id": "eea854f8-2fc6-4d1f-bf48-0acdd4f759f7",
      "name": "update status",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        6880,
        2880
      ]
    },
    {
      "id": "11d1684f-0455-42d5-a7ab-26a505d8ced0",
      "name": "publish",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        6672,
        2880
      ]
    },
    {
      "id": "f7294d41-45b4-4a4e-919e-33911c3bb5dc",
      "name": "Main Guide",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        2752
      ],
      "parameters": {
        "width": 418,
        "height": 531,
        "content": "## Generate and publish Instagram carousels automatically\n\n### How it works\n1. Generates carousel copy and slide structure using Gemini\n2. Creates slides in Google Slides and prepares images\n3. Upload"
      }
    },
    {
      "id": "60eb199c-757a-4771-ab21-47501cf798ce",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1728,
        2736
      ],
      "parameters": {
        "width": 437,
        "height": 496,
        "content": "## AI content generation\n• Generate carousel copy with Gemini\n• Parse structured slide output\n"
      }
    },
    {
      "id": "b6cf2a8c-1008-4095-a3ce-85710746a4df",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5872,
        2736
      ],
      "parameters": {
        "width": 622,
        "height": 512,
        "content": "## Publish status check\n• Verify publishing status\n• Retry until completed\n"
      }
    },
    {
      "id": "fb71d2be-98fd-4a91-b091-8663fcc5c29a",
      "name": "Run daily schedule",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        1568,
        2864
      ]
    },
    {
      "id": "ab37adde-39d7-4aac-9d58-10b09b59e6ed",
      "name": "Generate carousel content",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1776,
        2864
      ]
    },
    {
      "id": "f1d771b6-cb82-4448-8f96-371a9ed78eb8",
      "name": "Loop carousel slides",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        2832,
        2864
      ]
    },
    {
      "id": "d7cd4ba4-b754-4e20-9adb-1608d35114f0",
      "name": "Check publish status",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5952,
        2848
      ]
    },
    {
      "id": "bcf15032-4667-4270-9c58-21ab22de4d0e",
      "name": "Is carousel ready",
      "type": "n8n-nodes-base.if",
      "position": [
        6128,
        2848
      ]
    },
    {
      "id": "e2d4b41f-c5a4-484f-9c4d-6c6bbecc7eac",
      "name": "Retry publish check in 5 seconds",
      "type": "n8n-nodes-base.wait",
      "position": [
        6288,
        3008
      ]
    },
    {
      "id": "45a1703a-7c50-491a-bc93-8c696d22dd64",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1776,
        3072
      ]
    },
    {
      "id": "cb3e273e-f8d5-4abe-b494-962c2e477d48",
      "name": "Replace text in template",
      "type": "n8n-nodes-base.googleSlides",
      "position": [
        2368,
        2864
      ]
    },
    {
      "id": "5d92832d-14a2-4f5c-a891-21f3386a8a1d",
      "name": "Duplicate carousel template",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        2048,
        2864
      ]
    },
    {
      "id": "f5e985e9-e73d-440e-9e87-ae3d9e302e8d",
      "name": "Get slides (carousels)",
      "type": "n8n-nodes-base.googleSlides",
      "position": [
        2576,
        2864
      ]
    },
    {
      "id": "b3db67a4-e32d-44bf-a551-78251a350f4d",
      "name": "slide 2",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4608,
        2880
      ]
    },
    {
      "id": "be713ec5-d3b4-4f3f-8fa0-3c42236bcee2",
      "name": "slide 3",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4736,
        2880
      ]
    },
    {
      "id": "7de1c6c4-be2c-4b10-a92c-51dd6ba34a4f",
      "name": "slide 4",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4864,
        2880
      ]
    },
    {
      "id": "91e417ca-d805-4da9-9ec8-b8f477f85d8e",
      "name": "slide 5",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4992,
        2880
      ]
    },
    {
      "id": "6c776736-7fcf-4591-8952-561418906938",
      "name": "slide 6",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        5120,
        2880
      ]
    },
    {
      "id": "6b9520d2-a89c-4e56-b134-179e28414a26",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2304,
        2736
      ],
      "parameters": {
        "width": 1173,
        "height": 416,
        "content": "## Slide creation\n• Populate a Google Slides template with generated carousel content\n• Extract slide thumbnails and convert them into image files\n• Prepare slide images for upload and publishing\n"
      }
    },
    {
      "id": "1a597ee8-0c56-4710-b197-aab2fafe73e0",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3584,
        2736
      ],
      "parameters": {
        "width": 629,
        "height": 304,
        "content": "## Data preparation\n• Aggregate carousel metadata\n• Store slide and post data\n"
      }
    },
    {
      "id": "5d6530d4-d0eb-483e-a7bf-a0c72eb9aa69",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4384,
        2736
      ],
      "parameters": {
        "width": 1397,
        "height": 336,
        "content": "## Upload images to a container\n• Upload each carousel slide to Meta as a media item\n• Combine slides into a single carousel container\n• Wait until Meta finishes processing media\n"
      }
    },
    {
      "id": "b406a349-7fe6-4931-91d9-809672e92ffa",
      "name": "slide 1",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        4448,
        2880
      ]
    },
    {
      "id": "8ee75994-2181-426f-b612-85376ec96c0d",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6576,
        2736
      ],
      "parameters": {
        "width": 622,
        "height": 304,
        "content": "## Publish and update status\n• Publish the carousel to Instagram\n• Update publishing status in Google Sheets\n• Track successful and failed posts\n"
      }
    }
  ],
  "connections": {
    "convert": {
      "main": [
        [
          {
            "node": "make a link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "publish": {
      "main": [
        [
          {
            "node": "update status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 1": {
      "main": [
        [
          {
            "node": "slide 2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 2": {
      "main": [
        [
          {
            "node": "slide 3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 3": {
      "main": [
        [
          {
            "node": "slide 4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 4": {
      "main": [
        [
          {
            "node": "slide 5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 5": {
      "main": [
        [
          {
            "node": "slide 6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "slide 6": {
      "main": [
        [
          {
            "node": "Container HTTP Carousel1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "add data": {
      "main": [
        [
          {
            "node": "get data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get data": {
      "main": [
        [
          {
            "node": "get last row",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Aggregate": {
      "main": [
        [
          {
            "node": "add data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "make a link": {
      "main": [
        [
          {
            "node": "Loop carousel slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get last row": {
      "main": [
        [
          {
            "node": "slide 1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is carousel ready": {
      "main": [
        [
          {
            "node": "publish",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Retry publish check in 5 seconds",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run daily schedule": {
      "main": [
        [
          {
            "node": "Generate carousel content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check publish status": {
      "main": [
        [
          {
            "node": "Is carousel ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop carousel slides": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "get the imgs from slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get slides (carousels)": {
      "main": [
        [
          {
            "node": "Loop carousel slides",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Container HTTP Carousel1": {
      "main": [
        [
          {
            "node": "🔍 Check Processing Status2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Replace text in template": {
      "main": [
        [
          {
            "node": "Get slides (carousels)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "get the imgs from slides": {
      "main": [
        [
          {
            "node": "convert",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate carousel content": {
      "main": [
        [
          {
            "node": "Duplicate carousel template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate carousel content",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser1": {
      "ai_outputParser": [
        [
          {
            "node": "Generate carousel content",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Duplicate carousel template": {
      "main": [
        [
          {
            "node": "Replace text in template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "⏰ Initial Processing Wait1": {
      "main": [
        [
          {
            "node": "Check publish status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 Check Processing Status2": {
      "main": [
        [
          {
            "node": "⏰ Initial Processing Wait1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Retry publish check in 5 seconds": {
      "main": [
        [
          {
            "node": "Check publish status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}