[System]
Tu es un expert n8n. Crée des workflows JSON complets et fonctionnels.
Utilise <thinking> pour expliquer ton raisonnement avant de générer le JSON.
Structure ton thinking: analyse du besoin, choix du trigger, architecture, flux de données, points d'attention.

[User] Crée un workflow n8n pour: Automate Multi-Platform Social Media Content Creation with AI Who is this for? Social Media Managers and Digital Marketers seeking to streamline content production across 7+ platforms (X/Twitter, Instagram, LinkedIn, Facebook, TikTok, Threads, YouTube Shorts) using AI-powered automation. What problem does this solve? Creating platform-optimized content at scale while maintaining brand consistency across multiple channels, reducing manual work by 80% through AI generation and automated publishing. What this workflow does AI Content Generation: Uses GPT-4/Gemini to create platform-specific posts Automatically generates hashtags, CTAs, and emoji placement Supports image/video suggestions and image creation using OpenAI or Pollinations.ai Uses SERP api to search for relavent content Approval W

[Assistant]
<thinking>
**Analyse du besoin**: Automate Multi-Platform Social Media Content Creation with AI
Who is this for?

Social Media Managers and Digital Marketers seeking to streamline content production across 7+ platforms (X/Twitter, Ins...

**Choix du trigger**: Sélection basée sur le cas d'usage décrit.

**Architecture**: 39 nodes utilisant ai, google, email, http.
Structure: logique conditionnelle, code personnalisé, intégration IA.

**Flux de données**: Connexions définies entre les nodes pour assurer le passage des données.

**Points d'attention**: Vérifier les credentials, tester chaque node individuellement.
</thinking>

{"id":"CfdF2XtXC68iJ6Hr","meta":{"instanceId":"31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef","templateCredsSetupCompleted":true},"name":"✨🤖Automated AI Powered Social Media Content Factory for  X + Facebook + Instagram + LinkedIn","tags":[],"nodes":[{"id":"9b6e2038-9f65-4e0f-b13d-6c09e8224ed6","name":"Social Media Content","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[560,-540],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"name\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"platform_posts\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"LinkedIn\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n                        \"image_suggestion\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"Instagram\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"caption\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"emojis\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"Facebook\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"X-Twitter\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n                        \"video_suggestion\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                        \"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"character_limit\": {\n\t\t\t\t\t\t\t\"type\": \"integer\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n                \"TikTok\": {\n                \t\"type\": \"object\",\n                \t\"properties\": {\n                \t\t\"video_suggestion\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"caption\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"hashtags\": {\n                \t\t\t\"type\": \"array\",\n                \t\t\t\"items\": {\n                \t\t\t\t\"type\": \"string\"\n                \t\t\t}\n                \t\t},\n                \t\t\"call_to_action\": {\n                \t\t\t\"type\": \"string\"\n                \t\t}\n                \t}\n                },\n                \"Threads\": {\n                \t\"type\": \"object\",\n                \t\"properties\": {\n                       \"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n                \t\t\"text_post\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"hashtags\": {\n                \t\t\t\"type\": \"array\",\n                \t\t\t\"items\": {\n                \t\t\t\t\"type\": \"string\"\n                \t\t\t}\n                \t\t},\n                \t\t\"call_to_action\": {\n                \t\t\t\"type\": \"string\"\n                \t\t}\n                \t}\n                },\n                \"YouTube_Shorts\": {\n                  \t\"type\": \"object\",\n                  \t\"properties\": {\n                  \t\t\"video_suggestion\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n                  \t\t\"title\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n                          \"description\": {\n                              \"type\": \"string\"\n                          },\n                          \"hashtags\": {\n                              \"type\": \"array\",\n                              \"items\": {\n                                  \"type\": \"string\"\n                              }\n                          },\n                          \"call_to_action\": {\n                              \"type\": \"string\"\n                          }\n                      }\n                  }\n\t\t\t}\n\t\t},\n\t\t\"additional_notes\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}\n"},"typeVersion":1.2},{"id":"a1211873-05ca-48c7-aa93-57d80b37174b","name":"Google Gemini LLM","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","disabled":true,"position":[320,-540],"parameters":{"options":{"temperature":0.4},"modelName":"models/gemini-2.0-flash-exp"},"typeVersion":1},{"id":"14327277-1e66-401d-9c74-8fdb6d76445f","name":"gpt-4o-mini","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1360,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"9a49454b-f518-4388-82a7-2529addae3e5","name":"gpt-4o","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","disabled":true,"position":[1500,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"56eb9c72-87fc-42b2-b576-be68b3a8c7d2","name":"gpt-4o LLM","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[180,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"bf4e6d41-b2be-44fc-8fc7-6dc6bc4ee69a","name":"pollinations.ai","type":"n8n-nodes-base.httpRequest","disabled":true,"position":[980,780],"parameters":{"url":"=https://image.pollinations.ai/prompt/{{$('Social Media Content Factory').item.json.output.description.replaceAll(' ','-').replaceAll(',','').replaceAll('.','') }}","options":{}},"typeVersion":4.2},{"id":"7b5b53eb-85c6-4a90-b209-7bd8d638f237","name":"Merge","type":"n8n-nodes-base.merge","position":[700,20],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"daa6773e-0e15-4994-bcee-b3d996655855","name":"Save Image to imgbb.com3","type":"n8n-nodes-base.httpRequest","position":[360,-140],"parameters":{"url":"https://api.imgbb.com/1/upload","method":"POST","options":{"redirect":{"redirect":{}}},"sendBody":true,"sendQuery":true,"contentType":"multipart-form-data","bodyParameters":{"parameters":[{"name":"image","parameterType":"formBinaryData","inputDataFieldName":"data"}]},"queryParameters":{"parameters":[{"name":"expiration","value":"0"},{"name":"key","value":"={{ $env.IMGBB_API_KEY}} "}]}},"typeVersion":4.2},{"id":"af06853c-258e-4dfb-a579-3168c8de96bd","name":"Instagram Image","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[1700,-60],"parameters":{"url":"https://graph.facebook.com/v20.0/[your-unique-id]/media","method":"POST","options":{},"sendQuery":true,"authentication":"predefinedCredentialType","queryParameters":{"parameters":[{"name":"image_url","value":"={{ $json.data.medium.url }}"},{"name":"caption","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}"}]},"nodeCredentialType":"facebookGraphApi"},"typeVersion":4.2},{"id":"6ee72138-a8ec-4fbd-8f14-fd6e881edfd1","name":"Instragram Post","type":"n8n-nodes-base.facebookGraphApi","onError":"continueRegularOutput","position":[1700,160],"parameters":{"edge":"media_publish","node":"[your-unique-id]","options":{"queryParameters":{"parameter":[{"name":"creation_id","value":"={{ $json.id }}"},{"name":"caption","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}"}]}},"graphApiVersion":"v20.0","httpRequestMethod":"POST"},"typeVersion":1,"alwaysOutputData":true},{"id":"9e168865-1eae-4e53-99c9-91b041426ecb","name":"X Post","type":"n8n-nodes-base.twitter","onError":"continueRegularOutput","position":[1700,380],"parameters":{"text":"={{ $('Social Media Content Factory').item.json.output.platform_posts['X-Twitter'].post }}","additionalFields":{}},"typeVersion":2,"alwaysOutputData":true},{"id":"4ee55c94-7251-445e-8ce7-15eee7165010","name":"Facebook Post","type":"n8n-nodes-base.facebookGraphApi","onError":"continueRegularOutput","position":[1700,600],"parameters":{"edge":"photos","node":"[your-unique-id]","options":{"queryParameters":{"parameter":[{"name":"message","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.post }}\n\n{{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.call_to_action }}\n"},{"name":"link","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.call_to_action }}"}]}},"sendBinaryData":true,"graphApiVersion":"v20.0","httpRequestMethod":"POST","binaryPropertyName":"data"},"typeVersion":1,"alwaysOutputData":true},{"id":"3a015f3f-a162-411a-85e8-e1f042d9c653","name":"LinkedIn Post","type":"n8n-nodes-base.linkedIn","onError":"continueRegularOutput","position":[1700,780],"parameters":{"text":"={{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.post }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.hashtags }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}","postAs":"organization","organization":"12345678","additionalFields":{},"binaryPropertyName":"=data","shareMediaCategory":"IMAGE"},"typeVersion":1,"alwaysOutputData":true},{"id":"8ab03d75-b4c5-4271-8fa9-830f449a3a3c","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[40,-20],"parameters":{"prompt":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}","options":{},"resource":"image"},"typeVersion":1.8,"alwaysOutputData":true},{"id":"d1ac29b1-128d-4615-b828-89f1f64d1b15","name":"Merge1","type":"n8n-nodes-base.merge","position":[1440,-60],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"71eebce8-027a-4b12-b07e-692121de9a68","name":"Merge2","type":"n8n-nodes-base.merge","position":[1440,680],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"140cff41-a619-4111-8dc9-3ec8fc45e061","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[-240,520],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"3e96bfac-dad5-4b75-b51b-50329892ee70","name":"gpt-4o-mini1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"4d73d59f-bb8c-481b-877a-bf4dc64f3277","name":"gpt-4o-mini2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,820],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"aaef70d7-6029-4fae-afc1-72a6a0019b03","name":"Gmail User for Approval","type":"n8n-nodes-base.gmail","position":[2000,-540],"webhookId":"c46cf421-ddb6-45a8-b83b-80b381666f0e","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"={{ $json.output }}","options":{"limitWaitTime":{"values":{"resumeUnit":"minutes","resumeAmount":45}}},"subject":"=🔥FOR APPROVAL🔥{{ $('Social Media Content Factory').item.json.output.name }} - {{ $('Social Media Content Factory').item.json.output.description }}","operation":"sendAndWait","approvalOptions":{"values":{"approvalType":"double"}}},"typeVersion":2.1},{"id":"930e76ac-6e9c-4a3f-9229-28ba18de25a3","name":"Approve Final Post Content","type":"n8n-nodes-base.gmail","disabled":true,"position":[980,380],"webhookId":"c46cf421-ddb6-45a8-b83b-80b381666f0e","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"=\n\n
\n\n
LinkedIn
\n      \n    \n
\n\n      \n
\n        \n
\n\n      \n
\n\n
\n          {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.post }}\n
\n        \n
\n          \n            {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.hashtags }}\n          \n
\n\n
\n          {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}\n
\n
\n
\n
\n\n\n","options":{"limitWaitTime":{"values":{"resumeUnit":"minutes","resumeAmount":45}}},"subject":"=🔥FOR APPROVAL🔥 New LinkedIn Post","operation":"sendAndWait","approvalOptions":{"values":{"approvalType":"double"}}},"typeVersion":2.1},{"id":"b42df164-47ae-4e08-9099-d0958dd41c8f","name":"Is Approved?","type":"n8n-nodes-base.if","position":[1160,20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"efe337a1-63e0-4513-873d-421bf41e4868","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.data.approved }}","rightValue":""}]}},"typeVersion":2.2},{"id":"e3193aef-d115-4c3b-87b2-b8ebd5bb0c05","name":"Instagram Result","type":"n8n-nodes-base.set","position":[2040,160],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"Instagram Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"6f8b248f-5c79-412c-81ef-3c52bef7f257","name":"X Result","type":"n8n-nodes-base.set","position":[2040,380],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"X Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"4c1ee118-aba1-4632-bd48-27cef9d5e272","name":"Facebook Result","type":"n8n-nodes-base.set","position":[2040,600],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"Facebook Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"490223f9-9b6a-4617-8829-c8e4b130feb7","name":"LinkedIn Result","type":"n8n-nodes-base.set","position":[2040,780],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"LinkedIn Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"9732c12e-903e-49ac-8d29-ffc4d78c7ff8","name":"Submit Social Post Details","type":"n8n-nodes-base.formTrigger","position":[-180,-740],"webhookId":"3e762442-715e-47e1-a65e-ae92085857ae","parameters":{"options":{"buttonLabel":"Automatically Generate Social Media Content"},"formTitle":"workflows.diy","formFields":{"values":[{"fieldLabel":"Topic","placeholder":"Provide a concise and clear title or main topic for your post (e.g., \"New Product Launch,\" \"Exciting Company Update\"). This helps the AI accurately capture the focus of your content.","requiredField":true},{"fieldLabel":"Keywords or Hashtags (optional)","placeholder":"Include any specific keywords or hashtags you'd like the AI to incorporate into the post. This ensures the content aligns with your branding and campaign objectives.","requiredField":"={{ false }}"},{"fieldLabel":"Link (optional)","placeholder":"=Provide the URL of any product, service, form, support page, or other resource. This link will be included in the generated post to direct your audience to the relevant content.\n"}]},"responseMode":"lastNode","formDescription":"=Welcome to the workflows.diy AI-Powered Assistant!\n\nThis tool is designed to streamline and enhance your social media content creation process.\n\nSimply provide key inputs like a topic or title and an optional image, and our intelligent agent will generate engaging, platform-specific post descriptions tailored to your audience. \n\nWhether you're a marketer, business owner, or influencer, this assistant saves you time while delivering professional-quality content optimized for maximum impact.\n\n"},"typeVersion":2.2},{"id":"1955b762-b9c4-4704-955b-093686e827bd","name":"Merge Results","type":"n8n-nodes-base.merge","onError":"continueRegularOutput","position":[2340,780],"parameters":{"numberInputs":4},"typeVersion":3,"alwaysOutputData":true},{"id":"6dc47749-eb49-4351-89aa-50f2b6c035bb","name":"Social Media Content Factory","type":"@n8n/n8n-nodes-langchain.agent","position":[300,-740],"parameters":{"text":"=You are a **content creation AI** for workflows.diy, a leading creator of **n8n workflow automation solutions and AI Agentic workflows**.\n\nYour goal is to craft **engaging, platform-specific content** for LinkedIn, Instagram, Facebook, Twitter (X), TikTok, Threads, and YouTube Shorts. Each post must align with the platform’s audience preferences, tone, and style while reflecting workflows.diy's expertise. The content should provide **value-driven insights**, tutorials, reviews, and discussions that resonate with tech professionals, automation enthusiasts, businesses, and n8n users.\n\n### Key Objectives:\n1. **Platform Optimization**: Tailor content format, tone, and hashtags to suit each platform’s algorithm and audience engagement patterns.\n2. **SEO & Hashtags**: Use a mix of general automation hashtags and trending platform-specific hashtags to maximize reach.\n3. **Engagement Focus**: Create content that sparks interaction through tutorials, comparisons, reviews, or thought-provoking discussions.\n4. **Consistency**: Maintain a professional yet approachable tone across all platforms while adapting to audience needs.\n5. **Data-Driven Strategy**: Analyze trends and performance data to refine content strategy and hashtag usage.\n\n### General Hashtags:\n#workflowsdiy #n8n #automation #AIWorkflows #WorkflowAutomation #TechSolutions\n\n---\n\n### Platform-Specific Guidelines:\n\n#### 1. LinkedIn\n   - **Style**: Professional and insightful.\n   - **Tone**: Business-oriented; focus on automation use cases, industry insights, and community impact.\n   - **Content Length**: 3-4 sentences; concise but detailed.\n   - **Hashtags**: #Innovation #Automation #WorkflowSolutions #DigitalTransformation #Leadership\n   - **Call to Action (CTA)**: Encourage comments or visits to workflows.diy’s website for more insights.\n\n#### 2. Instagram\n   - **Style**: Visual storytelling with creative captions.\n   - **Tone**: Inspirational and engaging; use emojis for relatability.\n   - **Content Length**: 2-3 sentences paired with eye-catching visuals (e.g., infographics or workflow demos).\n   - **Visuals**: Showcase milestones (e.g., new workflow launches), tutorials, or product highlights.\n   - **CTA**: Use phrases like \"Swipe to learn more,\" \"Tag your team,\" or \"Check out the link below!\"\n   - **Link Placement**: Add the provided link before hashtags; if no link is provided, use \"Visit our website: https://workflows.diy.\"\n   - **Hashtags**: #AutomationLife #TechInnovation #WorkflowTips #Programming #Engineering\n\n#### 3. Facebook\n   - **Style**: Friendly and community-focused.\n   - **Tone**: Relatable; highlight user success stories or company achievements in automation.\n   - **Content Length**: 2-3 sentences; conversational yet professional.\n   - **Hashtags**: #SmallBusinessAutomation #Entrepreneurship #Leadership #WorkflowInnovation\n   - **CTA**: Encourage likes, shares, comments (e.g., “What’s your favorite automation tip?”).\n\n#### 4. Twitter (X)\n   - **Style**: Concise and impactful.\n   - **Tone**: Crisp and engaging; spark curiosity in 150 characters or less.\n   - **Hashtags**: #WorkflowTrends #AIWorkflows #AutomationTips #NoCodeSolutions\n   - **CTA**: Drive quick engagement through retweets or replies (e.g., “What’s your go-to n8n workflow?”).\n\n#### 5. TikTok\n   - **Style**: Short-form video content with trending audio or effects.\n   - **Tone**: Fun yet informative; focus on quick workflow demos or automation tips.\n   - **Content Length**: 15-60 seconds with captions summarizing the key message.\n   - **Hashtags**: Use trending tech-related hashtags relevant to TikTok’s audience (e.g., #n8nTips).\n   - **CTA**: Encourage viewers to follow workflows.diy for more automation hacks.\n\n#### 6. Threads\n   - **Style**: Conversational and community-driven posts.\n   - **Tone**: Casual yet informative; encourage discussions around automation trends or innovations.\n   - **Content Length**: 1-2 short paragraphs with a question or thought-provoking statement at the end.\n   - **Hashtags**: Similar to Instagram but tailored for trending Threads topics related to automation.\n\n#### 7. YouTube Shorts\n   - **Style**: Short-form video content showcasing quick workflow tutorials or use cases.\n   - **Tone**: Authoritative yet approachable; establish workflows.diy as a leader in n8n automation solutions.\n   - Content Length:\n     - Tutorials/Reviews (long-form): 5-10 minutes\n     - Shorts/Highlights (short-form): Under 1 minute\n   - CTA:** Encourage subscriptions**, likes, comments (e.g., “Subscribe for more workflow tips!”).\n\n---\n\n### Content Creation Workflow:\nFor every post:\n1. Use the following input fields:\n    - Topic/About the Post: {{ $json.Topic }}\n    - Keywords/Focus Areas: {{ $json.formMode }}\n    - Link (optional): {{ $json['Link (optional)'] }}\n2. Adapt the tone/style based on the platform guidelines above.\n\nEnsure every post reflects workflows.diy's mission of delivering high-quality automation insights while maximizing engagement across platforms.\n\nFollow the provided JSON schema for your reponse.\n","options":{"systemMessage":"=Use the provided tools to research the topic based on latest information.  Todays date is {{ $now }}"},"promptType":"define","hasOutputParser":true},"retryOnFail":true,"typeVersion":1.7},{"id":"88c548bf-40e5-4b89-aef0-9233c3f5bc9c","name":"Prepare Content Review Email","type":"@n8n/n8n-nodes-langchain.agent","position":[1440,-740],"parameters":{"text":"=Generate clean, modern HTML email content from the provided JSON data with these requirements:\n- Use table-based layout with inline CSS for email compatibility\n- Create card sections for each platform containing:\n  • Title header (20px) \n  • Post content (16px) \n  • Video/image suggestions (italic 14px)\n  • Hashtag list (inline-block with # prefix)\n  • Emoji preservation where present\n  • Call-to-action (bold 14px)\n- Structure using:\n  • 600px max-width container\n  • 20px padding between cards\n  • Left-aligned text hierarchy\n  • Arial/sans-serif font stack\n  • Email-safe colors (#333 text, #555 secondary)\n- Include all platform-specific elements:\n  ▶ Video/image suggestions in italic\n  ▶ Hashtags as linked search terms\n  ▶ Emojis in original positions\n  ▶ Character limits for Twitter\n  ▶ Platform-specific CTAs\n  ▶ Visual quality reminders\n- Format hashtags as:\n  #tag\n\nInput data: {{ $json.output.toJsonString() }}\n\nRemove ALL code blocks and comments. Output ONLY the raw HTML with:\n- Platform cards in JSON order\n- All data elements represented\n- Mobile-responsive tables\n- W3C-valid markup\n\n## Example HTML:\n
\n\t\t

\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

LinkedIn

Discover why n8n stands out as the premier workflow automation tool. Its flexibility and open-source nature empower businesses to create custom solutions that drive efficiency and innovation.

Video/Image suggestion pending

#Innovation#Automation#<wbr>WorkflowSolutions#<wbr>DigitalTransformation#<wbr>Leadership#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Visit workflows.diy to explore how n8n can transform your business processes!

Instagram

Eye-catching infographic comparing n8n to other automation tools, highlighting its unique features.

n8n: The ultimate workflow automation tool!  Unlock limitless possibilities with its open-source platform. Boost your productivity and streamline your processes.

#AutomationLife#TechInnovation<wbr>#WorkflowTips#Programming#<wbr>Engineering#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Visit our website: https://n8n.io/ #AutomationLife #TechInnovation #WorkflowTips #Programming #Engineering

Facebook

See why businesses are choosing n8n for their workflow automation needs. From its user-friendly interface to its powerful customization options, n8n is revolutionizing how companies approach automation.

A visually appealing graphic showcasing n8n's key features and benefits.

#SmallBusinessAutomation#<wbr>Entrepreneurship#Leadership#<wbr>WorkflowInnovation#<wbr>workflowsdiy#n8n#AIWorkflows#<wbr>WorkflowAutomation#<wbr>TechSolutions

What's your favorite automation tip? Share in the comments!

Twitter

n8n: The best #WorkflowAutomation tool! Open-source, customizable, and powerful. Transform your business processes today!

#WorkflowTrends#AIWorkflows#<wbr>AutomationTips#NoCodeSolutions<wbr>#workflowsdiy#n8n#<wbr>TechSolutions

TikTok

Quick demo showcasing how n8n simplifies complex workflows with its intuitive interface.

n8n: Your go-to for effortless workflow automation!

#n8nTips#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Follow workflows.diy for more automation hacks!

Threads

n8n is transforming the automation landscape. Its open-source nature and extensive integrations make it a top choice for businesses of all sizes. What are your thoughts on the future of workflow automation?

#workflowsdiy#n8n#AIWorkflows#<wbr>WorkflowAutomation#<wbr>TechSolutions

Share your insights below!

YouTube Shorts

Short tutorial demonstrating how to build a simple automation workflow in n8n.

Learn why n8n is the top choice for workflow automation. Its open-source platform and powerful features make it a game-changer for businesses.

#n8n#automation#<wbr>workflowautomation#nocode#<wbr>workflowsdiy#AIWorkflows#<wbr>TechSolutions

Subscribe for more workflow tips!

\n\t\t\t\t\t\t	\n\t\t\t\t\t
\n\t\t\t\t
\n
\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"3b074887-262f-47ab-b69c-c51b3a513993","name":"Prepare Results Email","type":"@n8n/n8n-nodes-langchain.agent","position":[0,380],"parameters":{"text":"=Parse the social media post results and generate a modern single line HTML table showing platform statuses. For each entry:\n\n-Extract platform name from the JSON key\n-Identify status (Success/Error) based on statusCode or error presence\n-Capture error message if present\n-Format as responsive HTML table with professional styling\n-Ensure email client compatibility with inline CSS\n-Include error handling for invalid JSON formats\n-Remove all line breaks and \\n from response.\n-Avoid any preamble or further explanation and remove all ``` and ```html from response.\n\n## Implementation Example:\nThis solution uses the parsed results from your workflow to generate:\n
\n
\n
\n            Platform	\n            Status	\n            Details	\n
\n
\n
\n
\n            Instagram	\n            ✗ Error	\n            Unsupported post request. Object with ID '[your-unique-id]' does not exist, cannot be loaded due to missing permissions.	\n
\n
\n            X (Twitter)	\n            ✗ Error	\n            Unable to sign without access token	\n
\n
\n            Facebook	\n            ✗ Error	\n            Unsupported post request. Object with ID '[your-unique-id]' does not exist, cannot be loaded due to missing permissions.	\n
\n
\n            LinkedIn	\n            ✗ Error	\n            Unable to sign without access token	\n
\n
\n
\n\n\nThis is the social media post results: \n{{ $json.data.toJsonString() }}\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"abb3994f-bf23-43f8-9c46-28795cfd2017","name":"Prepare Results Message","type":"@n8n/n8n-nodes-langchain.agent","position":[0,660],"parameters":{"text":"=Parse the social media post results and generate a brief summary of the results.\n\nThis is the social media post results: \n{{ $json.data.toJsonString() }}\n\n## Example Response:\nThe social media post results indicate multiple errors when attempting to access or post content on various platforms. \n\n1. Instagram: The response shows a 400 status code with an error message indicating that the specific post request is unsupported due to missing permissions or an invalid object ID. \n\n2. X Post: Success\n\n3. Facebook: Success \n\n4. LinkedIn: Also returned an 'Unable to sign without access token' error. \n\nOverall, access token issues and unsupported requests are frequent problems across these social media platforms.\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"b4a4838a-83b0-4f28-a9f3-dea915228325","name":"Image Choice","type":"n8n-nodes-base.form","disabled":true,"position":[-620,-120],"webhookId":"0dc811ef-b2e0-4213-a0c9-e9b5fb9fcbf1","parameters":{"options":{"formTitle":"Generate Post Image","buttonLabel":"Submit"},"formFields":{"values":[{"fieldType":"file","fieldLabel":"Upload Image (optional)","multipleFiles":false,"acceptFileTypes":".jpg, .png, .jpeg"},{"fieldType":"dropdown","fieldLabel":"Generate Custom Image using AI Image Generator","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true}]}},"typeVersion":1},{"id":"1cf97c10-e60f-4584-b069-3d4506868d8e","name":"Gmail Results","type":"n8n-nodes-base.gmail","position":[360,380],"webhookId":"0a81b95a-cd82-465d-8450-cf38518a4cbb","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"={{ $json.output }}","options":{"appendAttribution":false},"subject":"🔥RESULTS🔥 Social Media Factory"},"typeVersion":2.1},{"id":"c845ae46-9d37-472b-ae0f-49fc6940e685","name":"Telegram Results","type":"n8n-nodes-base.telegram","position":[360,660],"webhookId":"bb40ede7-03cf-493d-b051-196b96725925","parameters":{"text":"={{ $json.output }}","chatId":"={{ $env.TELEGRAM_CHAT_ID }}","additionalFields":{"appendAttribution":false}},"typeVersion":1.2},{"id":"643b94c6-4535-4876-9660-d82ff69cbcf6","name":"Is Content Approved?","type":"n8n-nodes-base.if","position":[-240,-20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e32d270f-f258-4522-94e1-2cb7ee4e8d2a","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.data.approved }}","rightValue":""}]}},"typeVersion":2.2},{"id":"fb7108e2-21cf-4df4-ab20-fe75b15b0a24","name":"Set Default True 2","type":"n8n-nodes-base.set","position":[980,20],"parameters":{"options":{},"assignments":{"assignments":[{"id":"f150aa79-2d20-4869-b60a-350d49a215a5","name":"data","type":"object","value":"={\n  \"approved\": true\n}"}]}},"typeVersion":3.4},{"id":"0a10bca0-c3a8-496b-a22e-120928ad7736","name":"SerpAPI","type":"@n8n/n8n-nodes-langchain.toolSerpApi","position":[460,-540],"parameters":{"options":{}},"typeVersion":1},{"id":"b21f527c-5674-49d0-a114-866d669e7ad6","name":"Rename Binary File","type":"n8n-nodes-base.code","position":[-620,120],"parameters":{"jsCode":"$input.first().binary.data = $input.first().binary.Upload_Image__optional_\ndelete $input.first().binary.Upload_Image__optional_\nreturn $input.first()"},"typeVersion":2,"alwaysOutputData":true}],"active":false,"settings":{"executionOrder":"v1"},"connections":{"Merge":{"main":[[{"node":"Set Default True 2","type":"main","index":0}]]},"Merge1":{"main":[[{"node":"Instagram Image","type":"main","index":0}]]},"Merge2":{"main":[[{"node":"Facebook Post","type":"main","index":0},{"node":"LinkedIn Post","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"Save Image to imgbb.com3","type":"main","index":0},{"node":"Merge","type":"main","index":1},{"node":"Merge2","type":"main","index":1}]]},"X Post":{"main":[[{"node":"X Result","type":"main","index":0}],[]]},"SerpAPI":{"ai_tool":[[{"node":"Social Media Content Factory","type":"ai_tool","index":0}]]},"X Result":{"main":[[{"node":"Merge Results","type":"main","index":1}]]},"Aggregate":{"main":[[{"node":"Prepare Results Email","type":"main","index":0},{"node":"Prepare Results Message","type":"main","index":0}]]},"gpt-4o LLM":{"ai_languageModel":[[{"node":"Social Media Content Factory","type":"ai_languageModel","index":0}]]},"gpt-4o-mini":{"ai_languageModel":[[{"node":"Prepare Content Review Email","type":"ai_languageModel","index":0}]]},"Image Choice":{"main":[[{"node":"Rename Binary File","type":"main","index":0}]]},"Is Approved?":{"main":[[{"node":"X Post","type":"main","index":0},{"node":"Merge1","type":"main","index":1},{"node":"Merge2","type":"main","index":0}],[]]},"gpt-4o-mini1":{"ai_languageModel":[[{"node":"Prepare Results Email","type":"ai_languageModel","index":0}]]},"gpt-4o-mini2":{"ai_languageModel":[[{"node":"Prepare Results Message","type":"ai_languageModel","index":0}]]},"Facebook Post":{"main":[[{"node":"Facebook Result","type":"main","index":0}],[]]},"LinkedIn Post":{"main":[[{"node":"LinkedIn Result","type":"main","index":0}],[]]},"Merge Results":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Facebook Result":{"main":[[{"node":"Merge Results","type":"main","index":2}]]},"Instagram Image":{"main":[[{"node":"Instragram Post","type":"main","index":0}]]},"Instragram Post":{"main":[[{"node":"Instagram Result","type":"main","index":0}],[]]},"LinkedIn Result":{"main":[[{"node":"Merge Results","type":"main","index":3}]]},"pollinations.ai":{"main":[[]]},"Instagram Result":{"main":[[{"node":"Merge Results","type":"main","index":0}]]},"Google Gemini LLM":{"ai_languageModel":[[]]},"Set Default True 2":{"main":[[{"node":"Is Approved?","type":"main","index":0}]]},"Is Content Approved?":{"main":[[{"node":"OpenAI","type":"main","index":0}]]},"Social Media Content":{"ai_outputParser":[[{"node":"Social Media Content Factory","type":"ai_outputParser","index":0}]]},"Prepare Results Email":{"main":[[{"node":"Gmail Results","type":"main","index":0}]]},"Gmail User for Approval":{"main":[[{"node":"Is Content Approved?","type":"main","index":0}]]},"Prepare Results Message":{"main":[[{"node":"Telegram Results","type":"main","index":0}]]},"Save Image to imgbb.com3":{"main":[[{"node":"Merge","type":"main","index":0},{"node":"Merge1","type":"main","index":0}]]},"Approve Final Post Content":{"main":[[]]},"Submit Social Post Details":{"main":[[{"node":"Social Media Content Factory","type":"main","index":0}]]},"Prepare Content Review Email":{"main":[[{"node":"Gmail User for Approval","type":"main","index":0}]]},"Social Media Content Factory":{"main":[[{"node":"Prepare Content Review Email","type":"main","index":0}]]}}}


[System]
Tu es un expert n8n. Crée des workflows JSON complets et fonctionnels.
Utilise <thinking> pour expliquer ton raisonnement avant de générer le JSON.
Structure ton thinking: analyse du besoin, choix du trigger, architecture, flux de données, points d'attention.

[User] Génère un workflow n8n: ✨🤖Automate Multi-Platform Social Media Content Creation with AI

[Assistant]
<thinking>
**Analyse du besoin**: Automate Multi-Platform Social Media Content Creation with AI
Who is this for?

Social Media Managers and Digital Marketers seeking to streamline content production across 7+ platforms (X/Twitter, Ins...

**Choix du trigger**: Sélection basée sur le cas d'usage décrit.

**Architecture**: 39 nodes utilisant ai, google, email, http.
Structure: logique conditionnelle, code personnalisé, intégration IA.

**Flux de données**: Connexions définies entre les nodes pour assurer le passage des données.

**Points d'attention**: Vérifier les credentials, tester chaque node individuellement.
</thinking>

{"id":"CfdF2XtXC68iJ6Hr","meta":{"instanceId":"31e69f7f4a77bf465b805824e303232f0227212ae922d12133a0f96ffeab4fef","templateCredsSetupCompleted":true},"name":"✨🤖Automated AI Powered Social Media Content Factory for  X + Facebook + Instagram + LinkedIn","tags":[],"nodes":[{"id":"9b6e2038-9f65-4e0f-b13d-6c09e8224ed6","name":"Social Media Content","type":"@n8n/n8n-nodes-langchain.outputParserStructured","position":[560,-540],"parameters":{"schemaType":"manual","inputSchema":"{\n\t\"type\": \"object\",\n\t\"properties\": {\n\t\t\"name\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"description\": {\n\t\t\t\"type\": \"string\"\n\t\t},\n\t\t\"platform_posts\": {\n\t\t\t\"type\": \"object\",\n\t\t\t\"properties\": {\n\t\t\t\t\"LinkedIn\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n                        \"image_suggestion\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"Instagram\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"caption\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"emojis\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"Facebook\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"call_to_action\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"X-Twitter\": {\n\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\"properties\": {\n                        \"video_suggestion\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                        \"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"post\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"hashtags\": {\n\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"character_limit\": {\n\t\t\t\t\t\t\t\"type\": \"integer\"\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n                \"TikTok\": {\n                \t\"type\": \"object\",\n                \t\"properties\": {\n                \t\t\"video_suggestion\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"caption\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"hashtags\": {\n                \t\t\t\"type\": \"array\",\n                \t\t\t\"items\": {\n                \t\t\t\t\"type\": \"string\"\n                \t\t\t}\n                \t\t},\n                \t\t\"call_to_action\": {\n                \t\t\t\"type\": \"string\"\n                \t\t}\n                \t}\n                },\n                \"Threads\": {\n                \t\"type\": \"object\",\n                \t\"properties\": {\n                       \"image_suggestion\": {\n\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t},\n                \t\t\"text_post\": {\n                \t\t\t\"type\": \"string\"\n                \t\t},\n                \t\t\"hashtags\": {\n                \t\t\t\"type\": \"array\",\n                \t\t\t\"items\": {\n                \t\t\t\t\"type\": \"string\"\n                \t\t\t}\n                \t\t},\n                \t\t\"call_to_action\": {\n                \t\t\t\"type\": \"string\"\n                \t\t}\n                \t}\n                },\n                \"YouTube_Shorts\": {\n                  \t\"type\": \"object\",\n                  \t\"properties\": {\n                  \t\t\"video_suggestion\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n                  \t\t\"title\": {\n                  \t\t\t\"type\": \"string\"\n                  \t\t},\n                          \"description\": {\n                              \"type\": \"string\"\n                          },\n                          \"hashtags\": {\n                              \"type\": \"array\",\n                              \"items\": {\n                                  \"type\": \"string\"\n                              }\n                          },\n                          \"call_to_action\": {\n                              \"type\": \"string\"\n                          }\n                      }\n                  }\n\t\t\t}\n\t\t},\n\t\t\"additional_notes\": {\n\t\t\t\"type\": \"string\"\n\t\t}\n\t}\n}\n"},"typeVersion":1.2},{"id":"a1211873-05ca-48c7-aa93-57d80b37174b","name":"Google Gemini LLM","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","disabled":true,"position":[320,-540],"parameters":{"options":{"temperature":0.4},"modelName":"models/gemini-2.0-flash-exp"},"typeVersion":1},{"id":"14327277-1e66-401d-9c74-8fdb6d76445f","name":"gpt-4o-mini","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[1360,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"9a49454b-f518-4388-82a7-2529addae3e5","name":"gpt-4o","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","disabled":true,"position":[1500,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"56eb9c72-87fc-42b2-b576-be68b3a8c7d2","name":"gpt-4o LLM","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[180,-540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o","cachedResultName":"gpt-4o"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"bf4e6d41-b2be-44fc-8fc7-6dc6bc4ee69a","name":"pollinations.ai","type":"n8n-nodes-base.httpRequest","disabled":true,"position":[980,780],"parameters":{"url":"=https://image.pollinations.ai/prompt/{{$('Social Media Content Factory').item.json.output.description.replaceAll(' ','-').replaceAll(',','').replaceAll('.','') }}","options":{}},"typeVersion":4.2},{"id":"7b5b53eb-85c6-4a90-b209-7bd8d638f237","name":"Merge","type":"n8n-nodes-base.merge","position":[700,20],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"daa6773e-0e15-4994-bcee-b3d996655855","name":"Save Image to imgbb.com3","type":"n8n-nodes-base.httpRequest","position":[360,-140],"parameters":{"url":"https://api.imgbb.com/1/upload","method":"POST","options":{"redirect":{"redirect":{}}},"sendBody":true,"sendQuery":true,"contentType":"multipart-form-data","bodyParameters":{"parameters":[{"name":"image","parameterType":"formBinaryData","inputDataFieldName":"data"}]},"queryParameters":{"parameters":[{"name":"expiration","value":"0"},{"name":"key","value":"={{ $env.IMGBB_API_KEY}} "}]}},"typeVersion":4.2},{"id":"af06853c-258e-4dfb-a579-3168c8de96bd","name":"Instagram Image","type":"n8n-nodes-base.httpRequest","onError":"continueRegularOutput","position":[1700,-60],"parameters":{"url":"https://graph.facebook.com/v20.0/[your-unique-id]/media","method":"POST","options":{},"sendQuery":true,"authentication":"predefinedCredentialType","queryParameters":{"parameters":[{"name":"image_url","value":"={{ $json.data.medium.url }}"},{"name":"caption","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}"}]},"nodeCredentialType":"facebookGraphApi"},"typeVersion":4.2},{"id":"6ee72138-a8ec-4fbd-8f14-fd6e881edfd1","name":"Instragram Post","type":"n8n-nodes-base.facebookGraphApi","onError":"continueRegularOutput","position":[1700,160],"parameters":{"edge":"media_publish","node":"[your-unique-id]","options":{"queryParameters":{"parameter":[{"name":"creation_id","value":"={{ $json.id }}"},{"name":"caption","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}"}]}},"graphApiVersion":"v20.0","httpRequestMethod":"POST"},"typeVersion":1,"alwaysOutputData":true},{"id":"9e168865-1eae-4e53-99c9-91b041426ecb","name":"X Post","type":"n8n-nodes-base.twitter","onError":"continueRegularOutput","position":[1700,380],"parameters":{"text":"={{ $('Social Media Content Factory').item.json.output.platform_posts['X-Twitter'].post }}","additionalFields":{}},"typeVersion":2,"alwaysOutputData":true},{"id":"4ee55c94-7251-445e-8ce7-15eee7165010","name":"Facebook Post","type":"n8n-nodes-base.facebookGraphApi","onError":"continueRegularOutput","position":[1700,600],"parameters":{"edge":"photos","node":"[your-unique-id]","options":{"queryParameters":{"parameter":[{"name":"message","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.post }}\n\n{{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.call_to_action }}\n"},{"name":"link","value":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Facebook.call_to_action }}"}]}},"sendBinaryData":true,"graphApiVersion":"v20.0","httpRequestMethod":"POST","binaryPropertyName":"data"},"typeVersion":1,"alwaysOutputData":true},{"id":"3a015f3f-a162-411a-85e8-e1f042d9c653","name":"LinkedIn Post","type":"n8n-nodes-base.linkedIn","onError":"continueRegularOutput","position":[1700,780],"parameters":{"text":"={{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.post }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.hashtags }}\n{{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}","postAs":"organization","organization":"12345678","additionalFields":{},"binaryPropertyName":"=data","shareMediaCategory":"IMAGE"},"typeVersion":1,"alwaysOutputData":true},{"id":"8ab03d75-b4c5-4271-8fa9-830f449a3a3c","name":"OpenAI","type":"@n8n/n8n-nodes-langchain.openAi","position":[40,-20],"parameters":{"prompt":"={{ $('Social Media Content Factory').item.json.output.platform_posts.Instagram.caption }}","options":{},"resource":"image"},"typeVersion":1.8,"alwaysOutputData":true},{"id":"d1ac29b1-128d-4615-b828-89f1f64d1b15","name":"Merge1","type":"n8n-nodes-base.merge","position":[1440,-60],"parameters":{"mode":"combine","options":{},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"71eebce8-027a-4b12-b07e-692121de9a68","name":"Merge2","type":"n8n-nodes-base.merge","position":[1440,680],"parameters":{"mode":"combine","options":{"includeUnpaired":true},"combineBy":"combineByPosition"},"typeVersion":3},{"id":"140cff41-a619-4111-8dc9-3ec8fc45e061","name":"Aggregate","type":"n8n-nodes-base.aggregate","position":[-240,520],"parameters":{"options":{},"aggregate":"aggregateAllItemData"},"typeVersion":1},{"id":"3e96bfac-dad5-4b75-b51b-50329892ee70","name":"gpt-4o-mini1","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,540],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"4d73d59f-bb8c-481b-877a-bf4dc64f3277","name":"gpt-4o-mini2","type":"@n8n/n8n-nodes-langchain.lmChatOpenAi","position":[-20,820],"parameters":{"model":{"__rl":true,"mode":"list","value":"gpt-4o-mini","cachedResultName":"gpt-4o-mini"},"options":{"responseFormat":"text"}},"typeVersion":1.2},{"id":"aaef70d7-6029-4fae-afc1-72a6a0019b03","name":"Gmail User for Approval","type":"n8n-nodes-base.gmail","position":[2000,-540],"webhookId":"c46cf421-ddb6-45a8-b83b-80b381666f0e","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"={{ $json.output }}","options":{"limitWaitTime":{"values":{"resumeUnit":"minutes","resumeAmount":45}}},"subject":"=🔥FOR APPROVAL🔥{{ $('Social Media Content Factory').item.json.output.name }} - {{ $('Social Media Content Factory').item.json.output.description }}","operation":"sendAndWait","approvalOptions":{"values":{"approvalType":"double"}}},"typeVersion":2.1},{"id":"930e76ac-6e9c-4a3f-9229-28ba18de25a3","name":"Approve Final Post Content","type":"n8n-nodes-base.gmail","disabled":true,"position":[980,380],"webhookId":"c46cf421-ddb6-45a8-b83b-80b381666f0e","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"=\n\n
\n\n
LinkedIn
\n      \n    \n
\n\n      \n
\n        \n
\n\n      \n
\n\n
\n          {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.post }}\n
\n        \n
\n          \n            {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.hashtags }}\n          \n
\n\n
\n          {{ $('Social Media Content Factory').item.json.output.platform_posts.LinkedIn.call_to_action }}\n
\n
\n
\n
\n\n\n","options":{"limitWaitTime":{"values":{"resumeUnit":"minutes","resumeAmount":45}}},"subject":"=🔥FOR APPROVAL🔥 New LinkedIn Post","operation":"sendAndWait","approvalOptions":{"values":{"approvalType":"double"}}},"typeVersion":2.1},{"id":"b42df164-47ae-4e08-9099-d0958dd41c8f","name":"Is Approved?","type":"n8n-nodes-base.if","position":[1160,20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"efe337a1-63e0-4513-873d-421bf41e4868","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.data.approved }}","rightValue":""}]}},"typeVersion":2.2},{"id":"e3193aef-d115-4c3b-87b2-b8ebd5bb0c05","name":"Instagram Result","type":"n8n-nodes-base.set","position":[2040,160],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"Instagram Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"6f8b248f-5c79-412c-81ef-3c52bef7f257","name":"X Result","type":"n8n-nodes-base.set","position":[2040,380],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"X Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"4c1ee118-aba1-4632-bd48-27cef9d5e272","name":"Facebook Result","type":"n8n-nodes-base.set","position":[2040,600],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"Facebook Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"490223f9-9b6a-4617-8829-c8e4b130feb7","name":"LinkedIn Result","type":"n8n-nodes-base.set","position":[2040,780],"parameters":{"options":{},"assignments":{"assignments":[{"id":"5c6edc76-1e3b-45b0-8baa-33a14c678150","name":"LinkedIn Post Result","type":"string","value":"={{ $json }}"}]}},"typeVersion":3.4},{"id":"9732c12e-903e-49ac-8d29-ffc4d78c7ff8","name":"Submit Social Post Details","type":"n8n-nodes-base.formTrigger","position":[-180,-740],"webhookId":"3e762442-715e-47e1-a65e-ae92085857ae","parameters":{"options":{"buttonLabel":"Automatically Generate Social Media Content"},"formTitle":"workflows.diy","formFields":{"values":[{"fieldLabel":"Topic","placeholder":"Provide a concise and clear title or main topic for your post (e.g., \"New Product Launch,\" \"Exciting Company Update\"). This helps the AI accurately capture the focus of your content.","requiredField":true},{"fieldLabel":"Keywords or Hashtags (optional)","placeholder":"Include any specific keywords or hashtags you'd like the AI to incorporate into the post. This ensures the content aligns with your branding and campaign objectives.","requiredField":"={{ false }}"},{"fieldLabel":"Link (optional)","placeholder":"=Provide the URL of any product, service, form, support page, or other resource. This link will be included in the generated post to direct your audience to the relevant content.\n"}]},"responseMode":"lastNode","formDescription":"=Welcome to the workflows.diy AI-Powered Assistant!\n\nThis tool is designed to streamline and enhance your social media content creation process.\n\nSimply provide key inputs like a topic or title and an optional image, and our intelligent agent will generate engaging, platform-specific post descriptions tailored to your audience. \n\nWhether you're a marketer, business owner, or influencer, this assistant saves you time while delivering professional-quality content optimized for maximum impact.\n\n"},"typeVersion":2.2},{"id":"1955b762-b9c4-4704-955b-093686e827bd","name":"Merge Results","type":"n8n-nodes-base.merge","onError":"continueRegularOutput","position":[2340,780],"parameters":{"numberInputs":4},"typeVersion":3,"alwaysOutputData":true},{"id":"6dc47749-eb49-4351-89aa-50f2b6c035bb","name":"Social Media Content Factory","type":"@n8n/n8n-nodes-langchain.agent","position":[300,-740],"parameters":{"text":"=You are a **content creation AI** for workflows.diy, a leading creator of **n8n workflow automation solutions and AI Agentic workflows**.\n\nYour goal is to craft **engaging, platform-specific content** for LinkedIn, Instagram, Facebook, Twitter (X), TikTok, Threads, and YouTube Shorts. Each post must align with the platform’s audience preferences, tone, and style while reflecting workflows.diy's expertise. The content should provide **value-driven insights**, tutorials, reviews, and discussions that resonate with tech professionals, automation enthusiasts, businesses, and n8n users.\n\n### Key Objectives:\n1. **Platform Optimization**: Tailor content format, tone, and hashtags to suit each platform’s algorithm and audience engagement patterns.\n2. **SEO & Hashtags**: Use a mix of general automation hashtags and trending platform-specific hashtags to maximize reach.\n3. **Engagement Focus**: Create content that sparks interaction through tutorials, comparisons, reviews, or thought-provoking discussions.\n4. **Consistency**: Maintain a professional yet approachable tone across all platforms while adapting to audience needs.\n5. **Data-Driven Strategy**: Analyze trends and performance data to refine content strategy and hashtag usage.\n\n### General Hashtags:\n#workflowsdiy #n8n #automation #AIWorkflows #WorkflowAutomation #TechSolutions\n\n---\n\n### Platform-Specific Guidelines:\n\n#### 1. LinkedIn\n   - **Style**: Professional and insightful.\n   - **Tone**: Business-oriented; focus on automation use cases, industry insights, and community impact.\n   - **Content Length**: 3-4 sentences; concise but detailed.\n   - **Hashtags**: #Innovation #Automation #WorkflowSolutions #DigitalTransformation #Leadership\n   - **Call to Action (CTA)**: Encourage comments or visits to workflows.diy’s website for more insights.\n\n#### 2. Instagram\n   - **Style**: Visual storytelling with creative captions.\n   - **Tone**: Inspirational and engaging; use emojis for relatability.\n   - **Content Length**: 2-3 sentences paired with eye-catching visuals (e.g., infographics or workflow demos).\n   - **Visuals**: Showcase milestones (e.g., new workflow launches), tutorials, or product highlights.\n   - **CTA**: Use phrases like \"Swipe to learn more,\" \"Tag your team,\" or \"Check out the link below!\"\n   - **Link Placement**: Add the provided link before hashtags; if no link is provided, use \"Visit our website: https://workflows.diy.\"\n   - **Hashtags**: #AutomationLife #TechInnovation #WorkflowTips #Programming #Engineering\n\n#### 3. Facebook\n   - **Style**: Friendly and community-focused.\n   - **Tone**: Relatable; highlight user success stories or company achievements in automation.\n   - **Content Length**: 2-3 sentences; conversational yet professional.\n   - **Hashtags**: #SmallBusinessAutomation #Entrepreneurship #Leadership #WorkflowInnovation\n   - **CTA**: Encourage likes, shares, comments (e.g., “What’s your favorite automation tip?”).\n\n#### 4. Twitter (X)\n   - **Style**: Concise and impactful.\n   - **Tone**: Crisp and engaging; spark curiosity in 150 characters or less.\n   - **Hashtags**: #WorkflowTrends #AIWorkflows #AutomationTips #NoCodeSolutions\n   - **CTA**: Drive quick engagement through retweets or replies (e.g., “What’s your go-to n8n workflow?”).\n\n#### 5. TikTok\n   - **Style**: Short-form video content with trending audio or effects.\n   - **Tone**: Fun yet informative; focus on quick workflow demos or automation tips.\n   - **Content Length**: 15-60 seconds with captions summarizing the key message.\n   - **Hashtags**: Use trending tech-related hashtags relevant to TikTok’s audience (e.g., #n8nTips).\n   - **CTA**: Encourage viewers to follow workflows.diy for more automation hacks.\n\n#### 6. Threads\n   - **Style**: Conversational and community-driven posts.\n   - **Tone**: Casual yet informative; encourage discussions around automation trends or innovations.\n   - **Content Length**: 1-2 short paragraphs with a question or thought-provoking statement at the end.\n   - **Hashtags**: Similar to Instagram but tailored for trending Threads topics related to automation.\n\n#### 7. YouTube Shorts\n   - **Style**: Short-form video content showcasing quick workflow tutorials or use cases.\n   - **Tone**: Authoritative yet approachable; establish workflows.diy as a leader in n8n automation solutions.\n   - Content Length:\n     - Tutorials/Reviews (long-form): 5-10 minutes\n     - Shorts/Highlights (short-form): Under 1 minute\n   - CTA:** Encourage subscriptions**, likes, comments (e.g., “Subscribe for more workflow tips!”).\n\n---\n\n### Content Creation Workflow:\nFor every post:\n1. Use the following input fields:\n    - Topic/About the Post: {{ $json.Topic }}\n    - Keywords/Focus Areas: {{ $json.formMode }}\n    - Link (optional): {{ $json['Link (optional)'] }}\n2. Adapt the tone/style based on the platform guidelines above.\n\nEnsure every post reflects workflows.diy's mission of delivering high-quality automation insights while maximizing engagement across platforms.\n\nFollow the provided JSON schema for your reponse.\n","options":{"systemMessage":"=Use the provided tools to research the topic based on latest information.  Todays date is {{ $now }}"},"promptType":"define","hasOutputParser":true},"retryOnFail":true,"typeVersion":1.7},{"id":"88c548bf-40e5-4b89-aef0-9233c3f5bc9c","name":"Prepare Content Review Email","type":"@n8n/n8n-nodes-langchain.agent","position":[1440,-740],"parameters":{"text":"=Generate clean, modern HTML email content from the provided JSON data with these requirements:\n- Use table-based layout with inline CSS for email compatibility\n- Create card sections for each platform containing:\n  • Title header (20px) \n  • Post content (16px) \n  • Video/image suggestions (italic 14px)\n  • Hashtag list (inline-block with # prefix)\n  • Emoji preservation where present\n  • Call-to-action (bold 14px)\n- Structure using:\n  • 600px max-width container\n  • 20px padding between cards\n  • Left-aligned text hierarchy\n  • Arial/sans-serif font stack\n  • Email-safe colors (#333 text, #555 secondary)\n- Include all platform-specific elements:\n  ▶ Video/image suggestions in italic\n  ▶ Hashtags as linked search terms\n  ▶ Emojis in original positions\n  ▶ Character limits for Twitter\n  ▶ Platform-specific CTAs\n  ▶ Visual quality reminders\n- Format hashtags as:\n  #tag\n\nInput data: {{ $json.output.toJsonString() }}\n\nRemove ALL code blocks and comments. Output ONLY the raw HTML with:\n- Platform cards in JSON order\n- All data elements represented\n- Mobile-responsive tables\n- W3C-valid markup\n\n## Example HTML:\n
\n\t\t

\n\t\t\t\n\t\t\t\t
\n\t\t\t\t\t

\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t

LinkedIn

Discover why n8n stands out as the premier workflow automation tool. Its flexibility and open-source nature empower businesses to create custom solutions that drive efficiency and innovation.

Video/Image suggestion pending

#Innovation#Automation#<wbr>WorkflowSolutions#<wbr>DigitalTransformation#<wbr>Leadership#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Visit workflows.diy to explore how n8n can transform your business processes!

Instagram

Eye-catching infographic comparing n8n to other automation tools, highlighting its unique features.

n8n: The ultimate workflow automation tool!  Unlock limitless possibilities with its open-source platform. Boost your productivity and streamline your processes.

#AutomationLife#TechInnovation<wbr>#WorkflowTips#Programming#<wbr>Engineering#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Visit our website: https://n8n.io/ #AutomationLife #TechInnovation #WorkflowTips #Programming #Engineering

Facebook

See why businesses are choosing n8n for their workflow automation needs. From its user-friendly interface to its powerful customization options, n8n is revolutionizing how companies approach automation.

A visually appealing graphic showcasing n8n's key features and benefits.

#SmallBusinessAutomation#<wbr>Entrepreneurship#Leadership#<wbr>WorkflowInnovation#<wbr>workflowsdiy#n8n#AIWorkflows#<wbr>WorkflowAutomation#<wbr>TechSolutions

What's your favorite automation tip? Share in the comments!

Twitter

n8n: The best #WorkflowAutomation tool! Open-source, customizable, and powerful. Transform your business processes today!

#WorkflowTrends#AIWorkflows#<wbr>AutomationTips#NoCodeSolutions<wbr>#workflowsdiy#n8n#<wbr>TechSolutions

TikTok

Quick demo showcasing how n8n simplifies complex workflows with its intuitive interface.

n8n: Your go-to for effortless workflow automation!

#n8nTips#workflowsdiy#n8n#<wbr>AIWorkflows#WorkflowAutomation<wbr>#TechSolutions

Follow workflows.diy for more automation hacks!

Threads

n8n is transforming the automation landscape. Its open-source nature and extensive integrations make it a top choice for businesses of all sizes. What are your thoughts on the future of workflow automation?

#workflowsdiy#n8n#AIWorkflows#<wbr>WorkflowAutomation#<wbr>TechSolutions

Share your insights below!

YouTube Shorts

Short tutorial demonstrating how to build a simple automation workflow in n8n.

Learn why n8n is the top choice for workflow automation. Its open-source platform and powerful features make it a game-changer for businesses.

#n8n#automation#<wbr>workflowautomation#nocode#<wbr>workflowsdiy#AIWorkflows#<wbr>TechSolutions

Subscribe for more workflow tips!

\n\t\t\t\t\t\t	\n\t\t\t\t\t
\n\t\t\t\t
\n
\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"3b074887-262f-47ab-b69c-c51b3a513993","name":"Prepare Results Email","type":"@n8n/n8n-nodes-langchain.agent","position":[0,380],"parameters":{"text":"=Parse the social media post results and generate a modern single line HTML table showing platform statuses. For each entry:\n\n-Extract platform name from the JSON key\n-Identify status (Success/Error) based on statusCode or error presence\n-Capture error message if present\n-Format as responsive HTML table with professional styling\n-Ensure email client compatibility with inline CSS\n-Include error handling for invalid JSON formats\n-Remove all line breaks and \\n from response.\n-Avoid any preamble or further explanation and remove all ``` and ```html from response.\n\n## Implementation Example:\nThis solution uses the parsed results from your workflow to generate:\n
\n
\n
\n            Platform	\n            Status	\n            Details	\n
\n
\n
\n
\n            Instagram	\n            ✗ Error	\n            Unsupported post request. Object with ID '[your-unique-id]' does not exist, cannot be loaded due to missing permissions.	\n
\n
\n            X (Twitter)	\n            ✗ Error	\n            Unable to sign without access token	\n
\n
\n            Facebook	\n            ✗ Error	\n            Unsupported post request. Object with ID '[your-unique-id]' does not exist, cannot be loaded due to missing permissions.	\n
\n
\n            LinkedIn	\n            ✗ Error	\n            Unable to sign without access token	\n
\n
\n
\n\n\nThis is the social media post results: \n{{ $json.data.toJsonString() }}\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"abb3994f-bf23-43f8-9c46-28795cfd2017","name":"Prepare Results Message","type":"@n8n/n8n-nodes-langchain.agent","position":[0,660],"parameters":{"text":"=Parse the social media post results and generate a brief summary of the results.\n\nThis is the social media post results: \n{{ $json.data.toJsonString() }}\n\n## Example Response:\nThe social media post results indicate multiple errors when attempting to access or post content on various platforms. \n\n1. Instagram: The response shows a 400 status code with an error message indicating that the specific post request is unsupported due to missing permissions or an invalid object ID. \n\n2. X Post: Success\n\n3. Facebook: Success \n\n4. LinkedIn: Also returned an 'Unable to sign without access token' error. \n\nOverall, access token issues and unsupported requests are frequent problems across these social media platforms.\n","agent":"conversationalAgent","options":{},"promptType":"define"},"typeVersion":1.7},{"id":"b4a4838a-83b0-4f28-a9f3-dea915228325","name":"Image Choice","type":"n8n-nodes-base.form","disabled":true,"position":[-620,-120],"webhookId":"0dc811ef-b2e0-4213-a0c9-e9b5fb9fcbf1","parameters":{"options":{"formTitle":"Generate Post Image","buttonLabel":"Submit"},"formFields":{"values":[{"fieldType":"file","fieldLabel":"Upload Image (optional)","multipleFiles":false,"acceptFileTypes":".jpg, .png, .jpeg"},{"fieldType":"dropdown","fieldLabel":"Generate Custom Image using AI Image Generator","fieldOptions":{"values":[{"option":"Yes"},{"option":"No"}]},"requiredField":true}]}},"typeVersion":1},{"id":"1cf97c10-e60f-4584-b069-3d4506868d8e","name":"Gmail Results","type":"n8n-nodes-base.gmail","position":[360,380],"webhookId":"0a81b95a-cd82-465d-8450-cf38518a4cbb","parameters":{"sendTo":"={{ $env.EMAIL_ADDRESS_JOE }} ","message":"={{ $json.output }}","options":{"appendAttribution":false},"subject":"🔥RESULTS🔥 Social Media Factory"},"typeVersion":2.1},{"id":"c845ae46-9d37-472b-ae0f-49fc6940e685","name":"Telegram Results","type":"n8n-nodes-base.telegram","position":[360,660],"webhookId":"bb40ede7-03cf-493d-b051-196b96725925","parameters":{"text":"={{ $json.output }}","chatId":"={{ $env.TELEGRAM_CHAT_ID }}","additionalFields":{"appendAttribution":false}},"typeVersion":1.2},{"id":"643b94c6-4535-4876-9660-d82ff69cbcf6","name":"Is Content Approved?","type":"n8n-nodes-base.if","position":[-240,-20],"parameters":{"options":{},"conditions":{"options":{"version":2,"leftValue":"","caseSensitive":true,"typeValidation":"strict"},"combinator":"and","conditions":[{"id":"e32d270f-f258-4522-94e1-2cb7ee4e8d2a","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.data.approved }}","rightValue":""}]}},"typeVersion":2.2},{"id":"fb7108e2-21cf-4df4-ab20-fe75b15b0a24","name":"Set Default True 2","type":"n8n-nodes-base.set","position":[980,20],"parameters":{"options":{},"assignments":{"assignments":[{"id":"f150aa79-2d20-4869-b60a-350d49a215a5","name":"data","type":"object","value":"={\n  \"approved\": true\n}"}]}},"typeVersion":3.4},{"id":"0a10bca0-c3a8-496b-a22e-120928ad7736","name":"SerpAPI","type":"@n8n/n8n-nodes-langchain.toolSerpApi","position":[460,-540],"parameters":{"options":{}},"typeVersion":1},{"id":"b21f527c-5674-49d0-a114-866d669e7ad6","name":"Rename Binary File","type":"n8n-nodes-base.code","position":[-620,120],"parameters":{"jsCode":"$input.first().binary.data = $input.first().binary.Upload_Image__optional_\ndelete $input.first().binary.Upload_Image__optional_\nreturn $input.first()"},"typeVersion":2,"alwaysOutputData":true}],"active":false,"settings":{"executionOrder":"v1"},"connections":{"Merge":{"main":[[{"node":"Set Default True 2","type":"main","index":0}]]},"Merge1":{"main":[[{"node":"Instagram Image","type":"main","index":0}]]},"Merge2":{"main":[[{"node":"Facebook Post","type":"main","index":0},{"node":"LinkedIn Post","type":"main","index":0}]]},"OpenAI":{"main":[[{"node":"Save Image to imgbb.com3","type":"main","index":0},{"node":"Merge","type":"main","index":1},{"node":"Merge2","type":"main","index":1}]]},"X Post":{"main":[[{"node":"X Result","type":"main","index":0}],[]]},"SerpAPI":{"ai_tool":[[{"node":"Social Media Content Factory","type":"ai_tool","index":0}]]},"X Result":{"main":[[{"node":"Merge Results","type":"main","index":1}]]},"Aggregate":{"main":[[{"node":"Prepare Results Email","type":"main","index":0},{"node":"Prepare Results Message","type":"main","index":0}]]},"gpt-4o LLM":{"ai_languageModel":[[{"node":"Social Media Content Factory","type":"ai_languageModel","index":0}]]},"gpt-4o-mini":{"ai_languageModel":[[{"node":"Prepare Content Review Email","type":"ai_languageModel","index":0}]]},"Image Choice":{"main":[[{"node":"Rename Binary File","type":"main","index":0}]]},"Is Approved?":{"main":[[{"node":"X Post","type":"main","index":0},{"node":"Merge1","type":"main","index":1},{"node":"Merge2","type":"main","index":0}],[]]},"gpt-4o-mini1":{"ai_languageModel":[[{"node":"Prepare Results Email","type":"ai_languageModel","index":0}]]},"gpt-4o-mini2":{"ai_languageModel":[[{"node":"Prepare Results Message","type":"ai_languageModel","index":0}]]},"Facebook Post":{"main":[[{"node":"Facebook Result","type":"main","index":0}],[]]},"LinkedIn Post":{"main":[[{"node":"LinkedIn Result","type":"main","index":0}],[]]},"Merge Results":{"main":[[{"node":"Aggregate","type":"main","index":0}]]},"Facebook Result":{"main":[[{"node":"Merge Results","type":"main","index":2}]]},"Instagram Image":{"main":[[{"node":"Instragram Post","type":"main","index":0}]]},"Instragram Post":{"main":[[{"node":"Instagram Result","type":"main","index":0}],[]]},"LinkedIn Result":{"main":[[{"node":"Merge Results","type":"main","index":3}]]},"pollinations.ai":{"main":[[]]},"Instagram Result":{"main":[[{"node":"Merge Results","type":"main","index":0}]]},"Google Gemini LLM":{"ai_languageModel":[[]]},"Set Default True 2":{"main":[[{"node":"Is Approved?","type":"main","index":0}]]},"Is Content Approved?":{"main":[[{"node":"OpenAI","type":"main","index":0}]]},"Social Media Content":{"ai_outputParser":[[{"node":"Social Media Content Factory","type":"ai_outputParser","index":0}]]},"Prepare Results Email":{"main":[[{"node":"Gmail Results","type":"main","index":0}]]},"Gmail User for Approval":{"main":[[{"node":"Is Content Approved?","type":"main","index":0}]]},"Prepare Results Message":{"main":[[{"node":"Telegram Results","type":"main","index":0}]]},"Save Image to imgbb.com3":{"main":[[{"node":"Merge","type":"main","index":0},{"node":"Merge1","type":"main","index":0}]]},"Approve Final Post Content":{"main":[[]]},"Submit Social Post Details":{"main":[[{"node":"Social Media Content Factory","type":"main","index":0}]]},"Prepare Content Review Email":{"main":[[{"node":"Gmail User for Approval","type":"main","index":0}]]},"Social Media Content Factory":{"main":[[{"node":"Prepare Content Review Email","type":"main","index":0}]]}}}


[System]
Tu es un expert n8n. Crée des workflows JSON complets et fonctionnels.
Utilise <thinking> pour expliquer ton raisonnement avant de générer le JSON.
Structure ton thinking: analyse du besoin, choix du trigger, architecture, flux de données, points d'attention.

[User] Crée un workflow n8n pour: This n8n template demonstrates how to use AI to generate custom images from scratch - fully automated, prompt-driven, and ready to deploy at scale. Use cases are many: You can use it for marketing visuals, character art, digital posters, storyboards, or even daily image generation for your personal purposes. How It Works The flow is triggered by a chat message in N8N or via Telegram. The default image size is 1080 x 1920 pixels. To use a different size, update the values in the “Fields - Set Values” node before triggering the workflow. The input is parsed into a clean, structured prompt using a multi-step transformation process. Our AI Agent sends the final prompt to Google Gemini’s image model for generation (you can also integrate with OpenAI or other chat models). The raw image data cre

[Assistant]
<thinking>
**Analyse du besoin**: This n8n template demonstrates how to use AI to generate custom images from scratch - fully automated, prompt-driven, and ready to deploy at scale.

Use cases are many: You can use it for marketing vi...

**Choix du trigger**: Sélection basée sur le cas d'usage décrit.

**Architecture**: 11 nodes utilisant ai, google, http.
Structure: code personnalisé, intégration IA.

**Flux de données**: Connexions définies entre les nodes pour assurer le passage des données.

**Points d'attention**: Vérifier les credentials, tester chaque node individuellement.
</thinking>

{"id":"cmncRJ2rlecEwZxU","meta":{"instanceId":"ed6d846a2fce1f660ede2e7da800724cca01dc3d0685524a3c917881b7cfcfe9"},"name":"[Agent Circle's N8N Workflow] Automated AI Image Creator","tags":[],"nodes":[{"id":"d5d1fe1b-f053-4162-adf4-5b52b409942d","name":"Fields - Set Values","type":"n8n-nodes-base.set","position":[240,100],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4e04fec4-441e-45f7-acea-0017a4b5c104","name":"model","type":"string","value":"flux"},{"id":"aa80cd68-1c82-4032-b1d7-e098856eec38","name":"width","type":"string","value":"1080"},{"id":"da6d305f-aece-49bd-ae02-52df59915c60","name":"height","type":"string","value":"1920"}]}},"typeVersion":3.4},{"id":"e108c56f-b7fb-4818-aed5-c55c59b81516","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[20,200],"webhookId":"5b347b5d-8f35-45b3-a499-de95153088f0","parameters":{"options":{}},"typeVersion":1.1},{"id":"7565ff7c-cfe7-4157-953b-74c1e66d659e","name":"Code - Clean Json","type":"n8n-nodes-base.code","position":[980,100],"parameters":{"jsCode":"function cleanAndExtractJSON(response) {\n    try {\n        const result = {\n            image_prompt: []\n        };\n\n        const lines = response.split('\\n');\n        let currentPrompt = '';\n\n        for (const line of lines) {\n            if (line.includes('\"prompt\":')) {\n                if (currentPrompt) {\n                    result.image_prompt.push(currentPrompt.trim());\n                }\n                currentPrompt = line.split('\"prompt\":')[1].trim();\n            }\n        }\n\n        if (currentPrompt) {\n            result.image_prompt.push(currentPrompt.trim());\n        }\n\n        return { json: result };\n        \n    } catch (error) {\n        return { \n            json: {\n                image_prompt: []\n            }\n        };\n    }\n}\n\nconst response = $input.first().json.output;\nreturn cleanAndExtractJSON(response);"},"executeOnce":false,"typeVersion":2,"alwaysOutputData":true},{"id":"8e33813d-bd34-46b9-91c8-89dac7f28add","name":"Code - Get Prompt","type":"n8n-nodes-base.code","position":[1160,100],"parameters":{"jsCode":"return $input.first().json.image_prompt.map(prompt => ({\n  json: {\n    body: {\n      prompt: prompt,\n  \"image_size\": {\n    \"width\": $('Fields - Set Values').first().json.width,\n    \"height\": $('Fields - Set Values').first().json.height\n  },\n  \"num_inference_steps\": 12,\n  \"guidance_scale\": 3.5,\n  \"num_images\": 1,\n  \"enable_safety_checker\": true,\n}\n    }\n  }\n));"},"typeVersion":2,"alwaysOutputData":true},{"id":"fba88baa-70e8-452c-b44e-d1685df0eb7d","name":"HTTP Request - Create Image","type":"n8n-nodes-base.httpRequest","position":[1600,100],"parameters":{"url":"=https://image.pollinations.ai/prompt/ {{ $('Code - Get Prompt').item.json.body.prompt }}","options":{},"jsonQuery":"={\n  \"width\": {{ $('Fields - Set Values').item.json.width }},\n  \"height\": {{ $('Fields - Set Values').item.json.height }},\n  \"model\": \"{{ $('Fields - Set Values').item.json.model }}\",\n  \"seed\": 42,\n  \"nologo\": true\n}","sendQuery":true,"sendHeaders":true,"specifyQuery":"json","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"Accept","value":"application/json"}]}},"retryOnFail":true,"typeVersion":4.2,"alwaysOutputData":true,"waitBetweenTries":5000},{"id":"25617f21-8d05-4ca2-9c16-5cd97e369bdb","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","disabled":true,"position":[20,0],"webhookId":"ff17baeb-3182-41c4-b60a-e6159b02023b","parameters":{"updates":["message"],"additionalFields":{}},"typeVersion":1.2},{"id":"de666684-e743-40ef-b604-1cff33b107de","name":"Code - Set Filename","type":"n8n-nodes-base.code","position":[1320,100],"parameters":{"jsCode":"for (let i = 0; i < items.length; i++) {\n  items[i].json.fileName = `images_${(i + 1).toString().padStart(3, '0')}.png`;\n}\nreturn items;"},"typeVersion":2},{"id":"e04c2a46-a670-4042-88d1-79207731c864","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[540,300],"parameters":{"options":{"topK":40,"topP":1,"temperature":0.5,"safetySettings":{"values":[{"category":"HARM_CATEGORY_HARASSMENT","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_HATE_SPEECH","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_SEXUALLY_EXPLICIT","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_NONE"}]},"maxOutputTokens":65536},"modelName":"models/gemini-2.0-flash"},"typeVersion":1},{"id":"3a150703-2a7f-4255-9da0-6a15c005290c","name":"AI Agent - Create Image From Prompt","type":"@n8n/n8n-nodes-langchain.agent","position":[540,100],"parameters":{"text":"={{ $('When chat message received').item.json.chatInput }}","options":{"systemMessage":"=You are an AI image‑prompt creation expert. Please create a post using the following JSON format:\nAI Image Generation Prompt Guidelines:\nObjective\nCreate highly realistic, high‐quality images\nEnsure the image content faithfully conveys the spirit of the original text\nIntegrate short text (10–20 characters) naturally into the image\nMaintain consistency and professionalism\n\nStandard Prompt Structure\n[Main Scene] | [Key Elements] | [Text Integration] | [Lighting & Atmosphere] | [Technical Parameters] | [Style Parameters]\n\nComponent Breakdown\n1. Main Scene (Weight ::8)\nDescribe the primary setting in line with the content.\nExamples:\nTech news: “modern tech office setting, minimalist workspace”\nEconomy news: “professional financial district, corporate environment”\nEducation news: “modern classroom, advanced learning environment”\n\n2. Key Elements (Weight ::8)\nList the main visual elements required.\nExamples:\n“large HD display showing text ‘AI Ethics’ in modern typography”\n“professional people in business attire discussing around interactive screen”\n“detailed infographic elements floating in augmented reality style”\n\n3. Text Integration (Weight ::7)\nHow to display text within the image:\ntext elements | elegant typography, clear readable text, integrated naturally into scene ::7\n\n4. Lighting & Atmosphere (Weight ::7)\nlighting | cinematic dramatic lighting, natural ambient light, professional studio setup ::7\nbackground | depth of field blur, clean professional environment ::6\n\n5. Technical Parameters\nparameters | 8k resolution, hyperrealistic, photorealistic quality, octane render, cinematic composition --ar 16:9\nsettings | sharp focus, high detail, professional photography --s 1000 --q 2\nComplete Examples\nExample 1: AI Ethics News\nprofessional tech conference room | large display showing \"AI Ethics Now\" in modern typography, group of diverse executives in discussion ::8 | clean modern workspace, glass walls, tech atmosphere ::7 | cinematic lighting, natural window light ::7 | 8k resolution, hyperrealistic quality, octane render --ar 16:9 --s 1000 --q 2\nExample 2: Financial Market News\nmodern stock exchange environment | giant LED wall showing \"Market Alert\" in bold typography, professional traders in action ::8 | dynamic financial data visualization, sleek modern interior ::7 | dramatic lighting, blue-tinted atmosphere ::7 | 8k resolution, photorealistic quality --ar 16:9 --s 1000 --q 2\n\nAdditional Parameters\n--chaos [0–100]: Adjust randomness\n--stylize [0–1000]: Degree of stylization\n--seed [number]: Ensure consistency across generations\n--niji: Optimized for Asian‐style aesthetics\n--v 5.2: Use the latest model version\n\nImportant Notes\nText in Image\nKeep it short and legible\nUse professional fonts\nIntegrate naturally into the scene\n\nComposition\nFollow the rule of thirds\nEnsure a clear focal point\nBalance text and imagery\n\nColor\nMatch a professional tone\nProvide sufficient contrast for readability\nMaintain visual consistency\n\nTechnical Details\nAlways use high resolution (8k)\nEnsure professional lighting\nOptimize for sharpness and detail\n\nCommon Pitfalls to Avoid\nOverly generic prompts\nMissing text‐integration guidance\nFailing to specify composition rules\nOmitting key technical parameters\n\nThe structure is:\n{\n  prompt_image {prompt : \"\" , ...}\n}"},"promptType":"define","hasOutputParser":true},"typeVersion":1.7},{"id":"a3e5fa40-51c1-41fa-83cb-d6d598f1ff49","name":"Telegram Response","type":"n8n-nodes-base.telegram","disabled":true,"position":[1820,0],"webhookId":"ca4806ac-202c-4709-92f9-6484397c17c4","parameters":{"operation":"sendPhoto","binaryData":true,"additionalFields":{}},"typeVersion":1.2},{"id":"f7059ea5-106b-4b73-8cb3-b0e10e1c0c13","name":"Save Image To Disk","type":"n8n-nodes-base.readWriteFile","disabled":true,"position":[1820,200],"parameters":{"options":{},"fileName":"=/files/{{ $('Code').item.json.fileName }}","operation":"write"},"typeVersion":1}],"active":false,"settings":{"executionOrder":"v1"},"connections":{"Telegram Trigger":{"main":[[{"node":"Fields - Set Values","type":"main","index":0}]]},"Code - Clean Json":{"main":[[{"node":"Code - Get Prompt","type":"main","index":0}]]},"Code - Get Prompt":{"main":[[{"node":"Code - Set Filename","type":"main","index":0}]]},"Code - Set Filename":{"main":[[{"node":"HTTP Request - Create Image","type":"main","index":0}]]},"Fields - Set Values":{"main":[[{"node":"AI Agent - Create Image From Prompt","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"AI Agent - Create Image From Prompt","type":"ai_languageModel","index":0}]]},"When chat message received":{"main":[[{"node":"Fields - Set Values","type":"main","index":0}]]},"HTTP Request - Create Image":{"main":[[{"node":"Save Image To Disk","type":"main","index":0},{"node":"Telegram Response","type":"main","index":0}]]},"AI Agent - Create Image From Prompt":{"main":[[{"node":"Code - Clean Json","type":"main","index":0}]]}}}


[System]
Tu es un expert n8n. Crée des workflows JSON complets et fonctionnels.
Utilise <thinking> pour expliquer ton raisonnement avant de générer le JSON.
Structure ton thinking: analyse du besoin, choix du trigger, architecture, flux de données, points d'attention.

[User] Génère un workflow n8n: Free AI Image Generator - n8n Automation Workflow with Gemini/ChatGPT

[Assistant]
<thinking>
**Analyse du besoin**: This n8n template demonstrates how to use AI to generate custom images from scratch - fully automated, prompt-driven, and ready to deploy at scale.

Use cases are many: You can use it for marketing vi...

**Choix du trigger**: Sélection basée sur le cas d'usage décrit.

**Architecture**: 11 nodes utilisant ai, google, http.
Structure: code personnalisé, intégration IA.

**Flux de données**: Connexions définies entre les nodes pour assurer le passage des données.

**Points d'attention**: Vérifier les credentials, tester chaque node individuellement.
</thinking>

{"id":"cmncRJ2rlecEwZxU","meta":{"instanceId":"ed6d846a2fce1f660ede2e7da800724cca01dc3d0685524a3c917881b7cfcfe9"},"name":"[Agent Circle's N8N Workflow] Automated AI Image Creator","tags":[],"nodes":[{"id":"d5d1fe1b-f053-4162-adf4-5b52b409942d","name":"Fields - Set Values","type":"n8n-nodes-base.set","position":[240,100],"parameters":{"options":{},"assignments":{"assignments":[{"id":"4e04fec4-441e-45f7-acea-0017a4b5c104","name":"model","type":"string","value":"flux"},{"id":"aa80cd68-1c82-4032-b1d7-e098856eec38","name":"width","type":"string","value":"1080"},{"id":"da6d305f-aece-49bd-ae02-52df59915c60","name":"height","type":"string","value":"1920"}]}},"typeVersion":3.4},{"id":"e108c56f-b7fb-4818-aed5-c55c59b81516","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[20,200],"webhookId":"5b347b5d-8f35-45b3-a499-de95153088f0","parameters":{"options":{}},"typeVersion":1.1},{"id":"7565ff7c-cfe7-4157-953b-74c1e66d659e","name":"Code - Clean Json","type":"n8n-nodes-base.code","position":[980,100],"parameters":{"jsCode":"function cleanAndExtractJSON(response) {\n    try {\n        const result = {\n            image_prompt: []\n        };\n\n        const lines = response.split('\\n');\n        let currentPrompt = '';\n\n        for (const line of lines) {\n            if (line.includes('\"prompt\":')) {\n                if (currentPrompt) {\n                    result.image_prompt.push(currentPrompt.trim());\n                }\n                currentPrompt = line.split('\"prompt\":')[1].trim();\n            }\n        }\n\n        if (currentPrompt) {\n            result.image_prompt.push(currentPrompt.trim());\n        }\n\n        return { json: result };\n        \n    } catch (error) {\n        return { \n            json: {\n                image_prompt: []\n            }\n        };\n    }\n}\n\nconst response = $input.first().json.output;\nreturn cleanAndExtractJSON(response);"},"executeOnce":false,"typeVersion":2,"alwaysOutputData":true},{"id":"8e33813d-bd34-46b9-91c8-89dac7f28add","name":"Code - Get Prompt","type":"n8n-nodes-base.code","position":[1160,100],"parameters":{"jsCode":"return $input.first().json.image_prompt.map(prompt => ({\n  json: {\n    body: {\n      prompt: prompt,\n  \"image_size\": {\n    \"width\": $('Fields - Set Values').first().json.width,\n    \"height\": $('Fields - Set Values').first().json.height\n  },\n  \"num_inference_steps\": 12,\n  \"guidance_scale\": 3.5,\n  \"num_images\": 1,\n  \"enable_safety_checker\": true,\n}\n    }\n  }\n));"},"typeVersion":2,"alwaysOutputData":true},{"id":"fba88baa-70e8-452c-b44e-d1685df0eb7d","name":"HTTP Request - Create Image","type":"n8n-nodes-base.httpRequest","position":[1600,100],"parameters":{"url":"=https://image.pollinations.ai/prompt/ {{ $('Code - Get Prompt').item.json.body.prompt }}","options":{},"jsonQuery":"={\n  \"width\": {{ $('Fields - Set Values').item.json.width }},\n  \"height\": {{ $('Fields - Set Values').item.json.height }},\n  \"model\": \"{{ $('Fields - Set Values').item.json.model }}\",\n  \"seed\": 42,\n  \"nologo\": true\n}","sendQuery":true,"sendHeaders":true,"specifyQuery":"json","headerParameters":{"parameters":[{"name":"Content-Type","value":"application/json"},{"name":"Accept","value":"application/json"}]}},"retryOnFail":true,"typeVersion":4.2,"alwaysOutputData":true,"waitBetweenTries":5000},{"id":"25617f21-8d05-4ca2-9c16-5cd97e369bdb","name":"Telegram Trigger","type":"n8n-nodes-base.telegramTrigger","disabled":true,"position":[20,0],"webhookId":"ff17baeb-3182-41c4-b60a-e6159b02023b","parameters":{"updates":["message"],"additionalFields":{}},"typeVersion":1.2},{"id":"de666684-e743-40ef-b604-1cff33b107de","name":"Code - Set Filename","type":"n8n-nodes-base.code","position":[1320,100],"parameters":{"jsCode":"for (let i = 0; i < items.length; i++) {\n  items[i].json.fileName = `images_${(i + 1).toString().padStart(3, '0')}.png`;\n}\nreturn items;"},"typeVersion":2},{"id":"e04c2a46-a670-4042-88d1-79207731c864","name":"Google Gemini Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatGoogleGemini","position":[540,300],"parameters":{"options":{"topK":40,"topP":1,"temperature":0.5,"safetySettings":{"values":[{"category":"HARM_CATEGORY_HARASSMENT","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_HATE_SPEECH","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_SEXUALLY_EXPLICIT","threshold":"BLOCK_NONE"},{"category":"HARM_CATEGORY_DANGEROUS_CONTENT","threshold":"BLOCK_NONE"}]},"maxOutputTokens":65536},"modelName":"models/gemini-2.0-flash"},"typeVersion":1},{"id":"3a150703-2a7f-4255-9da0-6a15c005290c","name":"AI Agent - Create Image From Prompt","type":"@n8n/n8n-nodes-langchain.agent","position":[540,100],"parameters":{"text":"={{ $('When chat message received').item.json.chatInput }}","options":{"systemMessage":"=You are an AI image‑prompt creation expert. Please create a post using the following JSON format:\nAI Image Generation Prompt Guidelines:\nObjective\nCreate highly realistic, high‐quality images\nEnsure the image content faithfully conveys the spirit of the original text\nIntegrate short text (10–20 characters) naturally into the image\nMaintain consistency and professionalism\n\nStandard Prompt Structure\n[Main Scene] | [Key Elements] | [Text Integration] | [Lighting & Atmosphere] | [Technical Parameters] | [Style Parameters]\n\nComponent Breakdown\n1. Main Scene (Weight ::8)\nDescribe the primary setting in line with the content.\nExamples:\nTech news: “modern tech office setting, minimalist workspace”\nEconomy news: “professional financial district, corporate environment”\nEducation news: “modern classroom, advanced learning environment”\n\n2. Key Elements (Weight ::8)\nList the main visual elements required.\nExamples:\n“large HD display showing text ‘AI Ethics’ in modern typography”\n“professional people in business attire discussing around interactive screen”\n“detailed infographic elements floating in augmented reality style”\n\n3. Text Integration (Weight ::7)\nHow to display text within the image:\ntext elements | elegant typography, clear readable text, integrated naturally into scene ::7\n\n4. Lighting & Atmosphere (Weight ::7)\nlighting | cinematic dramatic lighting, natural ambient light, professional studio setup ::7\nbackground | depth of field blur, clean professional environment ::6\n\n5. Technical Parameters\nparameters | 8k resolution, hyperrealistic, photorealistic quality, octane render, cinematic composition --ar 16:9\nsettings | sharp focus, high detail, professional photography --s 1000 --q 2\nComplete Examples\nExample 1: AI Ethics News\nprofessional tech conference room | large display showing \"AI Ethics Now\" in modern typography, group of diverse executives in discussion ::8 | clean modern workspace, glass walls, tech atmosphere ::7 | cinematic lighting, natural window light ::7 | 8k resolution, hyperrealistic quality, octane render --ar 16:9 --s 1000 --q 2\nExample 2: Financial Market News\nmodern stock exchange environment | giant LED wall showing \"Market Alert\" in bold typography, professional traders in action ::8 | dynamic financial data visualization, sleek modern interior ::7 | dramatic lighting, blue-tinted atmosphere ::7 | 8k resolution, photorealistic quality --ar 16:9 --s 1000 --q 2\n\nAdditional Parameters\n--chaos [0–100]: Adjust randomness\n--stylize [0–1000]: Degree of stylization\n--seed [number]: Ensure consistency across generations\n--niji: Optimized for Asian‐style aesthetics\n--v 5.2: Use the latest model version\n\nImportant Notes\nText in Image\nKeep it short and legible\nUse professional fonts\nIntegrate naturally into the scene\n\nComposition\nFollow the rule of thirds\nEnsure a clear focal point\nBalance text and imagery\n\nColor\nMatch a professional tone\nProvide sufficient contrast for readability\nMaintain visual consistency\n\nTechnical Details\nAlways use high resolution (8k)\nEnsure professional lighting\nOptimize for sharpness and detail\n\nCommon Pitfalls to Avoid\nOverly generic prompts\nMissing text‐integration guidance\nFailing to specify composition rules\nOmitting key technical parameters\n\nThe structure is:\n{\n  prompt_image {prompt : \"\" , ...}\n}"},"promptType":"define","hasOutputParser":true},"typeVersion":1.7},{"id":"a3e5fa40-51c1-41fa-83cb-d6d598f1ff49","name":"Telegram Response","type":"n8n-nodes-base.telegram","disabled":true,"position":[1820,0],"webhookId":"ca4806ac-202c-4709-92f9-6484397c17c4","parameters":{"operation":"sendPhoto","binaryData":true,"additionalFields":{}},"typeVersion":1.2},{"id":"f7059ea5-106b-4b73-8cb3-b0e10e1c0c13","name":"Save Image To Disk","type":"n8n-nodes-base.readWriteFile","disabled":true,"position":[1820,200],"parameters":{"options":{},"fileName":"=/files/{{ $('Code').item.json.fileName }}","operation":"write"},"typeVersion":1}],"active":false,"settings":{"executionOrder":"v1"},"connections":{"Telegram Trigger":{"main":[[{"node":"Fields - Set Values","type":"main","index":0}]]},"Code - Clean Json":{"main":[[{"node":"Code - Get Prompt","type":"main","index":0}]]},"Code - Get Prompt":{"main":[[{"node":"Code - Set Filename","type":"main","index":0}]]},"Code - Set Filename":{"main":[[{"node":"HTTP Request - Create Image","type":"main","index":0}]]},"Fields - Set Values":{"main":[[{"node":"AI Agent - Create Image From Prompt","type":"main","index":0}]]},"Google Gemini Chat Model":{"ai_languageModel":[[{"node":"AI Agent - Create Image From Prompt","type":"ai_languageModel","index":0}]]},"When chat message received":{"main":[[{"node":"Fields - Set Values","type":"main","index":0}]]},"HTTP Request - Create Image":{"main":[[{"node":"Save Image To Disk","type":"main","index":0},{"node":"Telegram Response","type":"main","index":0}]]},"AI Agent - Create Image From Prompt":{"main":[[{"node":"Code - Clean Json","type":"main","index":0}]]}}}