8
n8n 한국어amn8n.com

GPT-4o-mini를 사용하여 Gmail 이메일을 분류하고 Telegram 알림을 보내기

중급

이것은AI Summarization, Multimodal AI분야의자동화 워크플로우로, 13개의 노드를 포함합니다.주로 Gmail, Telegram, GmailTrigger, Agent, LmChatOpenAi 등의 노드를 사용하며. GPT-4o-mini를 사용하여 Gmail 이메일을 분류하고 Telegram 알림을 보내

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • Telegram Bot Token
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "meta": {
    "instanceId": "8f5bc3586a09bb005132364a23028fdc8e3d8c8e33cd86682840171acfa0648a"
  },
  "nodes": [
    {
      "id": "9cd65245-e711-4f03-b678-9594d0f35b2f",
      "name": "Gmail 트리거",
      "type": "n8n-nodes-base.gmailTrigger",
      "position": [
        -1136,
        16
      ],
      "parameters": {
        "simple": false,
        "filters": {},
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        }
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "96ptpCJChvUmC7FR",
          "name": "Gmail account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "cb59304f-46f2-4f7b-821e-9681137da80b",
      "name": "분류 에이전트",
      "type": "@n8n/n8n-nodes-langchain.textClassifier",
      "position": [
        -832,
        -32
      ],
      "parameters": {
        "options": {
          "multiClass": true,
          "systemPromptTemplate": "Please classify the text provided by the user into one of the following categories: {categories}, and use the provided formatting instructions below. Don't explain, and only output the json."
        },
        "inputText": "=Email: {{ $json.from.value[0].address }}\nName: {{ $json.from.value[0].name }}\nSubject: {{ $json.subject }}\nBody: {{ $json.text}}",
        "categories": {
          "categories": [
            {
              "category": "High Priority",
              "description": "Emails requiring immediate attention or action, typically from key stakeholders, clients, or decision-makers. These emails often contain time-sensitive requests, deadlines, or escalated issues. Keywords: urgent, ASAP, immediate, deadline, action required, high priority"
            },
            {
              "category": "Work Related",
              "description": "Anything related to my Work. Keyword: Work {Add more relevant work details here}"
            },
            {
              "category": "Promotion",
              "description": "Anything related to updating on promotions. Keywords: newsletter, promotion, offer, sale, campaign, marketing, launch"
            },
            {
              "category": "Other",
              "description": "If you don't know what category is this email."
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "95600e56-c8b2-402c-b769-fe7724bbf5a6",
      "name": "AI 에이전트1",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -448,
        176
      ],
      "parameters": {
        "text": "=You are a notification assistant. When an email is received, generate a short, casual, and direct notification about it.\nCATEGORY:  {{ $json.labelIds[0] }}\nFrom: {{ $json.from.value[0].address  || $json.from.value[0].name}} \n\nSubject: {{ $json.subject }}\nBody: {{ $json.text }}\n\n",
        "options": {},
        "promptType": "define"
      },
      "typeVersion": 2.2
    },
    {
      "id": "3c04b2db-d9a4-401c-8e38-a7d3b92665fe",
      "name": "문자 메시지 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -64,
        176
      ],
      "webhookId": "0e77de2e-6e1a-457d-b79b-413f7d066d9a",
      "parameters": {
        "text": "={{ $json.output }}",
        "chatId": "{input your telegram id here}",
        "additionalFields": {}
      },
      "credentials": {
        "telegramApi": {
          "id": "qzw76kM1w1nZA0a6",
          "name": "Subreddit_finder_bot"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "d2834e35-4d72-47bb-95fb-8cb082993833",
      "name": "높은 우선순위",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -416,
        -96
      ],
      "webhookId": "4e089f5f-58ea-4c8d-8870-3d155a81f0b7",
      "parameters": {
        "labelIds": [
          "YELLOW_STAR",
          "IMPORTANT"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "96ptpCJChvUmC7FR",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "157490fb-6cfc-4ec9-a8d6-dc8a20358e47",
      "name": "업무 관련",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -240,
        -96
      ],
      "webhookId": "4e089f5f-58ea-4c8d-8870-3d155a81f0b7",
      "parameters": {
        "labelIds": [
          "Label_1704671005251458060"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "96ptpCJChvUmC7FR",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "eed9519c-a572-4e60-bafb-80a53c054e07",
      "name": "프로모션",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -80,
        -96
      ],
      "webhookId": "4e089f5f-58ea-4c8d-8870-3d155a81f0b7",
      "parameters": {
        "labelIds": [
          "Label_2537748930215029681"
        ],
        "messageId": "={{ $json.id }}",
        "operation": "addLabels"
      },
      "credentials": {
        "gmailOAuth2": {
          "id": "96ptpCJChvUmC7FR",
          "name": "Gmail account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "9691763a-2a82-41ce-9a3a-2589c5779085",
      "name": "스티커 메모",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -288
      ],
      "parameters": {
        "width": 816,
        "height": 352,
        "content": "## Gmail Label\nThis node is responsible for actually labeling your email.\nYou may add 2 labels in one classification but for this template, I did a 1 Classification, 1 Label\n\n## NOTE:\nMake sure the label name you'll add in your label node is already existing in your gmail account otherwise it won't work."
      },
      "typeVersion": 1
    },
    {
      "id": "726fc541-0729-4017-ae3f-75bc6e14c3da",
      "name": "스티커 메모1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        64
      ],
      "parameters": {
        "color": 5,
        "width": 816,
        "height": 320,
        "content": "## Telegram Message\n- Create a bot on @botfather telegram and use that as a credential.\n- Set the chat ID as your chatID so it would message you."
      },
      "typeVersion": 1
    },
    {
      "id": "f52fa480-449f-44a2-afcb-922fbd0ce2d2",
      "name": "4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -448,
        272
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "D8Cg9yQ6kspeYccH",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "207cff11-d136-4c15-a1ab-df29f17abe64",
      "name": "스티커 메모2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -144
      ],
      "parameters": {
        "color": 3,
        "width": 432,
        "height": 448,
        "content": "## AI Classification\nYou may Customize the Categories based on the Emails you want to be labeled."
      },
      "typeVersion": 1
    },
    {
      "id": "30139756-7d33-4d69-be06-9f509df104e5",
      "name": "4o-mini",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -832,
        160
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "D8Cg9yQ6kspeYccH",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "5b87419b-7ee3-4942-939b-5cd16550a997",
      "name": "스티커 메모3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1232,
        -112
      ],
      "parameters": {
        "width": 304,
        "height": 336,
        "content": "# Mail Listener\nThis node listens for new emails every minute, you may change the polling time"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "30139756-7d33-4d69-be06-9f509df104e5": {
      "ai_languageModel": [
        [
          {
            "node": "cb59304f-46f2-4f7b-821e-9681137da80b",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "95600e56-c8b2-402c-b769-fe7724bbf5a6": {
      "main": [
        [
          {
            "node": "3c04b2db-d9a4-401c-8e38-a7d3b92665fe",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "9cd65245-e711-4f03-b678-9594d0f35b2f": {
      "main": [
        [
          {
            "node": "cb59304f-46f2-4f7b-821e-9681137da80b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "cb59304f-46f2-4f7b-821e-9681137da80b": {
      "main": [
        [
          {
            "node": "d2834e35-4d72-47bb-95fb-8cb082993833",
            "type": "main",
            "index": 0
          },
          {
            "node": "95600e56-c8b2-402c-b769-fe7724bbf5a6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "157490fb-6cfc-4ec9-a8d6-dc8a20358e47",
            "type": "main",
            "index": 0
          },
          {
            "node": "95600e56-c8b2-402c-b769-fe7724bbf5a6",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "eed9519c-a572-4e60-bafb-80a53c054e07",
            "type": "main",
            "index": 0
          },
          {
            "node": "95600e56-c8b2-402c-b769-fe7724bbf5a6",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

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

유료인가요?

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

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

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

저자
Christian Moises

Christian Moises

@hyxcreation

I value my time. so I created an Automation for 4 hours to save 20 minutes. I'll post all my works so you'd save that 20 minutes without spending 4 hours to create it. lol.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34