8
n8n 한국어amn8n.com

[Agent Circle의 N8N 워크플로우] 자동화된 AI 이미지 생성기

고급

이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 16개의 노드를 포함합니다.주로 Set, Code, Telegram, HttpRequest, ReadWriteFile 등의 노드를 사용하며. 무료 AI 이미지 생성기 - Gemini/ChatGPT 기반 n8n 자동화 워크플로우

사전 요구사항
  • Telegram Bot Token
  • 대상 API의 인증 정보가 필요할 수 있음
  • Google Gemini API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "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 - 값 설정",
      "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 - 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 - 프롬프트 가져오기",
      "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 - 이미지 생성",
      "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 - 파일명 설정",
      "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"
      },
      "credentials": {
        "googlePalmApi": {
          "id": "AlDwotqhFT4EfJXQ",
          "name": "Google Gemini(PaLM) Api - toan.ngo"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d2d0e95d-797e-473c-a70f-d8c4cccd32af",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -680,
        -760
      ],
      "parameters": {
        "width": 520,
        "height": 1480,
        "content": "## [Agent Circle's N8N Workflow] Automated AI Image Creator - Try It Out!\n\n**This n8n template demonstrates how to use AI to generate custom images from scratch - fully automated, prompt-driven, and ready to deploy at scale.**\n\nUse cases are many: You can use it for marketing visuals, character art, digital posters, storyboards, or even daily image generation for your personal purposes.\n\n## How It Works\n- 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.\n- The input is parsed into a clean, structured prompt using a multi-step transformation process.\n- 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).\n- The raw image data created by the AI Agent will be run through a number of codes to make sure it's feasible for your preview if needed and downloading.\n- Then, we use an HTTP node to fetch the result so you can preview the image.\n- You can send it back to the chat message in N8N or Telegram, or save it locally to your disk.\n\n## How To Use\n- Download the workflow package.\n- Import the package into your N8N interface.\n- Set up the credentials in the following nodes for tool access and usability: **\"Telegram Trigger\"**; **\"AI Agent - Create Image From Prompt\"**; **\"Telegram Response\"** or **\"Save Image To Disk\"** (based on your wish).\n- Activate the **\"Telegram Response\"** OR **\"Save Image To Disk\"** node to specify where you want to save your image later.\n- Open the chat interface (via N8N or Telegram).\n- Type your image prompt or detailed descriptions and send.\n- Wait for the process to run and finish in a few seconds.\n- Check the result in your desired saving location.\n\n## Requirements\n- Google Gemini account with image generation access.\n- Telegram bot access and chat setup (optional).\n- Connection to local storage (optional).\n\n## How To Customize\n- We’re setting the default image size to 1080 x 1920 pixels and the default image model to \"flux\". You can customize both of these values in the **“Fields – Set Values”** node. Supported image model options include: \"flux\", \"kontext\", \"turbo\", and \"gptimage\".\n- In the **“AI Agent – Create Image From Prompt”** node, you can also change the AI chat model. By default, it uses Google Gemini, but you can easily replace it with OpenAI ChatGPT, Microsoft AI Copilot, or any other compatible provider.\n\n## Need Help?\nJoin our community on different platforms for support, inspiration and tips from others.\n\nWebsite: https://www.agentcircle.ai/\nDiscord Global: https://discord.com/invite/jySQ2PNm\nFB Page Global: https://www.facebook.com/agentcircle/\nFB Group Global: https://www.facebook.com/groups/aiagentcircle/\nGumroad: http://agentcircle.gumroad.com/\nX: https://x.com/agent_circle\nYouTube: https://www.youtube.com/@agentcircle\nLinkedIn: https://www.linkedin.com/company/agentcircle"
      },
      "typeVersion": 1
    },
    {
      "id": "cb6fb57a-e3c1-45ff-9b81-4a2152f397fc",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 440,
        "height": 620,
        "content": "## **1. Get The Inputs**\nWe’ll take your image idea from the text you send in the chat, along with any settings like image size or style. This information is parsed and prepared for the image generation step.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "876439a4-dbfe-4394-96d7-8f6c8a63778d",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        460,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 420,
        "height": 620,
        "content": "## **2. Use Google Gemini's Image Model To Generate The Image**\nYour prompt and settings are sent to Google Gemini’s Image Generation Model.\nPrefer a different model? You can easily swap in alternatives like OpenAI ChatGPT or Microsoft Copilot.\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "ac07f44c-c881-4d80-bd65-a8aa0ce39375",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1540,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 540,
        "height": 620,
        "content": "## **4. Preview And Save The Image**\nOnce your image is ready in a downloadable format, you’ll be able to preview it. If you're happy with the result, you can save it in one of two ways by activating either of them before running the workflow:\n- As a reply in Telegram chat\n- To your local storage (disk)\n\n\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fdd981c2-2659-4a31-b37f-b5c4cd51ee3c",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        940,
        -200
      ],
      "parameters": {
        "color": 7,
        "width": 520,
        "height": 620,
        "content": "## **3. Prepare The Final Image Feasible For Preview And Saving**\nThis stage helps to clean up the raw output from the AI Agent for your image request and format it into a complete, ready-to-view and downloadable format. \n"
      },
      "typeVersion": 1
    },
    {
      "id": "3a150703-2a7f-4255-9da0-6a15c005290c",
      "name": "AI Agent - 프롬프트로 이미지 생성",
      "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": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "haaaQCcDSaJAtymy",
          "name": "Telegram account - hoanglt"
        }
      },
      "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,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "4f99fd43-197e-47dc-8a5a-5a4c85fdebe9",
  "connections": {
    "25617f21-8d05-4ca2-9c16-5cd97e369bdb": {
      "main": [
        [
          {
            "node": "d5d1fe1b-f053-4162-adf4-5b52b409942d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "7565ff7c-cfe7-4157-953b-74c1e66d659e": {
      "main": [
        [
          {
            "node": "8e33813d-bd34-46b9-91c8-89dac7f28add",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8e33813d-bd34-46b9-91c8-89dac7f28add": {
      "main": [
        [
          {
            "node": "de666684-e743-40ef-b604-1cff33b107de",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "de666684-e743-40ef-b604-1cff33b107de": {
      "main": [
        [
          {
            "node": "fba88baa-70e8-452c-b44e-d1685df0eb7d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d5d1fe1b-f053-4162-adf4-5b52b409942d": {
      "main": [
        [
          {
            "node": "3a150703-2a7f-4255-9da0-6a15c005290c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e04c2a46-a670-4042-88d1-79207731c864": {
      "ai_languageModel": [
        [
          {
            "node": "3a150703-2a7f-4255-9da0-6a15c005290c",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "e108c56f-b7fb-4818-aed5-c55c59b81516": {
      "main": [
        [
          {
            "node": "d5d1fe1b-f053-4162-adf4-5b52b409942d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fba88baa-70e8-452c-b44e-d1685df0eb7d": {
      "main": [
        [
          {
            "node": "f7059ea5-106b-4b73-8cb3-b0e10e1c0c13",
            "type": "main",
            "index": 0
          },
          {
            "node": "a3e5fa40-51c1-41fa-83cb-d6d598f1ff49",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "3a150703-2a7f-4255-9da0-6a15c005290c": {
      "main": [
        [
          {
            "node": "7565ff7c-cfe7-4157-953b-74c1e66d659e",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

이 워크플로우를 어떻게 사용하나요?

위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.

이 워크플로우는 어떤 시나리오에 적합한가요?

고급 - 콘텐츠 제작, 멀티모달 AI

유료인가요?

이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.

워크플로우 정보
난이도
고급
노드 수16
카테고리2
노드 유형10
난이도 설명

고급 사용자를 위한 16+개 노드의 복잡한 워크플로우

저자
Agent Circle

Agent Circle

@agentcircle

Agent Circle - A growing marketplace of AI agents, workflows, and toolkits — built to help teams automate smarter and scale faster

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34