{
  "id": "OGnTnfFq2fjXQchR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Instagram Carousel Post with Blotato + Gpt 4.1",
  "tags": [],
  "nodes": [
    {
      "id": "b5cad4b8-c263-4b98-8998-dd2365e2a92f",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2544,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 368,
        "height": 272,
        "content": "# Post Instagram"
      },
      "typeVersion": 1
    },
    {
      "id": "5c7e311a-144c-4c28-a710-31f46d99c240",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 976,
        "height": 564,
        "content": "# Create Instagram Carousel via ChatGPT & Blotato"
      },
      "typeVersion": 1
    },
    {
      "id": "544eb9d9-348a-42a8-9b8a-d04849e85802",
      "name": "Instagram [BLOTATO]",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "onError": "continueErrorOutput",
      "maxTries": 2,
      "position": [
        2672,
        80
      ],
      "parameters": {
        "options": {},
        "accountId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "postContentText": "={{ $('AI Agent Carousel Maker').item.json.output.caption }}",
        "postContentMediaUrls": "={{ $('Get carousel').item.json.item.imageUrls.map(url => url) }}\n"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "retryOnFail": true,
      "typeVersion": 2,
      "waitBetweenTries": 5000
    },
    {
      "id": "caf985d7-e625-4d7d-8849-3f03ca94ab54",
      "name": "Get carousel",
      "type": "@blotato/n8n-nodes-blotato.blotato",
      "position": [
        2160,
        144
      ],
      "parameters": {
        "videoId": "={{ $json.output.id }}",
        "resource": "video",
        "operation": "get"
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "033bbb48-1143-4075-ac9f-055a6bea85ef",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        1968,
        160
      ],
      "parameters": {
        "unit": "minutes",
        "amount": 3
      },
      "typeVersion": 1.1,
      "alwaysOutputData": false
    },
    {
      "id": "748c99be-4b4d-42b8-a05c-1ea933d3eb7b",
      "name": "AI Agent Carousel Maker",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1248,
        160
      ],
      "parameters": {
        "text": "={{ $json.output }}",
        "options": {
          "systemMessage": "=# TASK\nYou are a direct-response copywriter specialized in short-form content like Alex Hormozi. \nYour task is to create an Instagram carousel that educates and grabs attention fast. \nThe first slide must always be a HOOK short, bold, and curiosity-driven.\nNext slides should deliver valuable insights related to the topic with simple, high-impact language.\nThe final slide should include a short CTA (example: \u201cFollow for more AI automation ideas\u201d).\n\n# STRUCTURE\nYou will output a list of carousel texts (each representing one slide). \nEach slide should have 1\u20132 short sentences only. DO NOT ADD THE TITLE INSIDE THE CONTENT\n\n# REQUIREMENTS\n\u2013 Use strong, emotional, or benefit-driven language.  \n\u2013 Avoid generic or vague ideas.  \n\u2013 It must be scroll-stopping, controversial, or create \u201cfear of missing out\u201d.  \n\u2013 Don\u2019t use quotation marks in your output.\n- Don't add the title inside content\n- Do not include the title or slide numbers inside the content.\n- No Emojis\n\n# STYLE\n- Humanize\n\u2013 Write like a founder who\u2019s confident and tactical.\n\u2013 Use bold, short, no-fluff lines.\n\u2013 Avoid hashtags or emojis unless they add emphasis.\n\u2013 Each carousel should feel like \u201cvalue + punchline\u201d.\n\n# OUTPUT\nYou SHOULD always output the following format, where `id` contains the video id returned by the tool call. Leave `id` as an empty string \"\" if you did not make a carousel:\n\nAlways respond in the following structured JSON:\n{\n\t\"output\": \"Output from AI\",\n        \"caption\": \"Long carousel caption, explain each tools detaily\",\n        \"title\": \"Short carousel title, 8 words max\",\n\t\"id\": \"\"\n}"
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "f602a797-2e83-44ce-b8ea-ec6d76b58ad3",
      "name": "Simple tweet cards monocolor",
      "type": "@blotato/n8n-nodes-blotato.blotatoTool",
      "position": [
        1440,
        384
      ],
      "parameters": {
        "resource": "video",
        "templateId": {
          "__rl": true,
          "mode": "list",
          "value": "/base/v2/tweet-card/ba413be6-a840-4e60-8fd6-0066d3b427df/v1",
          "cachedResultName": "Twitter/X style quote cards with minimal style"
        },
        "templateInputs": {
          "value": {
            "theme": "dark",
            "handle": "Marth",
            "quotes": "={{ $fromAI('Quotes__e_g____item_1____item_2___', ``, 'string').split(/\\n|\\|/).map(s => s.trim()).filter(Boolean) }}",
            "verified": true,
            "authorName": "Marthe ",
            "aspectRatio": "4:5",
            "profileImage": "https://media.licdn.com/dms/image/v2/D4D03AQG_IUb08UaJxQ/profile-displayphoto-shrink_800_800/B4DZZoORRbGgAg-/0/1745505294351?e=1762992000&v=beta&t=ly4ze3F2Kp2Jewg8zHA9cl-um7bV8TT_GHteCbnpxMw"
          },
          "schema": [
            {
              "id": "quotes",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Quotes (e.g. [\"item 1\", \"item 2\"])",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "authorName",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "handle",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Social Media Handle",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "profileImage",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Profile Photo URL (publicly accessible URL)",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "verified",
              "type": "boolean",
              "display": true,
              "required": false,
              "displayName": "Show Verified Badge",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "theme",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "Dark",
                  "value": "dark"
                },
                {
                  "name": "Light",
                  "value": "light"
                }
              ],
              "removed": false,
              "required": false,
              "displayName": "Theme",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            },
            {
              "id": "aspectRatio",
              "type": "options",
              "display": true,
              "options": [
                {
                  "name": "4:5",
                  "value": "4:5"
                },
                {
                  "name": "1:1",
                  "value": "1:1"
                },
                {
                  "name": "9:16",
                  "value": "9:16"
                }
              ],
              "required": false,
              "displayName": "Aspect Ratio",
              "defaultMatch": false,
              "canBeUsedToMatch": false
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        }
      },
      "credentials": {
        "blotatoApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "6790044a-6a38-488a-8a08-0d5fb3515115",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        0
      ],
      "parameters": {
        "color": 3,
        "width": 624,
        "height": 436,
        "content": "# Get Instagram Carousel\n\n- "
      },
      "typeVersion": 1
    },
    {
      "id": "d7e5ff7e-9242-4fe1-86f2-5db8ca102e1c",
      "name": "If carousel ready",
      "type": "n8n-nodes-base.if",
      "position": [
        2336,
        144
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e511deb8-8e4c-45db-aa35-18f43a0552b6",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Get carousel').item.json.item.status }}",
              "rightValue": "done"
            }
          ]
        },
        "looseTypeValidation": true
      },
      "typeVersion": 2.2
    },
    {
      "id": "63f32450-86dd-4f49-992f-b203552b4569",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        0
      ],
      "parameters": {
        "color": 5,
        "width": 848,
        "height": 404,
        "content": "# Topic"
      },
      "typeVersion": 1
    },
    {
      "id": "a3a667c4-ec35-4232-8ed4-24e82fd2b329",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1616,
        384
      ],
      "parameters": {
        "jsonSchemaExample": "{\n\t\"output\": \"Output from AI\",\n        \"caption\": \"Long carousel caption, explain each detaily with list format\",\n        \"title\": \"Short carousel title, 8 words max\",\n\t\"id\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "286cd2c1-f3c7-40c4-9412-1f55bbd51235",
      "name": "Topic",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        160
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "410749fa-a689-477d-80fd-17891e1e9ba0",
              "name": "topic",
              "type": "string",
              "value": "=Top ai tools for finance"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "0b9baedd-475a-49b7-886f-0894181730e5",
      "name": "OpenAI Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1232,
        384
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d421fa21-b1d5-41fb-999c-af943fa5a3f1",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        80,
        160
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "af73bc8b-3dcb-4947-8a5c-7d8574b85d75",
      "name": "Topic1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        528,
        160
      ],
      "parameters": {
        "text": "={{ $json.topic }}",
        "options": {
          "systemMessage": "=# ROLE\nYou are a direct-response copywriter who writes viral short hooks for social media carousels, like Alex Hormozi and Dan Koe.\n\n# TASK\nYour job is to generate 1 short, powerful topic idea for an Instagram carousel.  \nIt must sound like a statement or bold claim that immediately grabs attention and curiosity.  \n\n# REQUIREMENTS\n\u2013 Maximum 6 words.\n\u2013 Use strong, emotional, or benefit-driven language.  \n\u2013 Avoid generic or vague ideas.  \n\u2013 It must be scroll-stopping, controversial, or create \u201cfear of missing out\u201d.  \n\u2013 Don\u2019t use quotation marks in your output.\n\n# EXAMPLES\n\"Top 5 AI to double your sales\",  \n\"Stop hiring customer service, this AI works 10x faster\",  \n\"Why your business will die without automation\",  \n\"How one AI replaces your full marketing team\",  \n\"This workflow saved me 20 hours weekly\"\n\n# OUTPUT\nOnly output the topic line, nothing else.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "fbf7238e-94c4-44f3-aa43-2a921f613514",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1888,
        624
      ],
      "parameters": {
        "width": 1232,
        "height": 800,
        "content": "@[youtube](5P_4QnRLYEQ)"
      },
      "typeVersion": 1
    },
    {
      "id": "d480621a-1eb4-4fdf-99a9-7da2eb2bfc22",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        624
      ],
      "parameters": {
        "color": 4,
        "width": 1824,
        "height": 1536,
        "content": "# n8n Workflow Note: Automated Instagram Carousel Post (Blotato + GPT-4.1)\n\n## \ud83c\udfaf Problem\n\nCreating engaging and structured visual content, such as an **Instagram Carousel**, requires significant time and manual effort for:\n1.  Finding appealing ideas or topics that act as a **viral hook**.\n2.  Creating text for each slide with a consistent, punchy, and **engaging style**.\n3.  Manually designing the graphics for every slide.\n4.  Writing detailed captions and an effective **Call-to-Action (CTA)**.\n5.  The manual process of posting the content to social media.\n\n## \ud83d\udca1 Solution\n\nAutomate the entire **Instagram Carousel** creation and posting process using a combination of **n8n, an AI Agent (GPT-4.1),** and **Blotato** as the visual creation tool.\n\nThis workflow automatically performs the following steps:\n1.  Generates a **scroll-stopping topic idea** from the initial input topic.\n2.  Uses the **AI Agent** (acting as an Alex Hormozi/Dan Koe-style copywriter) to create the multi-slide content (text, caption, and title).\n3.  Sends the generated text to **Blotato** to automatically render a series of Carousel images.\n4.  Waits for the images to be completed.\n5.  Automatically posts the final Carousel and its accompanying caption to Instagram using the **Blotato** Instagram node.\n\n## \ud83d\udd2d Scope\n\nThis workflow covers:\n* **Input/Trigger:** A recurring schedule set by the **Schedule Trigger** node.\n* **Idea Generation:** Generates a captivating title and content hook using a **LangChain Agent** with OpenAI.\n* **Text Content Creation:** Generates text for each slide, the carousel title, and a long, detailed caption.\n* **Visual Creation:** Uses the **Blotato Tool** (\"Simple tweet cards monocolor\") to render the text into a series of Carousel images (set to the **4:5** aspect ratio).\n* **Status Check:** Employs the **Wait** and **If** nodes to ensure the Carousel images in Blotato have a status of `done` before proceeding to post.\n* **Posting:** Automatic posting to the connected Instagram account via the **Blotato** Instagram node.\n\n## \ud83d\udc64 For Who\n\nThis workflow is perfect for:\n* **Social Media Managers** or **Content Creators** who need to consistently increase the volume of high-quality, high-impact visual content.\n* **Small and Medium Enterprises (SMEs)**, especially those in *Coaching, Consulting, Digital Marketing,* or *SaaS* that rely on fast, educational, or inspirational content.\n* **AI Agent Developers** (like yourself) looking to build and demonstrate a powerful, end-to-end marketing content automation solution with n8n.\n\n## \ud83d\udee0\ufe0f How to Set Up\n\nTo successfully run this workflow, you need valid credentials and specific configurations in several nodes:\n\n## 1. Credentials\n\nEnsure you have valid credentials set up in n8n for:\n* **OpenAI API:** To connect to the **OpenAI Chat Model** node (required by both AI Agents).\n* **Blotato API:** To connect to all **Blotato** nodes (`Simple tweet cards monocolor`, `Get carousel`, `Instagram [BLOTATO]`).\n\n## 2. Key Node Configuration\n\n| Node | Parameter to Note | Note |\n| :--- | :--- | :--- |\n| **Schedule Trigger** | `Rule` | Set the desired posting frequency (e.g., daily, weekly). |\n| **Topic** | `topic` | Replace the current expression value `\"=Top ai tools for finance\"` with your default or desired initial topic. |\n| **OpenAI Chat Model** | `Model` | Currently set to `gpt-4.1-mini`. Adjust this to another model (e.g., `gpt-4o` or `gpt-3.5-turbo`) based on your performance and cost requirements. |\n| **AI Agent Carousel Maker** | `System Message` | Review and adjust the **# STRUCTURE**, **# REQUIREMENTS**, and **# STYLE** sections in the AI Agent's *System Message* if you need to refine the persona, writing style, or output format. |\n| **Simple tweet cards monocolor (Blotato Tool)**| `templateInputs` | Adjust `authorName`, `handle`, and `profileImage` to match your brand's or personal account details for personalized visuals. |\n| **Wait** | `Amount` & `Unit` | The current wait time is set to **3 minutes** to allow Blotato to finish rendering the Carousel. Adjust only if you observe rendering times are consistently faster or slower. |\n| **Instagram [BLOTATO]** | `accountId` | Select the specific Instagram account that is connected via your Blotato credentials. |"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1c1edaf6-8732-495e-bdae-68ac6ffc5062",
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get carousel",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Topic": {
      "main": [
        [
          {
            "node": "Topic1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Topic1": {
      "main": [
        [
          {
            "node": "AI Agent Carousel Maker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get carousel": {
      "main": [
        [
          {
            "node": "If carousel ready",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Topic",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If carousel ready": {
      "main": [
        [
          {
            "node": "Instagram [BLOTATO]",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent Carousel Maker",
            "type": "ai_languageModel",
            "index": 0
          },
          {
            "node": "Topic1",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "AI Agent Carousel Maker": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "AI Agent Carousel Maker",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Simple tweet cards monocolor": {
      "ai_tool": [
        [
          {
            "node": "AI Agent Carousel Maker",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    }
  }
}