8
n8n 한국어amn8n.com

AI 자동 Gmail 인보이스 검출 및 Slack 알림

중급

이것은자동화 워크플로우로, 12개의 노드를 포함합니다.주로 If, Gmail, Slack, Agent, ScheduleTrigger 등의 노드를 사용하며. GPT-4o를 사용하여 Gmail에서 발표 데이터를 추출하고 Slack 알림을 보냅니다

사전 요구사항
  • Google 계정 및 Gmail API 인증 정보
  • Slack Bot Token 또는 Webhook URL
  • OpenAI API Key

카테고리

-
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "name": "AI Auto-Detect Invoices from Gmail and Notify on Slack",
  "nodes": [
    {
      "id": "df47f544-18a9-4eea-a02f-6e8618bdc903",
      "name": "스케줄 트리거",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -1488,
        -16
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "hours"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "fb69e703-7747-4862-8208-0d0803f5ce8f",
      "name": "AI 에이전트",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "onError": "continueRegularOutput",
      "position": [
        -1040,
        -16
      ],
      "parameters": {
        "text": "=You are an intelligent assistant that reads emails and determines whether the message is related to an invoice or a payment notification.\n\nYour tasks:\n1. Determine if the email is invoice-related.\n2. If yes, extract:\n   - Due date (in YYYY-MM-DD format, or null)\n   - Amount due (as a number, no currency symbols)\n\nAlways include these metadata values:\nId: {{ $json.id }}\nthreadId: {{ $json.threadId }}\nbody: {{ $json.text }}\nsubject: {{ $json.subject }}\nsender: {{ $json.from.value[0].name }}\n\nReturn only a valid JSON object in the format below:\n\n```json\n{\n  \"is_invoice\": true or false,\n  \"due_date\": \"YYYY-MM-DD\" or null,\n  \"amount_due\": number or null,\n  \"email_id\": \"string\",\n  \"thread_id\": \"string\",\n  \"sender\": \"string\",\n  \"subject\": \"string\"\n}\n\n\n",
        "options": {},
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.1
    },
    {
      "id": "ff1adb6a-43d6-4b36-9c91-0046b0146565",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        -1024,
        208
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o",
          "cachedResultName": "gpt-4o"
        },
        "options": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "acc58349-b51f-4623-9a23-f740791483fb",
      "name": "구조화 출력 파서",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        -896,
        208
      ],
      "parameters": {
        "schemaType": "manual",
        "inputSchema": "{\n  \"type\": \"object\",\n  \"properties\": {\n    \"is_invoice\": {\n      \"type\": \"boolean\"\n    },\n    \"due_date\": {\n      \"type\": [\"string\", \"null\"],\n      \"format\": \"date\"\n    },\n    \"amount_due\": {\n      \"type\": [\"number\", \"null\"]\n    },\n    \"email_id\": {\n      \"type\": \"string\"\n    },\n    \"thread_id\": {\n      \"type\": \"string\"\n    },\n    \"sender\": {\n      \"type\": \"string\"\n    },\n    \"subject\": {\n      \"type\": \"string\"\n    }\n  },\n  \"required\": [\n    \"is_invoice\",\n    \"due_date\",\n    \"amount_due\",\n    \"email_id\",\n    \"thread_id\",\n    \"sender\",\n    \"subject\"\n  ]\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "436dccba-2b62-4ee9-b2c3-0581bc836ed7",
      "name": "작업 없음(No Operation)",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -464,
        80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "4c1eb726-1666-4f5c-b4e0-8f938f3ef791",
      "name": "스티키 노트2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1552,
        208
      ],
      "parameters": {
        "width": 304,
        "height": 224,
        "content": "### ⚠️ Setup Required  \n- Connect your Gmail account using OAuth2  \n- Connect your Slack account using OAuth 2\n- Add your OpenAI API Key under **API Credentials**  "
      },
      "typeVersion": 1
    },
    {
      "id": "17c6acfe-6074-43f9-af78-8a2f7104df5b",
      "name": "읽지 않은 이메일 가져오기",
      "type": "n8n-nodes-base.gmail",
      "position": [
        -1264,
        -16
      ],
      "webhookId": "4259da3e-a2e2-41ea-aaac-50d8bf8a4bb7",
      "parameters": {
        "simple": false,
        "filters": {
          "readStatus": "unread"
        },
        "options": {},
        "operation": "getAll"
      },
      "typeVersion": 2.1
    },
    {
      "id": "51725993-99b5-4d9e-a562-4e762ca6a0a2",
      "name": "이메일 송장 여부 확인",
      "type": "n8n-nodes-base.if",
      "position": [
        -688,
        -16
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "dc8158a0-29aa-4c7f-9de3-994a5d827331",
              "operator": {
                "type": "boolean",
                "operation": "true",
                "singleValue": true
              },
              "leftValue": "={{ $json.output.is_invoice }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "ec14d8de-cfab-4b53-a3b5-9aae1c3b808d",
      "name": "스티키 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1600,
        -128
      ],
      "parameters": {
        "color": 5,
        "width": 320,
        "height": 272,
        "content": "### 💡 Schedule Trigger  \nThis runs every hour.  \nYou can change the interval here depending on how often you want Gmail to be checked."
      },
      "typeVersion": 1
    },
    {
      "id": "3f7e75ec-5a03-4664-b1ff-91f57bee2d9d",
      "name": "스티키 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -528,
        -336
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 400,
        "content": "### 💡 Customize Notification Format  \nYou can change the title in this node.  For example: `Pay invoice from {{sender}} by {{due_date}}`  \nInclude more invoice details in the notes field if needed.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "db70ae0c-794b-452e-b8cd-26574ff006a2",
      "name": "Slack 사용자에게 알림",
      "type": "n8n-nodes-base.slack",
      "position": [
        -464,
        -112
      ],
      "webhookId": "a155a0c9-d84e-4937-b215-9d2920c45616",
      "parameters": {
        "text": "=Invoice from {{ $json.output.sender }} – ${{ $json.output.amount_due }} due {{ $json.output.due_date }}",
        "user": {
          "__rl": true,
          "mode": "username",
          "value": ""
        },
        "select": "user",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "d9bc11f7-edb5-4521-9702-725c8fa736fc",
      "name": "스티키 노트3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1120,
        -256
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 640,
        "content": "### 🤖 AI Agent\n\n• This node uses an AI prompt to detect whether an email is invoice-related.\n• You can customize the prompt to detect other types of emails (e.g., receipts, contracts).\n"
      },
      "typeVersion": 1
    }
  ],
  "pinData": {},
  "connections": {
    "fb69e703-7747-4862-8208-0d0803f5ce8f": {
      "main": [
        [
          {
            "node": "51725993-99b5-4d9e-a562-4e762ca6a0a2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "df47f544-18a9-4eea-a02f-6e8618bdc903": {
      "main": [
        [
          {
            "node": "17c6acfe-6074-43f9-af78-8a2f7104df5b",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "17c6acfe-6074-43f9-af78-8a2f7104df5b": {
      "main": [
        [
          {
            "node": "fb69e703-7747-4862-8208-0d0803f5ce8f",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "ff1adb6a-43d6-4b36-9c91-0046b0146565": {
      "ai_languageModel": [
        [
          {
            "node": "fb69e703-7747-4862-8208-0d0803f5ce8f",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "acc58349-b51f-4623-9a23-f740791483fb": {
      "ai_outputParser": [
        [
          {
            "node": "fb69e703-7747-4862-8208-0d0803f5ce8f",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "51725993-99b5-4d9e-a562-4e762ca6a0a2": {
      "main": [
        [
          {
            "node": "db70ae0c-794b-452e-b8cd-26574ff006a2",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "436dccba-2b62-4ee9-b2c3-0581bc836ed7",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급

유료인가요?

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

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

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

저자
Matt Chong | n8n Creator

Matt Chong | n8n Creator

@mattxchong

Automation nerd fueled by good coffee, deep curiosity, and clean flows.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34