This workflow corresponds to n8n.io template #8770 — we link there as the canonical source.
This workflow follows the Agent → Google Drive 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 →
{
"meta": {
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "a5ea313b-3448-49a4-8c96-288aa01d91c2",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-2640,
128
],
"parameters": {},
"typeVersion": 1
},
{
"id": "3564a008-4f03-4d29-a02e-53bee57ea6f6",
"name": "Mistral Cloud Chat Model4",
"type": "@n8n/n8n-nodes-langchain.lmChatMistralCloud",
"position": [
-1424,
480
],
"parameters": {
"model": "mistral-small-latest",
"options": {
"temperature": 0.9
}
},
"credentials": {
"mistralCloudApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "c1e94644-7133-48fe-b757-cd1093a0ff9a",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
-1184,
432
],
"parameters": {
"jsonSchemaExample": "{\n \"output\": {\n \"image_prompts\": [\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n }\n ],\n \"caption\": \"\",\n \"hashtags\": [\n \n ]\n }\n}\n"
},
"typeVersion": 1.2
},
{
"id": "91e20d0a-5d6e-4773-bb24-9ca0d805b673",
"name": "pollinations.ai",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-400,
32
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.prompt1 }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "bde171b6-70f7-481f-b30e-9edee1ffa1c4",
"name": "pollinations.ai2",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-400,
160
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.prompt2 }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "74bd22ee-f617-4e94-8cb6-5dd7e355d31e",
"name": "pollinations.ai3",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-384,
320
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.prompt3 }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "2d4d8669-b540-4608-aea0-1d5f40a72cd6",
"name": "pollinations.ai4",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-384,
464
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.prompt4 }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "3e8e1878-d37c-4873-947b-c4e6bfdd60eb",
"name": "pollinations.ai5",
"type": "n8n-nodes-base.httpRequest",
"onError": "continueErrorOutput",
"maxTries": 5,
"position": [
-384,
608
],
"parameters": {
"url": "=https://image.pollinations.ai/prompt/{{ $json.prompt5 }}",
"options": {}
},
"retryOnFail": true,
"typeVersion": 4.2
},
{
"id": "03d7ae13-ff9d-42d4-90d3-a9d031cbf56a",
"name": "Send as 1 merged file1",
"type": "n8n-nodes-base.code",
"position": [
528,
176
],
"parameters": {
"jsCode": "// Merge all incoming items (each with one binary photoX) into one item\nconst mergedItem = {\n json: {},\n binary: {}\n};\n\nfor (const item of items) {\n // Copy every binary field from each item into mergedItem.binary\n for (const [key, bin] of Object.entries(item.binary || {})) {\n mergedItem.binary[key] = bin;\n }\n}\n\n// Return a single-item array\nreturn [mergedItem];\n"
},
"typeVersion": 2
},
{
"id": "b5309ec2-dcb4-4780-9c8a-279cd4fe2a84",
"name": "Change name to photo 1",
"type": "n8n-nodes-base.code",
"position": [
0,
0
],
"parameters": {
"jsCode": "return items.map((item, index) => {\n // Grab the existing binary buffer under \"data\"\n const buffer = item.binary.data;\n // Build a new item with the renamed binary key\n return {\n json: item.json,\n binary: {\n // Rename to photo1, photo2, ...\n [`photo${index + 1}`]: buffer\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "7885edd1-1b0d-4625-ac48-0ba10f050edf",
"name": "Change name to photo 2",
"type": "n8n-nodes-base.code",
"position": [
0,
160
],
"parameters": {
"jsCode": "return items.map((item, index) => {\n // Grab the existing binary buffer under \"data\"\n const buffer = item.binary.data;\n // Build a new item with the renamed binary key\n return {\n json: item.json,\n binary: {\n // Rename to photo1, photo2, ...\n [`photo${index + 2}`]: buffer\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "d29bb3e1-9de2-4eec-a0a6-f3d691c3dab0",
"name": "Change name to photo 3",
"type": "n8n-nodes-base.code",
"position": [
0,
304
],
"parameters": {
"jsCode": "return items.map((item, index) => {\n // Grab the existing binary buffer under \"data\"\n const buffer = item.binary.data;\n // Build a new item with the renamed binary key\n return {\n json: item.json,\n binary: {\n // Rename to photo1, photo2, ...\n [`photo${index + 3}`]: buffer\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "d01dd384-bf08-467f-81ae-5cb4d84ed029",
"name": "Change name to photo 4",
"type": "n8n-nodes-base.code",
"position": [
0,
448
],
"parameters": {
"jsCode": "return items.map((item, index) => {\n // Grab the existing binary buffer under \"data\"\n const buffer = item.binary.data;\n // Build a new item with the renamed binary key\n return {\n json: item.json,\n binary: {\n // Rename to photo1, photo2, ...\n [`photo${index + 4}`]: buffer\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "b56007b9-cd49-425d-b36c-fe083eef4e57",
"name": "Change name to photo 5",
"type": "n8n-nodes-base.code",
"position": [
0,
592
],
"parameters": {
"jsCode": "return items.map((item, index) => {\n // Grab the existing binary buffer under \"data\"\n const buffer = item.binary.data;\n // Build a new item with the renamed binary key\n return {\n json: item.json,\n binary: {\n // Rename to photo1, photo2, ...\n [`photo${index + 5}`]: buffer\n }\n };\n});\n"
},
"typeVersion": 2
},
{
"id": "341d3e38-7706-47b1-aa7c-ee1e5793c8e3",
"name": "Campaign Goal generator",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1584,
208
],
"parameters": {
"text": "={{ $json.company }}",
"options": {
"systemMessage": "=You are an expert marketing strategiste who can creat great Carousels for social media \n\nuse data provide in user query \nTask: Produce two clear sections:\ngoals :{{ $json.campaign.focus }}\naudeince: {{ $json.campaign.success_metric }}\nkeyword :{{ $json.campaign.keywords }}\nsucess metric {{ $json.campaign.success_metric }}\n--- \n**Company Summary ** \n- Name \n- Mission \n- Vision \n- Core Values (bullet list) \n- Services (bullet list) \n- Tone & Voice \n- Key Keywords (comma-separated) \n- Proof Points (case studies + clients)\n\n--- \n**Campaign Goal Summary** \n- Primary Goal \n- Focus \n- Success Metric \n- Target Audience \n- Core Message (one sentence)\n"
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "10577fa8-9548-4f38-9751-32ba2acd48ab",
"name": "image prompt generator base on the goal",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-1216,
208
],
"parameters": {
"text": "={{ $json.output }}",
"options": {
"systemMessage": "Create 5 powerful image generation prompts that tell a clear, compelling story about our brand\u2019s AI capabilities \u2014 one visual at a time. The sequence should reflect transformation or progress, told entirely through visuals. use user message in each step planning\n\nOnly one of the five should include a strong caption.\nAlso include one shared hashtag block with 4\u20136 relevant and commonly used tags.\n\nUse simple language. Do not suggest content topics or fixed publishing days.\nOnly return:\n\n5 image generation prompts\n\n1 caption \n\n1 hashtag block\n\ngive output in json {\n \"output\": {\n \"image_prompts\": [\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n },\n {\n \"prompt\": \"\"\n }\n ],\n \"caption\": \"\",\n \"hashtags\": [\n \"\",\n \"\",\n \"\",\n \"\",\n \"\",\n \"\"\n ]\n }\n}\n"
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 2
},
{
"id": "b71a28a6-fb07-45ef-bd88-0a4823523718",
"name": "brand goals",
"type": "n8n-nodes-base.googleDrive",
"position": [
-2272,
224
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "",
"__regex": "https:\\/\\/(?:drive|docs)\\.google\\.com(?:\\/.*|)\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "52656d86-ec0f-4fee-9e38-5c471f94ac70",
"name": "brand profile",
"type": "n8n-nodes-base.googleDrive",
"position": [
-2272,
-16
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "url",
"value": "",
"__regex": "https:\\/\\/(?:drive|docs)\\.google\\.com(?:\\/.*|)\\/d\\/([0-9a-zA-Z\\-_]+)(?:\\/.*|)"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "6d845bac-de42-4d9f-b645-1ff7204c5a8b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2416,
-96
],
"parameters": {
"color": 5,
"width": 384,
"height": 496,
"content": "## Get brand profile and goal saved in google drive"
},
"typeVersion": 1
},
{
"id": "670201ca-cb2f-4a6a-9115-c2c39e5cb381",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1616,
80
],
"parameters": {
"color": 5,
"width": 320,
"height": 432,
"content": "## AI AGENT generated Campaign Goal"
},
"typeVersion": 1
},
{
"id": "8e8cf2b3-b661-4175-951e-53b1044f7fa5",
"name": "clean retrived data",
"type": "n8n-nodes-base.code",
"position": [
-1792,
192
],
"parameters": {
"jsCode": "const result = {\n summaries: [],\n company: {},\n campaign: {}\n};\n\nfor (const item of items) {\n const json = item.json;\n\n // 1. Handle summary + hashtags\n if (json.row_number && json[\"summary \"]) {\n const summaryText = JSON.parse(json[\"summary \"])?.text?.trim();\n result.summaries.push({\n summary_id: `trend_summary_${json.row_number}`,\n text: summaryText || \"\",\n hashtags: [],\n row_number: json.row_number\n });\n }\n\n // 2. Add hashtags to corresponding summary\n if (json.row_number && json[\"hastag \"]) {\n const tagList = JSON.parse(json[\"hastag \"]);\n const match = result.summaries.find(s => s.row_number === json.row_number);\n if (match) match.hashtags = tagList;\n }\n\n // 3. Capture company profile\n if (json.id === \"c182f59e-4819-4390-abc8-117b0a878abc\") {\n result.company = {\n name: json.name,\n mission: json.mission,\n vision: json.vision,\n values: json.values,\n services: json.services,\n contact: json.contact_details,\n social_links: json.social_links,\n location: json.location,\n tone: json.tone_of_voice,\n seo_keywords: json.seo_keywords,\n testimonials: json.testimonials,\n };\n }\n\n // 4. Capture campaign data\n if (json.company_id === \"c182f59e-4819-4390-abc8-117b0a878abc\" && json.campaign_goal) {\n result.campaign = {\n goal: json.campaign_goal,\n focus: json.focus,\n success_metric: json.success_metric,\n target_audience: json.target_audience,\n customer_base: json.customer_base,\n keywords: json.keywords,\n company_name: json.name\n };\n }\n}\n\n// Optional: remove row_number after matching\nfor (const s of result.summaries) {\n delete s.row_number;\n}\n\nreturn [\n {\n json: result\n }\n];\n"
},
"typeVersion": 2
},
{
"id": "f19f78ca-0324-4afd-ad49-de461003855d",
"name": "Merge profile and goals",
"type": "n8n-nodes-base.merge",
"position": [
-2000,
192
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "4ad7d858-c0f8-4b1e-947c-0497a4235a58",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1232,
80
],
"parameters": {
"color": 5,
"width": 320,
"height": 432,
"content": "## AI AGENT generated prompt for image generation"
},
"typeVersion": 1
},
{
"id": "e3b98360-2cee-4d62-899f-cb9c9656a2fc",
"name": "separate each Prompts",
"type": "n8n-nodes-base.set",
"position": [
-864,
224
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "b70f1cfd-d12e-469d-864d-0034860cd00e",
"name": "prompt1",
"type": "string",
"value": "={{ $json.output.image_prompts[0].prompt }}"
},
{
"id": "4d7f371c-e8f9-4941-a322-153607d01938",
"name": "prompt2",
"type": "string",
"value": "={{ $json.output.image_prompts[1].prompt }}"
},
{
"id": "55f99acf-7f3c-4c8d-b674-2b90c0760893",
"name": "prompt3",
"type": "string",
"value": "={{ $json.output.image_prompts[2].prompt }}"
},
{
"id": "4b14808a-d512-4b47-9008-573e092996e4",
"name": "prompt4",
"type": "string",
"value": "={{ $json.output.image_prompts[3].prompt }}"
},
{
"id": "435b6cfb-6d4b-42e7-afd4-8f387698eec1",
"name": "prompt5",
"type": "string",
"value": "={{ $json.output.image_prompts[4].prompt }}"
}
]
}
},
"typeVersion": "3.4"
},
{
"id": "9f4cc553-ebbe-4621-89af-019eaefedfdc",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-496,
-80
],
"parameters": {
"width": 304,
"height": 848,
"content": "## image is genearted using pollinations.ai"
},
"typeVersion": 1
},
{
"id": "f518b617-9be6-4ee2-bfa1-7d0d45d2d4f5",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-96,
-96
],
"parameters": {
"height": 864,
"content": "## each image name is normalized"
},
"typeVersion": 1
},
{
"id": "897b71c9-1c2b-422b-b602-fd6008d35091",
"name": "Merge image into one item",
"type": "n8n-nodes-base.merge",
"position": [
320,
128
],
"parameters": {
"numberInputs": 5
},
"typeVersion": 3
},
{
"id": "c6b6132c-761c-4dd1-b794-07710f313be4",
"name": "Upload file",
"type": "n8n-nodes-base.googleDrive",
"position": [
736,
176
],
"parameters": {
"driveId": {
"__rl": true,
"mode": "list",
"value": "My Drive"
},
"options": {},
"folderId": {
"__rl": true,
"mode": "list",
"value": "root",
"cachedResultName": "/ (Root folder)"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 3
},
{
"id": "76f8fc04-be8f-4b5d-b685-4c8ba77668c2",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
672,
64
],
"parameters": {
"width": 320,
"height": 320,
"content": "## save output to drive"
},
"typeVersion": 1
}
],
"connections": {
"brand goals": {
"main": [
[
{
"node": "Merge profile and goals",
"type": "main",
"index": 1
}
]
]
},
"brand profile": {
"main": [
[
{
"node": "Merge profile and goals",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai": {
"main": [
[
{
"node": "Change name to photo 1",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai2": {
"main": [
[
{
"node": "Change name to photo 2",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai3": {
"main": [
[
{
"node": "Change name to photo 3",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai4": {
"main": [
[
{
"node": "Change name to photo 4",
"type": "main",
"index": 0
}
]
]
},
"pollinations.ai5": {
"main": [
[
{
"node": "Change name to photo 5",
"type": "main",
"index": 0
}
]
]
},
"clean retrived data": {
"main": [
[
{
"node": "Campaign Goal generator",
"type": "main",
"index": 0
}
]
]
},
"separate each Prompts": {
"main": [
[
{
"node": "pollinations.ai",
"type": "main",
"index": 0
},
{
"node": "pollinations.ai2",
"type": "main",
"index": 0
},
{
"node": "pollinations.ai3",
"type": "main",
"index": 0
},
{
"node": "pollinations.ai4",
"type": "main",
"index": 0
},
{
"node": "pollinations.ai5",
"type": "main",
"index": 0
}
]
]
},
"Change name to photo 1": {
"main": [
[
{
"node": "Merge image into one item",
"type": "main",
"index": 0
}
]
]
},
"Change name to photo 2": {
"main": [
[
{
"node": "Merge image into one item",
"type": "main",
"index": 1
}
]
]
},
"Change name to photo 3": {
"main": [
[
{
"node": "Merge image into one item",
"type": "main",
"index": 2
}
]
]
},
"Change name to photo 5": {
"main": [
[
{
"node": "Merge image into one item",
"type": "main",
"index": 4
}
]
]
},
"Send as 1 merged file1": {
"main": [
[
{
"node": "Upload file",
"type": "main",
"index": 0
}
]
]
},
"Campaign Goal generator": {
"main": [
[
{
"node": "image prompt generator base on the goal",
"type": "main",
"index": 0
}
]
]
},
"Change name to photo 4": {
"main": [
[
{
"node": "Merge image into one item",
"type": "main",
"index": 3
}
]
]
},
"Merge profile and goals": {
"main": [
[
{
"node": "clean retrived data",
"type": "main",
"index": 0
}
]
]
},
"Merge image into one item": {
"main": [
[
{
"node": "Send as 1 merged file1",
"type": "main",
"index": 0
}
]
]
},
"Mistral Cloud Chat Model4": {
"ai_languageModel": [
[
{
"node": "image prompt generator base on the goal",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Campaign Goal generator",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "image prompt generator base on the goal",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "brand goals",
"type": "main",
"index": 0
},
{
"node": "brand profile",
"type": "main",
"index": 0
}
]
]
},
"image prompt generator base on the goal": {
"main": [
[
{
"node": "separate each Prompts",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
googleDriveOAuth2ApimistralCloudApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow uses AI (Mistral LLM + Pollinations.ai) to generate high-quality visual content for social media campaigns. It automates the process from brand/campaign input to final image upload, ensuring consistency and relevance. Input Brand & Campaign Data Retrieves brand…
Source: https://n8n.io/workflows/8770/ — 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.
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
🎯 Create viral TikToks, Shorts, Reels, podcasts, and ASMR videos in minutes — all on autopilot.
Generate AI viral videos with NanoBanana & VEO3, shared on socials via Blotato 2. Uses @blotato/n8n-nodes-blotato, googleSheets, lmChatOpenAi, toolThink. Event-driven trigger; 94 nodes.
The best content automation template in the market is now even better—with “deep research” on time-sensitive topics\! Unlike most n8n content automation templates that are mainly for “demo purposes,”
Who is this for? Agencies, consultants, and service providers who conduct discovery calls and need to quickly turn conversations into professional proposals.