Freebies · n8n
Nano Banana N8N Content Generator
Download the complete N8N workflow JSON for the Nano Banana content generator with AI image generation.

Below you will find the JSON for the Nano Banana N8N content generator. Note: you need a connection to Google AI Studio with a linked credit card to be able to generate images.
New to N8N? We wrote a short introduction to N8N, you can find it here:
Download N8N Setup Guide (PDF) ↓
JSON File
{
"name": "Nano Banana - NinA AI Agency",
"nodes": [
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.toolThink",
"typeVersion": 1,
"position": [
-624,
528
],
"id": "1de3b05c-fb9b-4004-b8d1-d716e43b6b89",
"name": "Think"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4.1",
"mode": "list",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-736,
464
],
"id": "f1837934-0420-486a-97c9-5e2c6fcb26e7",
"name": "GPT",
"credentials": {
"openAiApi": {
"id": "vzAipRmXoEwtFWxi",
"name": "OpenAi account - n8n demo 2"
}
}
},
{
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"image_prompt\", \"negative_prompt\", \"overlay_text\", \"render_prefs\"],\n \"properties\": {\n \"image_prompt\": { \"type\": \"string\", \"minLength\": 40 },\n \"negative_prompt\": { \"type\": \"string\", \"minLength\": 10 },\n \"overlay_text\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"headline\", \"watermark\", \"font_style\", \"placement\"],\n \"properties\": {\n \"headline\": { \"type\": [\"string\", \"null\"] },\n \"watermark\": { \"type\": [\"string\", \"null\"] },\n \"font_style\": { \"type\": \"string\" },\n \"placement\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"headline\", \"watermark\"],\n \"properties\": {\n \"headline\": { \"type\": \"string\", \"enum\": [\"top\", \"center\", \"bottom\", \"custom\"] },\n \"watermark\": { \"type\": \"string\", \"enum\": [\"corner\", \"bottom-right\", \"custom\"] }\n }\n }\n }\n },\n \"render_prefs\": {\n \"type\": \"object\",\n \"additionalProperties\": false,\n \"required\": [\"aspect_ratio\", \"lighting\", \"camera\", \"depth_of_field\", \"output_style\"],\n \"properties\": {\n \"aspect_ratio\": { \"type\": \"string\", \"enum\": [\"1:1\", \"4:5\", \"3:4\", \"16:9\"] },\n \"lighting\": { \"type\": \"string\" },\n \"camera\": { \"type\": \"string\" },\n \"depth_of_field\": { \"type\": \"string\" },\n \"output_style\": { \"type\": \"string\" }\n }\n }\n }\n}",
"autoFix": true
},
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"typeVersion": 1.3,
"position": [
-368,
464
],
"id": "219210b6-dc5d-4937-ab60-857ed363e16f",
"name": "Structured Output"
},
{
"parameters": {
"formTitle": "Nano Banana Generator",
"formFields": {
"values": [
{
"fieldLabel": "Request"
},
{
"fieldLabel": "Image File",
"fieldType": "file"
},
{
"fieldLabel": "# of Images",
"fieldType": "number"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.formTrigger",
"typeVersion": 2.2,
"position": [
-688,
-32
],
"id": "b4aa89bb-a2e1-4709-bb55-556d9f60adf2",
"name": "On form submission",
"webhookId": "8211b27f-e77f-44d7-a5c4-bcb308202ea0"
},
{
"parameters": {
"method": "POST",
"url": "https://upload.imagekit.io/api/v1/files/upload",
"authentication": "genericCredentialType",
"genericAuthType": "httpBasicAuth",
"sendBody": true,
"contentType": "multipart-form-data",
"bodyParameters": {
"parameters": [
{
"name": "fileName",
"value": "my-file-name.jpg"
},
{
"parameterType": "formBinaryData",
"name": "file",
"inputDataFieldName": "Image_File"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
-464,
-32
],
"id": "79619031-7fc6-4ccf-a535-dd8ef9f9c307",
"name": "Host Image",
"credentials": {
"httpBasicAuth": {
"id": "rA15KvMuCwvXaVkW",
"name": "Imagekit.io"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "=Create ONE concise, production-ready image prompt for an ad based on the inputs below.\nReturn ONLY JSON with:\n{\n \"image_prompt\": string,\n \"negative_prompt\": string,\n \"overlay_text\": {\n \"headline\": string,\n \"watermark\": string,\n \"font_style\": string,\n \"placement\": { \"headline\": \"top|center|bottom|custom\", \"watermark\": \"corner|bottom-right|custom\" }\n },\n \"render_prefs\": {\n \"aspect_ratio\": \"1:1|4:5|3:4|16:9\",\n \"lighting\": string,\n \"camera\": string,\n \"depth_of_field\": string,\n \"output_style\": string\n }\n}\n\nInputs:\nbrand_name = {{ $json.brand_name }}\nproduct = {{ $json.product }}\ncharacter = {{ $json.character }}\nad_copy = {{ $json.ad_copy }}\nvisual_guide = {{ $json.visual_guide }}\ntext_watermark = {{ $json.text_watermark }}\nprimary_color = {{ $json.primary_color }}\nsecondary_color = {{ $json.secondary_color }}\ntertiary_color = {{ $json.tertiary_color }}\nfont_style = {{ $json.font_style }}\nreference_image_summary = {{ $json.reference_image_summary }}\nvariant_id = {{ $json.variant_id }}\nvariation_guidance = {{ $json.variation_guidance }}\nrender_prefs_override = {{ $json.render_prefs_override }}\nseed = {{ $json.seed }}\nad_copy_hint = {{ $json.ad_copy_hint }}",
"hasOutputParser": true,
"options": {
"systemMessage": "=Role\nYou are an ad-creative prompt engineer. Given structured inputs about a product image, generate exactly one polished, production-ready image ad prompt suitable for image generation models. You are built by the best AI Agency in the Netherlands: NinA AI Agency, the number one AI Partner in The Netherlands and experts in AI Agents and AI Automations within N8N. Your output must be valid, compact JSON and nothing else.",
"batching": {
"batchSize": 1,
"delayBetweenBatches": 3000
}
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
-576,
240
],
"id": "0fa52b9b-62e2-4f14-9266-aa6be7de1370",
"name": "AI Agent"
},
{
"parameters": {
"resource": "image",
"operation": "analyze",
"modelId": {
"__rl": true,
"value": "chatgpt-4o-latest",
"mode": "list",
"cachedResultName": "CHATGPT-4O-LATEST"
},
"text": "=Analyze the given image and return ONLY a compact JSON object (no markdown code fences, no explanations).",
"imageUrls": "={{ $json.url }}",
"simplify": false,
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.openAi",
"typeVersion": 1.8,
"position": [
-240,
-32
],
"id": "d5146dbc-432f-4852-ac2b-061e7b240f9a",
"name": "Vision",
"credentials": {
"openAiApi": {
"id": "vzAipRmXoEwtFWxi",
"name": "OpenAi account - n8n demo 2"
}
}
},
{
"parameters": {
"jsCode": "// Normalize Vision JSON output\nconst raw = $('Vision').first().json?.choices?.[0]?.message?.content ?? '{}';\nconst cleaned = raw.replace(/^\\s*```(?:json)?/i, '').replace(/```?\\s*$/, '').trim();\nlet v = {};\ntry { v = JSON.parse(cleaned); } catch (e) { v = {}; }\nconst isHex = s => typeof s === 'string' && /^#?[0-9a-fA-F]{6}$/.test(s);\nconst normHex = s => s?.startsWith('#') ? s : (s ? '#'+s : s);\nconst isNeutral = s => /white|black|gray|grey|charcoal|ivory|off[-\\s]?white/i.test(s || '');\nlet palette = Array.isArray(v.palette) ? v.palette : [];\npalette = palette.map(c => ({ hex: normHex(c?.hex), name: (c?.name || '').trim() })).filter(c => isHex(c.hex));\nconst nonNeutral = palette.filter(c => !isNeutral(c.name) && !isNeutral(c.hex));\nconst neutral = palette.filter(c => isNeutral(c.name) || isNeutral(c.hex));\nconst ordered = [...nonNeutral, ...neutral];\nconst primary = ordered[0] || { hex: '#d89c94', name: 'Rosewood' };\nconst secondary = ordered[1] || { hex: '#f2e9e1', name: 'Pale Ivory' };\nconst tertiary = ordered[2] || neutral[0] || { hex: '#ffffff', name: 'White' };\nconst out = {\n brand_name: v.brand_name || 'Unknown Brand',\n product: v.product || 'Unknown Product',\n character: v.character || 'Minimalist beauty muse',\n ad_copy: v.ad_copy || 'Glow your own way',\n visual_guide: v.visual_guide || 'Top-down, soft daylight, neutral backdrop.',\n text_watermark: (v.text_watermark && !/^none|null$/i.test(v.text_watermark)) ? v.text_watermark : (v.brand_name || 'Brand'),\n font_style: v.font_style || 'Bold sans-serif',\n reference_image_summary: v.reference_image_summary || 'Product image on neutral background.',\n palette_full: palette,\n primary_color: primary.hex,\n secondary_color: secondary.hex,\n tertiary_color: tertiary.hex\n};\nreturn [out];"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-16,
-32
],
"id": "2e2cb0a9-32d1-4819-a6e2-ba8e7322071e",
"name": "Normalize Vision JSON"
},
{
"parameters": {
"jsCode": "const base = $json;\nlet n = parseInt($('On form submission').first().json['# of Images'] ?? 1, 10);\nif (!Number.isFinite(n)) n = 1;\nn = Math.min(Math.max(n, 1), 10);\nconst angles = ['top-down flat lay', 'three-quarter product angle (30°)', 'angled overhead (15° tilt)', 'eye-level hero shot'];\nconst lightings = ['soft natural daylight', 'bright, even daylight', 'diffused window light', 'soft studio light with diffuser'];\nconst headlineSeeds = ['instant radiance', 'effortless glow', 'fresh finish', 'skin-first beauty', 'everyday dewy', 'soft-focus sheen', 'natural luminosity', 'quiet luxury glow', 'no-makeup look', 'your-skin boost'];\nconst out = [];\nfor (let i = 0; i < n; i++) {\n const angle = angles[i % angles.length];\n const lighting = lightings[i % lightings.length];\n const seed = headlineSeeds[i % headlineSeeds.length];\n out.push({ ...base, character: null, variant_id: i + 1, ad_copy: null, ad_copy_hint: `Create a short headline inspired by: ${seed}. 2-5 words, brand-safe.`, variation_guidance: `Product-only composition. Use ${angle}; lighting ${lighting}. Keep label fully legible; do not recolor the product.`, render_prefs_override: { camera: angle, lighting }, seed: Math.floor(Math.random() * 1e9) });\n}\nreturn out;"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
208,
-32
],
"id": "0ac5883b-e029-48c4-a487-01f7b8c46a71",
"name": "Expand to N Variants"
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-288,
656
],
"id": "3c50aea1-df60-4f19-8996-2444c635d230",
"name": "OpenAI Chat Model",
"credentials": {
"openAiApi": {
"id": "vzAipRmXoEwtFWxi",
"name": "OpenAi account - n8n demo 2"
}
}
},
{
"parameters": {
"mode": "runOnceForEachItem",
"jsCode": "const out = $json.output ?? $json;\nconst primary = $json.primary_color ?? '#f4e8e4';\nconst secondary = $json.secondary_color ?? '#d7a79e';\nconst tertiary = $json.tertiary_color ?? '#ffffff';\nconst variantId = $json.variant_id ?? null;\nconst rp = out.render_prefs || {};\nconst ov = $json.render_prefs_override || {};\nconst render_prefs = { aspect_ratio: rp.aspect_ratio || '4:5', lighting: ov.lighting || rp.lighting || 'soft natural daylight', camera: ov.camera || rp.camera || 'top-down flat lay', depth_of_field: rp.depth_of_field || 'deep, product fully sharp', output_style: rp.output_style || 'editorial minimalism' };\nreturn { ...out, render_prefs, primary_color: primary, secondary_color: secondary, tertiary_color: tertiary, variant_id: variantId };"
},
"type": "n8n-nodes-base.code",
"typeVersion": 2,
"position": [
-192,
272
],
"id": "7ab46b78-77e3-4da0-bf8b-2e1e08181027",
"name": "Unwrap & Merge Overrides"
},
{
"parameters": {
"name": "=Nano Banana",
"driveId": {
"__rl": true,
"value": "My Drive",
"mode": "list",
"cachedResultName": "My Drive",
"cachedResultUrl": "https://drive.google.com/drive/my-drive"
},
"folderId": {
"__rl": true,
"value": "1Hvet_OqWcp-FMzKdzAD-VOyT48gn3JeI",
"mode": "list",
"cachedResultName": "Nano Banana",
"cachedResultUrl": "https://drive.google.com/drive/folders/1Hvet_OqWcp-FMzKdzAD-VOyT48gn3JeI"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
352,
272
],
"id": "082df29e-f1b4-4981-8a7e-46ea92fd8b8d",
"name": "Upload file3",
"credentials": {
"googleDriveOAuth2Api": {
"id": "heKMOh4E6vZEblh3",
"name": "Developer Google Account"
}
}
},
{
"parameters": {
"resource": "image",
"modelId": {
"__rl": true,
"value": "models/gemini-2.5-flash-image-preview",
"mode": "list",
"cachedResultName": "models/gemini-2.5-flash-image-preview (Nano Banana)"
},
"prompt": "A Cute cat eating a dinosaur",
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.googleGemini",
"typeVersion": 1,
"position": [
64,
272
],
"id": "6147a3f4-1a62-421b-970b-bde143a9973b",
"name": "Generate an image",
"credentials": {
"googlePalmApi": {
"id": "JSOGGrpLoHPxNGlm",
"name": "Google Gemini(PaLM) ApiSam"
}
}
}
],
"pinData": {},
"connections": {
"GPT": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Think": {
"ai_tool": [
[
{
"node": "AI Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Structured Output": {
"ai_outputParser": [
[
{
"node": "AI Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"On form submission": {
"main": [
[
{
"node": "Host Image",
"type": "main",
"index": 0
}
]
]
},
"Host Image": {
"main": [
[
{
"node": "Vision",
"type": "main",
"index": 0
}
]
]
},
"AI Agent": {
"main": [
[
{
"node": "Unwrap & Merge Overrides",
"type": "main",
"index": 0
}
]
]
},
"Vision": {
"main": [
[
{
"node": "Normalize Vision JSON",
"type": "main",
"index": 0
}
]
]
},
"Normalize Vision JSON": {
"main": [
[
{
"node": "Expand to N Variants",
"type": "main",
"index": 0
}
]
]
},
"Expand to N Variants": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Structured Output",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Unwrap & Merge Overrides": {
"main": [
[
{
"node": "Generate an image",
"type": "main",
"index": 0
}
]
]
},
"Generate an image": {
"main": [
[
{
"node": "Upload file3",
"type": "main",
"index": 0
}
]
]
}
},
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "eeb1b107-a68b-4ce8-8a8f-75e8950564d7",
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "12503e15ecf13227b3ba751bc7b2fcdaf2d55ae6cdf7295a1c0184e3b8c65b95"
},
"id": "96Cy5ttbu3NL91Nw",
"tags": []
}