8
n8n 한국어amn8n.com

자동 스팸/마케팅 및 할인 메일 삭제

중급

이것은Other, AI분야의자동화 워크플로우로, 6개의 노드를 포함합니다.주로 If, Gmail, GmailTrigger, Agent, LmChatOpenAi 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Gmail AI 이메일 분류 및 자동 삭제 (스팸/할인 정리)

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • OpenAI API Key

카테고리

워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "IYMbUalwaX81VJs4",
  "meta": {
    "instanceId": "740c1df6d3b1b6ea8a9d2223701f6904173f9e3cf7381cd181644b043420ba09",
    "templateCredsSetupCompleted": true
  },
  "name": "Auto Spam/Marketing & Offer Delete",
  "tags": [],
  "nodes": [
    {
      "id": "d3c54552-91c2-4b7f-b9ce-f6cf2a28d615",
      "name": "Gmail 트리거",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -80,
        60
      ],
      "parameters": {
        "filters": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyHour"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "rhc6qwDoI5ghiukO",
          "name": "Gmail TEST"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "322d373c-84c9-4b2a-a68a-fc977788f973",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        140,
        260
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-nano",
          "cachedResultName": "gpt-4.1-nano"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "d2iBjQ0eOMCYOYLG",
          "name": "OpenAi TEST API"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "39ace162-640d-4350-9d43-142d335752be",
      "name": "조건문",
      "type": "n8n-nodes-base.if",
      "position": [
        520,
        60
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "3fa478cd-9476-4a10-b039-1e537b838b31",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": "SPAM"
            },
            {
              "id": "82bafdff-daed-4791-8dd0-dae981c0ee43",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.output }}",
              "rightValue": "OFFER"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "89d0576e-1523-4684-9c7c-8af12464a648",
      "name": "이메일 검증기",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        160,
        60
      ],
      "parameters": {
        "text": "=Tu masz ostatnią wiadomość email: \n {{ $json.snippet }}",
        "options": {
          "systemMessage": "=You are an intelligent assistant for analyzing and classifying emails or contact form messages.\n\nYour task is to accurately assess whether the message contains **valuable information** or is a **standard commercial message with no real value to the recipient**.\n\nWe distinguish three classes:\n\n1. `SPAM` – bulk messages, low-quality content, random text, scam, phishing, etc.  \n2. `OFFER` – commercial or marketing messages that promote something but **do not contain information important to the user**, e.g.:\n   - Discount coupons  \n   - Promotion or sale announcements  \n   - Abandoned cart reminders  \n   - Invitations to register, download, or purchase  \n   - Cold emails and collaboration offers  \n3. `IMPORTAND` – messages containing **important information for the recipient**, even if commercial in nature, e.g.:\n   - Order or payment confirmation  \n   - Shipping or delivery status  \n   - Message from a specific person with a question or request  \n   - Private matters, invitations, inquiries  \n\nRules:\n- If in doubt, mark as `IMPORTAND`.\n- Focus on the message content, do not evaluate email address or headers.\n- Respond with only **one word**: `SPAM`, `OFFER`, or `IMPORTAND`.\n\nExamples:\n\nMessage:  \n\"Your order #14235 has been shipped. Expected delivery: Thursday.\"  \nResponse: `IMPORTAND`  \n📌 This is important information for the user – do not delete.\n\n---\n\nMessage:  \n\"You left something in your cart! Today only -15% off your purchase!\"  \nResponse: `OFFER`  \n📌 Typical marketing reminder, no concrete value.\n\n---\n\nMessage:  \n\"Hi, we noticed you haven’t downloaded our free e-book. Download now and learn 10 ways to increase sales.\"  \nResponse: `OFFER`  \n📌 Marketing pitch, lacks important content.\n\n---\n\nMessage:  \n\"Attached is the invoice for the service completed last month. Contact me if you have any questions.\"  \nResponse: `IMPORTAND`  \n📌 Invoice = important message.\n\n---\n\nMessage:  \n\"Only today! Free shipping and up to -30% discounts in our store!\"  \nResponse: `OFFER`  \n📌 Promotion, typical commercial info.\n\n---\n\nMessage:  \n\"Hi, I saw your ad online and I’m interested in collaborating. Can we talk by phone?\"  \nResponse: `IMPORTAND`  \n📌 Message from a specific person = potential lead.\n\n---\n\nMessage:  \n\"Win a new iPhone! Click here and claim your prize!\"  \nResponse: `SPAM`  \n📌 No explanation needed – scam/spam.\n\n---\n\nMessage:  \n\"I’d like to ask if you offer individual training?\"  \nResponse: `IMPORTAND`  \n📌 Genuine message from an interested customer.\n\n---\n\nMessage:  \n\"Register now to get free access to XYZ tool for 7 days.\"  \nResponse: `OFFER`  \n📌 Promotional offer, not inherently important.\n"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "30698570-1181-4164-8d19-3e944fcae486",
      "name": "이메일 삭제",
      "type": "n8n-nodes-base.gmail",
      "position": [
        780,
        60
      ],
      "webhookId": "1640aa4d-44f3-435c-a67b-fa9ca2bd0186",
      "parameters": {
        "messageId": "={{ $('Gmail Trigger').item.json.id }}",
        "operation": "delete"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "rhc6qwDoI5ghiukO",
          "name": "Gmail TEST"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "c1476511-b49b-410e-9665-47d04f26c92a",
      "name": "스티키 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1040,
        -260
      ],
      "parameters": {
        "width": 660,
        "height": 1060,
        "content": "### 📌 Workflow: Auto Spam/Marketing Offer Killer Copy\n\n**Description**  \nThis workflow automatically monitors your Gmail inbox and **classifies incoming emails** into one of three categories:\n\n- `SPAM`: Low-value, scam, or irrelevant bulk messages  \n- `OFFER`: Standard marketing/commercial offers without user-relevant information  \n- `IMPORTAND`: Important and valuable messages, even if commercial (e.g. invoices, personal inquiries)\n\nIf a message is classified as `SPAM` or `OFFER`, it is **automatically deleted** from your Gmail inbox.\n\n---\n\n### ⚙️ Components Used\n\n- **Gmail Trigger** – Checks for new messages every hour  \n- **Validator of Email (OpenAI)** – Uses GPT-based logic to analyze and classify the message  \n- **IF Node** – Filters for SPAM and OFERTA categories  \n- **Gmail Delete** – Deletes irrelevant messages automatically\n\n---\n\n### ⚠️ Warnings & Information\n\n- **Permanent deletion**: Emails marked as SPAM or OFFER are deleted without confirmation. Use with caution.\n- **No human review**: The system relies entirely on AI classification. False positives may occur.\n- **Language-specific**: The AI prompt is in English.\n- **Inactive by default**: You need to manually activate the workflow in n8n.\n- **Testing recommended**: Always test on a non-critical Gmail account before full deployment.\n\n---\n\n### ✅ Use Case\n\nIdeal for:\n- Freelancers tired of cold emails  \n- Business owners who want a clean inbox  \n- Anyone filtering out marketing and spam noise while keeping valuable emails untouched\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "988b967f-e77d-4698-af25-93c44b601aec",
  "connections": {
    "39ace162-640d-4350-9d43-142d335752be": {
      "main": [
        [
          {
            "node": "30698570-1181-4164-8d19-3e944fcae486",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "d3c54552-91c2-4b7f-b9ce-f6cf2a28d615": {
      "main": [
        [
          {
            "node": "89d0576e-1523-4684-9c7c-8af12464a648",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "322d373c-84c9-4b2a-a68a-fc977788f973": {
      "ai_languageModel": [
        [
          {
            "node": "89d0576e-1523-4684-9c7c-8af12464a648",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "89d0576e-1523-4684-9c7c-8af12464a648": {
      "main": [
        [
          {
            "node": "39ace162-640d-4350-9d43-142d335752be",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 기타, 인공지능

유료인가요?

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

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

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

저자
LukaszB

LukaszB

@lukaszb

AI Automation Expert | Web & Mobile App Integrator With 2+ years of experience, I build smart automations, web & mobile app workflows, and scalable platforms using tools like n8n, Make, and more. I help businesses reduce operational costs, save time, and scale faster with AI-powered solutions. For business enquiries, send me an email at kontakt@lumizone.pl

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34