8
n8n 한국어amn8n.com

Gmail 이메일 분류기와 GPT-4 자동 원고 답변 생성

중급

이것은Miscellaneous, AI Summarization, Multimodal AI분야의자동화 워크플로우로, 15개의 노드를 포함합니다.주로 Gmail, GmailTrigger, OpenAi, LmChatOpenAi, TextClassifier 등의 노드를 사용하며. Gmail 메일 분류기, GPT-4로 자동으로 초안 답변 생성

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "yleYtr2zaJKjyMOK",
  "meta": {
    "instanceId": "ad59d09d8e026d0e92690243618d86d51b0293b236148394ca356eae1d1ea59b",
    "templateCredsSetupCompleted": true
  },
  "name": "Gmail Email Classifier with GPT-4 Auto-Generated Draft Replies",
  "tags": [
    {
      "id": "eFlPj8ZRT4LrlBD1",
      "name": "Automation",
      "createdAt": "2025-09-09T16:15:06.029Z",
      "updatedAt": "2025-09-09T16:15:06.029Z"
    },
    {
      "id": "hjzY8e2beJ4ByFSh",
      "name": "Email Automation",
      "createdAt": "2025-09-09T16:15:20.964Z",
      "updatedAt": "2025-09-09T16:15:20.964Z"
    }
  ],
  "nodes": [
    {
      "id": "d388e4be-fe23-4f1b-919b-e9d19338750a",
      "name": "Gmail 트리거",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -912,
        128
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyX",
              "unit": "minutes",
              "value": 15
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fabeeec9-9900-44c9-9737-331d5eb1e927",
      "name": "라벨: 높은 우선순위",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -336,
        -64
      ],
      "webhookId": "6b53c731-5582-4537-a1ca-bf040a991736",
      "parameters": {
        "labelIds": [
          "YOUR_LABEL_ID_HIGH_PRIORITY"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "typeVersion": 2.1
    },
    {
      "id": "f6879258-e119-437f-8d07-9c9e9fb4977b",
      "name": "초안 저장: 높은 우선순위",
      "type": "n8n-nodes-base.gmail",
      "options": {
        "allowUnauthorizedCerts": false
      },
      "position": [
        240,
        -64
      ],
      "webhookId": "e173ab5a-612c-44d0-ae80-a565c08b901b",
      "parameters": {
        "message": "{{ JSON.parse($json.message.content)['message'] || $json.message.content }}",
        "options": {
          "threadId": "={{ $('Gmail Trigger').item.json.threadId }}"
        },
        "subject": "{{ JSON.parse($json.message.content)['subject'] || `Re: ${$('Gmail Trigger').item.json.subject}` }}",
        "resource": "draft"
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "56d6cee5-34e0-4011-acf0-a8fa6edeadc5",
      "name": "라벨: 문의",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -336,
        128
      ],
      "webhookId": "6b53c731-5582-4537-a1ca-bf040a991736",
      "parameters": {
        "labelIds": [
          "YOUR_LABEL_ID_INQUIRY"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d544643d-faf5-4b22-b534-34d26950f0a2",
      "name": "초안 저장: 문의",
      "type": "n8n-nodes-base.gmail",
      "options": {
        "allowUnauthorizedCerts": false
      },
      "position": [
        240,
        128
      ],
      "webhookId": "e173ab5a-612c-44d0-ae80-a565c08b901b",
      "parameters": {
        "message": "{{ JSON.parse($json.message.content)['message'] || $json.message.content }}",
        "options": {
          "threadId": "={{ $('Gmail Trigger').item.json.threadId }}"
        },
        "subject": "{{ JSON.parse($json.message.content)['subject'] || `Re: ${$('Gmail Trigger').item.json.subject}` }}",
        "resource": "draft"
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "c07969cc-6dcd-44c0-9a1c-63d20dc61e4b",
      "name": "라벨: 재무/결제",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -336,
        320
      ],
      "webhookId": "6b53c731-5582-4537-a1ca-bf040a991736",
      "parameters": {
        "labelIds": [
          "YOUR_LABEL_ID_FINANCE"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "typeVersion": 2.1
    },
    {
      "id": "712a6f08-8f71-4c13-8acb-b39b11d9f293",
      "name": "초안 저장: 재무/결제",
      "type": "n8n-nodes-base.gmail",
      "options": {
        "allowUnauthorizedCerts": false
      },
      "position": [
        240,
        320
      ],
      "webhookId": "e173ab5a-612c-44d0-ae80-a565c08b901b",
      "parameters": {
        "message": "{{ JSON.parse($json.message.content)['message'] || $json.message.content }}",
        "options": {
          "threadId": "={{ $('Gmail Trigger').item.json.threadId }}"
        },
        "subject": "{{ JSON.parse($json.message.content)['subject'] || `Re: ${$('Gmail Trigger').item.json.subject}` }}",
        "resource": "draft"
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "4cb47a6d-3e08-4a2f-b18f-af56ab5fd1d7",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -112,
        512
      ],
      "parameters": {
        "content": "## Add your OpenAI API Key under \"Credentials\".\n"
      },
      "typeVersion": 1
    },
    {
      "id": "9654f73d-d725-4c6c-a41e-9711da06f5c8",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -992,
        304
      ],
      "parameters": {
        "content": "## Connect your Gmail account under \"Credentials\"."
      },
      "typeVersion": 1
    },
    {
      "id": "92db5bbe-37bb-4edb-9637-5560b093b53e",
      "name": "스티커 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        512
      ],
      "parameters": {
        "width": 288,
        "height": 192,
        "content": "## Replace YOUR_LABEL_ID_XXX\n with your Gmail label IDs (get them via Gmail → List Labels)."
      },
      "typeVersion": 1
    },
    {
      "id": "9347757e-ae21-44b3-9a66-9b158e9496ed",
      "name": "Gmail 카테고리 분류기",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -688,
        128
      ],
      "parameters": {
        "options": {},
        "inputText": "={{ $json.text }}",
        "categories": {
          "categories": [
            {
              "category": "High Priority",
              "description": "Urgent matters requiring immediate attention: deadline/requirements changes, incident reports, or escalations from executives/key clients."
            },
            {
              "category": "Promotions",
              "description": "Newsletters, sales, and event ads. No urgent action required."
            },
            {
              "category": "Inquiry",
              "description": "Questions/requests from customers or teammates. Aim to reply within 24–48h with a clear answer."
            },
            {
              "category": "Finance/Billing",
              "description": "Invoices/quotes/payments/receipts/due dates. Handle in order of due date."
            }
          ]
        }
      },
      "typeVersion": 1.1
    },
    {
      "id": "b79ab780-f6a2-4d29-a6da-2f05f38ac271",
      "name": "초안 생성: 높은 우선순위",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "options": {
        "continueOnFail": true
      },
      "position": [
        -112,
        -64
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are an Executive Assistant. Goal: Draft a fast, accurate reply for emails classified as \"High Priority\". Input email body: {{ $('Gmail Trigger').item.json.text }} Output a JSON object: {\"subject\":\"...\",\"message\":\"...\"}. Rules: (1) Start with a short summary and list clarifying questions (requirements/deadline/unknowns). (2) Provide an initial/provisional answer where possible. (3) Default subject format: \"Re: {{ $('Gmail Trigger').item.json.subject }} | Action & Clarifications\" (adjust if needed). Keep tone concise and professional."
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "bc2956b4-4789-4747-854d-f3bc937cec23",
      "name": "초안 생성: 문의",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "options": {
        "continueOnFail": true
      },
      "position": [
        -112,
        128
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a Customer Support agent. Goal: Draft a polite, complete reply to an \"Inquiry\" email. Input: {{ $('Gmail Trigger').item.json.text }} Output JSON: {\"subject\":\"...\",\"message\":\"...\"}. Structure: (1) Brief summary of the ask, (2) Direct answer/steps, (3) Next actions and expected timeline, (4) Optional links to FAQ/help. Add a simple signature. Default subject: \"Re: {{ $('Gmail Trigger').item.json.subject }} | Response to Your Question\"."
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "955978cc-acde-4413-a11a-c197893d7ce8",
      "name": "초안 생성: 재무/결제",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "options": {
        "continueOnFail": true
      },
      "position": [
        -112,
        320
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are a Finance Assistant. Goal: Draft a precise reply for \"Finance/Billing\" emails. Input: {{ $('Gmail Trigger').item.json.text }} Output JSON: {\"subject\":\"...\",\"message\":\"...\"}. Rules: (1) Confirm key fields in bullets (amount, due date, bank info, invoice/PO numbers), (2) Request any missing docs (quote/PO/delivery note/receipt), (3) State due date or next step clearly. Default subject: \"Re: {{ $('Gmail Trigger').item.json.subject }} | Billing Clarifications\"."
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "5ea6f7ea-2b75-4038-8f1e-4bb1d0cc473d",
      "name": "LLM 지원 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -624,
        416
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini"
        },
        "options": {}
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "b8cb7ddb-65c0-4ca6-94b9-7d23cb801b2e",
  "connections": {
    "d388e4be-fe23-4f1b-919b-e9d19338750a": {
      "main": [
        [
          {
            "node": "9347757e-ae21-44b3-9a66-9b158e9496ed",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "56d6cee5-34e0-4011-acf0-a8fa6edeadc5": {
      "main": [
        [
          {
            "node": "bc2956b4-4789-4747-854d-f3bc937cec23",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "5ea6f7ea-2b75-4038-8f1e-4bb1d0cc473d": {
      "ai_languageModel": [
        [
          {
            "node": "9347757e-ae21-44b3-9a66-9b158e9496ed",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "fabeeec9-9900-44c9-9737-331d5eb1e927": {
      "main": [
        [
          {
            "node": "b79ab780-f6a2-4d29-a6da-2f05f38ac271",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c07969cc-6dcd-44c0-9a1c-63d20dc61e4b": {
      "main": [
        [
          {
            "node": "955978cc-acde-4413-a11a-c197893d7ce8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "bc2956b4-4789-4747-854d-f3bc937cec23": {
      "main": [
        [
          {
            "node": "d544643d-faf5-4b22-b534-34d26950f0a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9347757e-ae21-44b3-9a66-9b158e9496ed": {
      "main": [
        [
          {
            "node": "fabeeec9-9900-44c9-9737-331d5eb1e927",
            "type": "main",
            "index": 0
          }
        ],
        [],
        [
          {
            "node": "56d6cee5-34e0-4011-acf0-a8fa6edeadc5",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "c07969cc-6dcd-44c0-9a1c-63d20dc61e4b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b79ab780-f6a2-4d29-a6da-2f05f38ac271": {
      "main": [
        [
          {
            "node": "f6879258-e119-437f-8d07-9c9e9fb4977b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "955978cc-acde-4413-a11a-c197893d7ce8": {
      "main": [
        [
          {
            "node": "712a6f08-8f71-4c13-8acb-b39b11d9f293",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 기타, AI 요약, 멀티모달 AI

유료인가요?

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

워크플로우 정보
난이도
중급
노드 수15
카테고리3
노드 유형6
난이도 설명

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

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34