8
n8n 한국어amn8n.com

DALL·E 2를 사용하여 여러 AI 이미지 생성 및 Google Drive에 업로드

중급

이것은Content Creation, Multimodal AI분야의자동화 워크플로우로, 9개의 노드를 포함합니다.주로 Set, Code, GoogleDrive, ManualTrigger, SplitInBatches 등의 노드를 사용하며. DALL·E 2를 사용하여 여러 AI 이미지 생성 및 Google Drive에 업로드

사전 요구사항
  • Google Drive API 인증 정보
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "efb474b59b0341d7791932605bd9ff04a6c7ed9941fdd53dc4a2e4b99a6f9439",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "8ddca1c1-52d0-45cb-907c-370ebeb83d51",
      "name": "이미지 생성",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        580,
        1160
      ],
      "parameters": {
        "model": "dall-e-2",
        "prompt": "={{ $json.Prompt }}",
        "options": {},
        "resource": "image"
      },
      "credentials": {
        "openAiApi": {
          "id": "ghJTvay8CvwXDsXz",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "ac845ad4-c1ff-4453-8f10-db73ada7cdb4",
      "name": "항목 반복",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        140,
        1040
      ],
      "parameters": {
        "options": {
          "reset": false
        }
      },
      "typeVersion": 3
    },
    {
      "id": "bf507544-ab85-4085-ac56-d045300416be",
      "name": "워크플로 시작",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -720,
        1200
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0fef42ed-00c4-4423-b47d-d4c07fba67c4",
      "name": "이미지 프롬프트 설정",
      "type": "n8n-nodes-base.set",
      "position": [
        -540,
        1180
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5f36bc2b-9acb-4159-b9c3-98a6f9650787",
              "name": "Prompt",
              "type": "string",
              "value": "Make an image of an attractive woman standing in new york city"
            },
            {
              "id": "e5823995-d822-4f59-b580-c9efaabc465c",
              "name": "Name",
              "type": "string",
              "value": "woman-nyc"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "ec758170-36d8-44c8-b811-92ba4e79e03f",
      "name": "Google Drive에 업로드",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        520,
        920
      ],
      "parameters": {
        "name": "={{ $('Set Image Prompt').item.json.Name }} - {{ $('Duplicate Rows').item.json.run }}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive",
          "cachedResultUrl": "https://drive.google.com/drive/my-drive",
          "cachedResultName": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1TnDibwPPPUm3VbmETiqWDVhtaUTLJ6mn",
          "cachedResultName": "n8n workflows"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "F8pcQfETw4ZdO2ii",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "59bc4b98-3b8c-46fb-8d19-b374031b0753",
      "name": "행 복제",
      "type": "n8n-nodes-base.code",
      "position": [
        -300,
        1180
      ],
      "parameters": {
        "jsCode": "const original = items[0].json;\n\nreturn [\n  { json: { ...original, run: 1 } },\n  { json: { ...original, run: 2 } },\n  { json: { ...original, run: 3 } },\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "d527b2bd-4e45-4c57-83d2-20906e8d331d",
      "name": "스티커 메모",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -80
      ],
      "parameters": {
        "color": 3,
        "width": 800,
        "height": 1480,
        "content": "\n## Step-by-Step Setup Instructions\n\n### 1. Prepare Your API Keys\n- **OpenAI API Key**  \n  1. Sign up or log in at https://platform.openai.com/  \n  2. Go to **API Keys** and create a new one.  \n  3. Copy and store this securely — you'll need it in n8n.\n\n- **Google Drive API**  \n  1. Go to https://console.cloud.google.com/  \n  2. Create a project and enable **Google Drive API**.  \n  3. Create OAuth 2.0 credentials and set the redirect URI to your n8n OAuth redirect (found in your n8n Google Drive node setup).  \n  4. Connect your Google account when adding credentials in n8n.\n\n---\n\n### 2. Workflow Nodes Overview\n1. **Manual Trigger** – Starts the workflow manually.  \n2. **Set Image Prompt** – Stores the prompt text and base file name (e.g., “Make an image of an attractive woman standing in New York City”).  \n3. **Duplicate Rows (Code Node)** – Creates multiple \"runs\" of the same prompt for variation.  \n4. **Loop Over Items** – Processes each variation one at a time.  \n5. **Generate an image (OpenAI DALL·E 2)** – Sends the prompt to OpenAI and retrieves an image.  \n6. **Upload to Google Drive** – Saves each generated image to your chosen Google Drive folder.\n\n---\n\n### 3. Building the Workflow in n8n\n\n#### Step 1 — Manual Trigger\nAdd a **Manual Trigger** node to start the workflow manually when testing.\n\n#### Step 2 — Set Image Prompt\nAdd a **Set** node with two fields:  \n- `Prompt` → The image description text.  \n- `Name` → The base name for the saved file.  \n\nExample:  \n| Name   | Value                                                         |\n|--------|---------------------------------------------------------------|\n| Prompt | Make an image of an attractive woman standing in New York City |\n| Name   | woman-nyc                                                      |\n\n#### Step 3 — Duplicate Rows (Code Node)\nUse this JavaScript to create three copies of the prompt (run 1, run 2, run 3):\n```javascript\nconst original = items[0].json;\n\nreturn [\n  { json: { ...original, run: 1 } },\n  { json: { ...original, run: 2 } },\n  { json: { ...original, run: 3 } },\n];"
      },
      "typeVersion": 1
    },
    {
      "id": "20820668-9612-47e2-9bda-0928f2391ea0",
      "name": "스티커 메모1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        20,
        -80
      ],
      "parameters": {
        "color": 5,
        "width": 800,
        "height": 1480,
        "content": "#### Step 4 — Loop Over Items\nInsert a **Split in Batches** node and set the batch size to `1`. This ensures each prompt variation runs through the image generation process individually. Connect this node so it runs after the **Duplicate Rows** node.\n\n#### Step 5 — Generate Image\nAdd the **OpenAI Image Generation** node and configure it as follows:\n- **Model**: `dall-e-2`\n- **Prompt**: `={{ $json.Prompt }}`\n- Leave other options at their defaults unless you want to specify image size or style.\n- Connect your **OpenAI API** credentials created in Step 1.\n\nThis node will send the current prompt in the batch to OpenAI's DALL·E 2 model and return an AI-generated image.\n\n#### Step 6 — Upload to Google Drive\nAdd a **Google Drive** node and configure it to store the generated image:\n- **File Name**:  \n  `={{ $('Set Image Prompt').item.json.Name }} - {{ $('Duplicate Rows').item.json.run }}`\n- **Folder ID**: Select the target Google Drive folder where images should be saved.\n- Connect your **Google Drive OAuth2 API** credentials.\n\nThe node will upload each generated image to your chosen Google Drive location, with a unique filename for each variation.\n\n---\n\n### Running the Workflow\n1. Execute the workflow manually.\n2. The process will:\n   - Loop through each prompt variation.\n   - Generate an image using OpenAI DALL·E 2.\n   - Upload the image to Google Drive with a unique name.\n3. You will find all generated images in the selected Google Drive folder.\n\n---\n\n### Customization Tips\n- Change the number of variations by editing the **Duplicate Rows** code.\n- Adjust the prompt dynamically from other data sources like Google Sheets, webhooks, or forms.\n- Schedule the workflow to run at specific times or trigger it via an API call.\n\n---\n"
      },
      "typeVersion": 1
    },
    {
      "id": "56f4ecd2-8c37-4744-b7bb-c5d1cd51c37a",
      "name": "스티커 메모2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -800,
        -220
      ],
      "parameters": {
        "width": 1600,
        "height": 100,
        "content": "**Need more help?**  \nWebsite: https://ynteractive.com  \nEmail: robert@ynteractive.com"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "59bc4b98-3b8c-46fb-8d19-b374031b0753": {
      "main": [
        [
          {
            "node": "ac845ad4-c1ff-4453-8f10-db73ada7cdb4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bf507544-ab85-4085-ac56-d045300416be": {
      "main": [
        [
          {
            "node": "0fef42ed-00c4-4423-b47d-d4c07fba67c4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ac845ad4-c1ff-4453-8f10-db73ada7cdb4": {
      "main": [
        [
          {
            "node": "ec758170-36d8-44c8-b811-92ba4e79e03f",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "8ddca1c1-52d0-45cb-907c-370ebeb83d51",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "0fef42ed-00c4-4423-b47d-d4c07fba67c4": {
      "main": [
        [
          {
            "node": "59bc4b98-3b8c-46fb-8d19-b374031b0753",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8ddca1c1-52d0-45cb-907c-370ebeb83d51": {
      "main": [
        [
          {
            "node": "ac845ad4-c1ff-4453-8f10-db73ada7cdb4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

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

유료인가요?

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

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

일정 경험을 가진 사용자를 위한 6-15개 노드의 중간 복잡도 워크플로우

저자
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34