This workflow corresponds to n8n.io template #8877 — we link there as the canonical source.
This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "bNHiwT9BNrjMkzdk",
"name": "Carousel Image and Caption Generation on Autopilot",
"tags": [],
"nodes": [
{
"id": "48b0ce74-8bc9-45da-9b26-43e2934d8147",
"name": "When chat message received",
"type": "@n8n/n8n-nodes-langchain.chatTrigger",
"position": [
1184,
336
],
"parameters": {
"options": {}
},
"typeVersion": 1.3
},
{
"id": "5a177da7-f5f3-4a61-8919-41067a450d9d",
"name": "Image Prompt Generator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1584,
336
],
"parameters": {
"text": "={{ $json['IG Idea'] }}",
"options": {
"systemMessage": "=You are an expert Viral Instagram Carousel creator. Your role is to create carousel image prompt for Nano Banana. You'll receive a user prompt to give you the topic/ideas for the carousel.\n\nHere's the framework that you should use in coming up with the content:\nViral 5-Framework Carousel (Automation Demo)\nSlide 1 \u2014 Hook (Stop the Scroll)\n\nBig, bold, curiosity-driven opener.\n\ud83d\udc49 \u201cStop wasting hours making Instagram posts \ud83d\udc47\u201d\n\nSlide 2 \u2014 Problem (Pain Point)\n\nCall out the frustration that everyone feels.\n\ud83d\udc49 \u201cPosting daily feels impossible. You design\u2026 you write\u2026 and still barely grow.\u201d\n\nSlide 3 \u2014 Insight (The A-ha Moment)\n\nDrop the truth bomb about why carousels matter.\n\ud83d\udc49 \u201cCarousels get more saves + shares than any other format.\nMore saves \u2192 more reach \u2192 more chance to go viral.\u201d\n\nSlide 4 \u2014 Solution (Your Workflow Demo)\n\nShow your automation stack clearly.\n\ud83d\udc49 \u201cHere\u2019s how to post viral carousels on autopilot:\n1\ufe0f\u20e3 Create polished slides with NanoBanana\n2\ufe0f\u20e3 Format your post in n8n\n3\ufe0f\u20e3 Auto-post with Blotato\u201d\n\n(Visually show the workflow screenshots or arrows \u2192 to keep it swipe-worthy.)\n\nSlide 5 \u2014 CTA (Engagement Driver)\n\nEnd with a strong action.\n\ud83d\udc49 \u201cSave this workflow. Share it with a friend.\nAnd start going viral without the grind.\u201d\n\n##Rules\nReturn the 5 prompts as a JSON object with a field called \u2018prompts\u2019 that contains an array of the prompt strings.\n\nPrompt1 - Prompt to Nano Banana (Image 1)\n\nPrompt2 - Prompt to Nano Banana (Image 2)\n\nPrompt3 - Prompt to Nano Banana (Image 3)\n\nPrompt4 - Prompt to Nano Banana (Image 4)\n\nPrompt5 - Prompt to Nano Banana (Image 5)\n\n\n## Example:\n\nImage 1\n\nPrompt to NanoBanana:\n\u201cMinimalist bold Instagram carousel cover, dark background with neon accent, eye-catching text space, viral growth theme.\u201d\n\nImage 1 Text (Header & Subheader):\nHeader: Stop Wasting Hours on IG Posts\nSubheader: Here\u2019s how to go viral without the grind \ud83d\ude80\n\nImage 2\n\nPrompt to NanoBanana:\n\u201cFrustrated person at laptop surrounded by messy drafts and notes, cartoon style, editable blank space for text overlay.\u201d\n\nImage 2 Text:\nHeader: The Problem\nSubheader: Posting daily feels impossible. You design, you write\u2026 and growth stays flat.\n\nImage 3\n\nPrompt to NanoBanana:\n\u201cInfographic-style design showing upward trending arrow with Instagram logo, colorful and clean, strong highlight space for text.\u201d\n\nImage 3 Text:\nHeader: The A-Ha Moment\nSubheader: Carousels = saves + shares \u2192 algorithm boost \u2192 viral potential\n\nImage 4\n\nPrompt to NanoBanana:\n\u201cAutomation workflow concept \u2014 arrows connecting AI brain \u2192 workflow nodes \u2192 Instagram app logo, sleek tech aesthetic.\u201d\n\nImage 4 Text:\nHeader: The Solution\nSubheader: NanoBanana + n8n + Blotato = Viral Carousels on Autopilot\n\nImage 5\n\nPrompt to NanoBanana:\n\u201cBright clean design with Instagram \u2018save\u2019 and \u2018share\u2019 icons, motivational style, bold colors, clear CTA space.\u201d\n\nImage 5 Text:\nHeader: Your Turn\nSubheader: Save this, share it, and start posting smarter.\n\nInstagram Carousel Caption:\n\n\u2728 Carousels are the #1 way to grow on Instagram in 2025.\nThe problem? They take HOURS to design and post consistently.\n\nHere\u2019s the 3-step automation workflow I use to stay consistent without burning out:\n1\ufe0f\u20e3 Generate on-brand images in seconds with NanoBanana\n2\ufe0f\u20e3 Automate formatting and scheduling with n8n\n3\ufe0f\u20e3 Auto-post to Instagram using Blotato\n\nThe result \u2192 More saves, more shares, more growth \ud83d\ude80\n\n\ud83d\udca1 Steal this workflow and never miss a post again.\n\ud83d\udc49 Save this carousel if you want to try it."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2.2
},
{
"id": "0e999f90-7724-4d59-a580-7df83412db2e",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1440,
544
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "gpt-5"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "c76aaa98-8541-416f-b6ed-f138533c8d04",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1760,
544
],
"parameters": {
"jsonSchemaExample": "={\n \"prompts\": [\n \"{{prompt1}}\",\n \"{{prompt2}}\",\n \"{{prompt3}}\",\n \"{{prompt4}}\",\n \"{{prompt5}}\"\n ]\n}"
},
"typeVersion": 1.3
},
{
"id": "aac4d1a8-d92b-4501-975f-5735b7bc52a9",
"name": "Split Out",
"type": "n8n-nodes-base.splitOut",
"position": [
1920,
336
],
"parameters": {
"options": {},
"fieldToSplitOut": "output.prompts"
},
"typeVersion": 1
},
{
"id": "2ed18706-cd8d-4c7e-ab68-a8090ed83a47",
"name": "Nano Banana",
"type": "n8n-nodes-base.httpRequest",
"position": [
2128,
336
],
"parameters": {
"url": "https://api.wavespeed.ai/api/v3/google/nano-banana/text-to-image",
"method": "POST",
"options": {
"redirect": {
"redirect": {}
}
},
"sendBody": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "enable_base64_output",
"value": "false"
},
{
"name": "enable_sync_mode",
"value": "false"
},
{
"name": "output_format",
"value": "png"
},
{
"name": "prompt",
"value": "={{ $json['output.prompts'] }}"
}
]
},
"genericAuthType": "httpHeaderAuth"
},
"typeVersion": 4.2
},
{
"id": "adfc2d98-bdd3-4bb6-be93-c63e49961c55",
"name": "Get Nano Banana Image Result",
"type": "n8n-nodes-base.httpRequest",
"position": [
2544,
336
],
"parameters": {
"url": "=https://api.wavespeed.ai/api/v3/predictions/{{ $json.data.id }}/result",
"options": {
"redirect": {
"redirect": {}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"typeVersion": 4.2
},
{
"id": "9741492a-907f-4122-810a-7315990ff766",
"name": "Upload media",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
2752,
336
],
"parameters": {},
"typeVersion": 2
},
{
"id": "c7bedaa8-7a78-4696-be6f-4b90c602204a",
"name": "Code",
"type": "n8n-nodes-base.code",
"position": [
2912,
432
],
"parameters": {
"jsCode": "// Combine all 'url' fields from incoming items into a single array\nreturn [\n {\n json: {\n urls: items.map(item => item.json.url)\n }\n }\n];"
},
"typeVersion": 2
},
{
"id": "a4fb8b80-2fe1-4302-be38-c3f3ab21b792",
"name": "Append row in sheet",
"type": "n8n-nodes-base.googleSheets",
"position": [
3072,
432
],
"parameters": {
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": ""
},
"documentId": {
"__rl": true,
"mode": "list",
"value": ""
}
},
"typeVersion": 4.7
},
{
"id": "d4e55d7e-f4b5-42da-a1bc-a798061672a1",
"name": "Caption Generator",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
2192,
624
],
"parameters": {
"modelId": {
"__rl": true,
"mode": "list",
"value": "gpt-5",
"cachedResultName": "GPT-5"
},
"options": {},
"messages": {
"values": [
{
"content": "=Prompt 1: {{ $json.output.prompts[0] }}\nPrompt 2: {{ $json.output.prompts[1] }}\nPrompt 3: {{ $json.output.prompts[2] }}\nPrompt 4: {{ $json.output.prompts[3] }}\nPrompt 5: {{ $json.output.prompts[4] }}"
},
{
"role": "system",
"content": "=You are an expert Instagram Caption Agent. You will receive a set of prompts that were used to generate Instagram carousel images. Based on these prompts, craft a compelling caption that is:\n\nHigh-Hook: Start with a strong, attention-grabbing opening line.\n\nSEO-Optimized: Naturally include relevant keywords that increase discoverability.\n\nEngaging: Encourage saves, shares, and comments through questions, CTAs, or relatable phrasing.\n\nPlatform-Ready: Use a concise, mobile-friendly writing style with line breaks for readability.\n\nHashtag-Savvy: Include a well-balanced mix of trending and niche hashtags (without overstuffing).\n\nThe final caption should feel natural, authentic, and designed to maximize reach and engagement on Instagram.\n\n##Rules\nOutput only post-ready Instagram Caption without any explanation."
}
]
}
},
"typeVersion": 1.8
},
{
"id": "92dd4526-38c2-47af-80f2-217c8c6d199b",
"name": "Post to Instagram",
"type": "@blotato/n8n-nodes-blotato.blotato",
"position": [
3600,
528
],
"parameters": {},
"typeVersion": 2
},
{
"id": "c23e4440-46ac-4311-96af-50fd12626b3a",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1056,
112
],
"parameters": {
"width": 288,
"height": 768,
"content": "Chat Trigger"
},
"typeVersion": 1
},
{
"id": "f3a957cb-d9f4-420c-b45e-c38c0c12f447",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1360,
112
],
"parameters": {
"color": 5,
"width": 528,
"height": 768,
"content": "Image Prompt Generation"
},
"typeVersion": 1
},
{
"id": "1809fb69-5aec-497f-8aa1-a43b484ab77f",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
1904,
112
],
"parameters": {
"color": 4,
"width": 784,
"height": 768,
"content": "Nano Banana & Caption Generator"
},
"typeVersion": 1
},
{
"id": "7040f1c7-a1c9-4979-b8f7-469a589a9383",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2704,
112
],
"parameters": {
"color": 2,
"width": 752,
"height": 768,
"content": "Upload to Blotato and Merge Image Urls with Caption"
},
"typeVersion": 1
},
{
"id": "b2c06678-9e16-4182-8320-0d2397336391",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3472,
112
],
"parameters": {
"color": 7,
"width": 352,
"height": 768,
"content": "Post To Instagram"
},
"typeVersion": 1
},
{
"id": "be034ed9-3d75-4bc8-a6d5-831c2244d64a",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
0
],
"parameters": {
"width": 928,
"height": 1344,
"content": "\ud83c\udfa8 Instagram Carousel & Caption Generator on Autopilot (GPT-5 + Nano Banana + Blotato + Google Sheets)\nDescription\n\nTurn your ideas into viral-ready Instagram carousels \u2014 automatically.\nThis workflow combines GPT-5, Google\u2019s Nano Banana, and Blotato to generate carousel images, craft engaging captions, log everything to Google Sheets, and even post directly to Instagram \u2014 all on autopilot.\n\nJust send your topic or idea, and the workflow will:\n\nCreate 5 visually consistent carousel prompts using a proven \u201cViral 5-Framework.\u201d\n\nGenerate high-quality images with Nano Banana.\n\nWrite an optimized caption with GPT-5.\n\nUpload images to Blotato, log them to Google Sheets, and post them automatically.\n\n\ud83d\udc49 Watch the full step-by-step tutorial on YouTube:\nhttps://youtu.be/id22R7iBTjo\n\n\ud83d\udca1 Use Wavespeed\u2019s Nano Banana via API\n\nHow It Works\n\nChat Trigger \u2013 Start the workflow by sending a chat message with your carousel topic or idea.\n\nImage Prompt Generator (GPT-5) \u2013 Generates 5 image prompts using the \u201cHook \u2192 Problem \u2192 Insight \u2192 Solution \u2192 CTA\u201d viral content framework.\n\nStructured Output Parser \u2013 Formats the output into a clean JSON array ready for downstream automation.\n\nNano Banana (via Wavespeed API) \u2013 Autogenerates high-quality visuals from each image prompt.\n\nWait + Retrieve Image Result \u2013 Waits for the render to complete, then fetches the image URLs.\n\nUpload to Blotato \u2013 Uploads all generated images to Blotato for hosting or scheduling.\n\nGoogle Sheets Log \u2013 Saves image URLs and timestamps for easy reference or reuse.\n\nCaption Generator (GPT-5) \u2013 Writes a high-hook, SEO-optimized Instagram caption based on the image prompts.\n\nMerge + Post to Instagram \u2013 Combines image URLs and caption, then auto-posts to your connected Instagram account.\n\nWhy You\u2019ll Love It\n\n\ud83d\ude80 Completely hands-off content creation \u2013 from idea to published post.\n\n\ud83e\udde0 Proven viral framework \u2013 automatically applies the \u201cViral 5-Framework\u201d for high engagement.\n\n\ud83c\udfa8 AI-generated visuals \u2013 crafted by Google\u2019s Nano Banana for brand-consistent aesthetics.\n\n\u270d\ufe0f AI-optimized captions \u2013 GPT-5 ensures your posts hook, rank, and convert.\n\n\ud83d\uddc2\ufe0f Content logging built-in \u2013 every post is stored automatically in Google Sheets.\n\n\ud83e\udd16 One-click scalability \u2013 turn this into a full social content engine in minutes.\n\nRequirements\n\nOpenAI API Key (for GPT-5)\n\nWavespeed API Key (Nano Banana)\n\nBlotato API Key for media uploads and Instagram posting\n\nGoogle Sheets OAuth Credentials for logging image URLs\n\nn8n Account (self-hosted or Cloud)"
},
"typeVersion": 1
},
{
"id": "70061d6b-0945-40a8-b442-8e8dddb663f1",
"name": "Wait For Render",
"type": "n8n-nodes-base.wait",
"position": [
2336,
336
],
"parameters": {
"amount": 60
},
"typeVersion": 1.1
},
{
"id": "a66fda7f-f98d-4db5-9d32-62f2589360fe",
"name": "Merge Caption + Images",
"type": "n8n-nodes-base.merge",
"position": [
3264,
528
],
"parameters": {
"mode": "combine",
"options": {},
"combineBy": "combineAll"
},
"typeVersion": 3.2
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "980c3abe-e5c6-4e52-ae51-d4472a2a767d",
"connections": {
"Code": {
"main": [
[
{
"node": "Append row in sheet",
"type": "main",
"index": 0
}
]
]
},
"Split Out": {
"main": [
[
{
"node": "Nano Banana",
"type": "main",
"index": 0
}
]
]
},
"Nano Banana": {
"main": [
[
{
"node": "Wait For Render",
"type": "main",
"index": 0
}
]
]
},
"Wait For Render": {
"main": [
[
{
"node": "Get Nano Banana Image Result",
"type": "main",
"index": 0
}
]
]
},
"Caption Generator": {
"main": [
[
{
"node": "Merge Caption + Images",
"type": "main",
"index": 1
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Image Prompt Generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Append row in sheet": {
"main": [
[
{
"node": "Merge Caption + Images",
"type": "main",
"index": 0
}
]
]
},
"Image Prompt Generator": {
"main": [
[
{
"node": "Split Out",
"type": "main",
"index": 0
},
{
"node": "Caption Generator",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Image Prompt Generator",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When chat message received": {
"main": [
[
{
"node": "Image Prompt Generator",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Watch the full step-by-step tutorial on YouTube: https://youtu.be/id22R7iBTjo
Source: https://n8n.io/workflows/8877/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
HDW Lead Geländewagen. Uses chatTrigger, lmChatOpenAi, memoryBufferWindow, outputParserStructured. Chat trigger; 92 nodes.
Who’s it for Creators who want to create faceless videos automatically, while keeping human oversight and quality control.
The Best Linkedin Posting System. Uses httpRequest, lmChatOpenAi, agent, chatTrigger. Chat trigger; 49 nodes.
Who is this workflow for? This workflow is designed for SEO analysts, content creators, marketing agencies, and developers who need to index a website and then interact with its content as if it were
This project is an automation workflow that generates a personalized resume and cover letter for each job listing. Generates an HTML resume from your data. Hosts it live on GitHub Pages. Converts it t