8
n8n 한국어amn8n.com

Telegram 및 ChatGPT-4o-mini를 사용한 자동화된 인보이스 분석 추출

중급

이것은Invoice Processing, AI Summarization분야의자동화 워크플로우로, 12개의 노드를 포함합니다.주로 If, Code, Telegram, HttpRequest, Agent 등의 노드를 사용하며. Telegram에서 ChatGPT-4o-mini 추출을 사용한 인보이스 분석 자동화

사전 요구사항
  • Telegram Bot Token
  • 대상 API의 인증 정보가 필요할 수 있음
  • OpenAI API Key
워크플로우 미리보기
노드 연결 관계를 시각적으로 표시하며, 확대/축소 및 이동을 지원합니다
워크플로우 내보내기
다음 JSON 구성을 복사하여 n8n에 가져오면 이 워크플로우를 사용할 수 있습니다
{
  "id": "sBbL7CfgioXi9VJc",
  "meta": {
    "instanceId": "b91e510ebae4127f953fd2f5f8d40d58ca1e71c746d4500c12ae86aad04c1502"
  },
  "name": "Automate invoice analysis via Telegram with ChatGPT-4o-mini extraction",
  "tags": [],
  "nodes": [
    {
      "id": "b6433fae-ab23-4504-bf1c-07d98177799e",
      "name": "Telegram 트리거",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -464,
        32
      ],
      "webhookId": "11b31e8e-4b0b-47a3-ba82-b4ffea5e34ae",
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "e631a3ed-6930-4da7-a5dc-f33b4c852426",
      "name": "문서 여부 확인",
      "type": "n8n-nodes-base.if",
      "position": [
        -304,
        32
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "1",
              "operator": {
                "type": "object",
                "operation": "exists"
              },
              "leftValue": "={{ $json.message.document }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "a22e54b3-e4e0-4b67-8e8f-ef9a5f163fdb",
      "name": "Telegram에서 파일 가져오기",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -128,
        -64
      ],
      "webhookId": "620221c5-ea8f-4c9e-bb04-b70114f27cb2",
      "parameters": {
        "fileId": "={{ $json.message.document.file_id }}",
        "resource": "file",
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "e93556dc-7af4-4e7d-9cb0-82aa0da39ed8",
      "name": "HTTP 요청 - 파일 다운로드",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        32,
        -64
      ],
      "parameters": {
        "url": "=https://api.telegram.org/file/bot{{ $credentials.telegramApi.accessToken }}/{{ $json.result.file_path }}",
        "options": {
          "response": {
            "response": {
              "responseFormat": "file"
            }
          }
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "aebfd1a1-bb29-4dbe-af72-4a6e986d4f79",
      "name": "청구서 데이터 추출",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        176,
        -64
      ],
      "parameters": {
        "operation": "extractFromPDF"
      },
      "typeVersion": 1
    },
    {
      "id": "c9bf8764-2bc9-4861-b477-bbb60d516f34",
      "name": "AI 에이전트 - 청구서 분석",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        320,
        -64
      ],
      "parameters": {
        "text": "=Analyze the following invoice text and extract key information:\n\n{{ $json.text }}\n\nProvide the following details:\n1. Invoice Number\n2. Invoice Date\n3. Vendor/Supplier Name\n4. Total Amount\n5. Currency\n6. Due Date\n7. Line Items (if available)\n8. Payment Status\n9. Any discrepancies or issues found\n\nFormat the response in a clear, structured manner.",
        "options": {
          "systemMessage": "You are an expert invoice analyst. Extract accurate information from invoices and identify any potential issues or discrepancies."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.7
    },
    {
      "id": "baead0ff-8676-4e77-9084-bd28484fc797",
      "name": "OpenAI 채팅 모델",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        320,
        128
      ],
      "parameters": {
        "options": {
          "temperature": 0.2
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "OGYj7DgYv5GFLFZk",
          "name": "OpenAi account 2"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c149851f-3c38-4827-b1e9-14dbdbdd9172",
      "name": "응답 형식 지정",
      "type": "n8n-nodes-base.code",
      "position": [
        576,
        -64
      ],
      "parameters": {
        "jsCode": "const aiResponse = $input.first().json.output;\nconst originalMessage = $('Telegram Trigger').first().json;\n\nreturn {\n  json: {\n    chatId: originalMessage.message.chat.id,\n    analysis: aiResponse,\n    fileName: originalMessage.message.document?.file_name || 'Unknown',\n    timestamp: new Date().toISOString()\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "b6c9a341-c390-4d8e-8ab7-ef7896bf87b4",
      "name": "분석 결과를 Telegram로 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        720,
        -64
      ],
      "webhookId": "c8fc2be4-fef6-4434-86a8-4630d8c9c3b4",
      "parameters": {
        "text": "=📄 *Invoice Analysis Complete*\n\n*File:* {{ $json.fileName }}\n*Analyzed at:* {{ $json.timestamp }}\n\n*Results:*\n{{ $json.analysis }}\n\n✅ Analysis completed successfully!",
        "chatId": "={{ $json.chatId }}",
        "additionalFields": {
          "parse_mode": "Markdown"
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "267e3223-6e60-432e-bb6d-980c2821b0e5",
      "name": "오류 메시지 전송",
      "type": "n8n-nodes-base.telegram",
      "position": [
        -128,
        112
      ],
      "webhookId": "b419141c-c0cc-42ba-a2af-6ff60bfa6ba6",
      "parameters": {
        "text": "❌ Please send a document file (PDF or image) to check the invoice.",
        "chatId": "={{ $json.message.chat.id }}",
        "additionalFields": {}
      },
      "typeVersion": 1.2
    },
    {
      "id": "2f8e4a85-0db5-421a-93c1-b5a5cc8c701c",
      "name": "스티커 노트",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1024,
        -256
      ],
      "parameters": {
        "width": 544,
        "height": 624,
        "content": "## Introduction\nUpload invoices via Telegram, receive structured data instantly. Perfect for accountants and finance teams.\n## How It Works\nTelegram bot receives invoices, downloads files, extracts data using OpenAI, then returns analysis.\n## Workflow Template\nTelegram Trigger → Document Check → Get File → HTTP Download → AI Extract → Format Response → Send to Telegram\n## Workflow Steps\n1. **Telegram Trigger:** Listens for uploads.\n2. **Document Check:** Validates files; routes errors.\n3. **Get File:** Retrieves metadata.\n4. **HTTP Download:** Fetches content.\n5. **AI Extract:** OpenAI parses invoice fields.\n6. **Format Response:** Structures data.\n7. **Send Analysis:** Delivers to chat.\n## Setup Instructions\n1. **Telegram Bot:** Create via BotFather, add credentials.\n2. **OpenAI Agent:** Add API key and extraction prompt.\n3. **HTTP Node:** Set authentication.\n4. **Parser:** Define invoice schema.\n5. **Error Handling:** Configure fallbacks.\n"
      },
      "typeVersion": 1
    },
    {
      "id": "80d92c1c-d7b6-47ae-8f9d-8520e61708a8",
      "name": "스티커 노트1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        112
      ],
      "parameters": {
        "color": 4,
        "width": 320,
        "height": 288,
        "content": "## Prerequisites\n- n8n instance\n- Telegram Bot Token\n- OpenAI API key\n## Customization\n- Database storage\n- Accounting software integration\n## Benefits\n- Eliminates manual entry\n- Reduces errors"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8c2bf80d-d1f6-4b32-bd5a-cf0b88f24786",
  "connections": {
    "c149851f-3c38-4827-b1e9-14dbdbdd9172": {
      "main": [
        [
          {
            "node": "b6c9a341-c390-4d8e-8ab7-ef7896bf87b4",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "b6433fae-ab23-4504-bf1c-07d98177799e": {
      "main": [
        [
          {
            "node": "e631a3ed-6930-4da7-a5dc-f33b4c852426",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e631a3ed-6930-4da7-a5dc-f33b4c852426": {
      "main": [
        [
          {
            "node": "a22e54b3-e4e0-4b67-8e8f-ef9a5f163fdb",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "267e3223-6e60-432e-bb6d-980c2821b0e5",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "baead0ff-8676-4e77-9084-bd28484fc797": {
      "ai_languageModel": [
        [
          {
            "node": "c9bf8764-2bc9-4861-b477-bbb60d516f34",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "aebfd1a1-bb29-4dbe-af72-4a6e986d4f79": {
      "main": [
        [
          {
            "node": "c9bf8764-2bc9-4861-b477-bbb60d516f34",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "a22e54b3-e4e0-4b67-8e8f-ef9a5f163fdb": {
      "main": [
        [
          {
            "node": "e93556dc-7af4-4e7d-9cb0-82aa0da39ed8",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "c9bf8764-2bc9-4861-b477-bbb60d516f34": {
      "main": [
        [
          {
            "node": "c149851f-3c38-4827-b1e9-14dbdbdd9172",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e93556dc-7af4-4e7d-9cb0-82aa0da39ed8": {
      "main": [
        [
          {
            "node": "aebfd1a1-bb29-4dbe-af72-4a6e986d4f79",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
자주 묻는 질문

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

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

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

중급 - 청구서 처리, AI 요약

유료인가요?

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

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

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

저자
Cheng Siong Chin

Cheng Siong Chin

@cschin

Prof. Cheng Siong CHIN serves as Chair Professor in Intelligent Systems Modelling and Simulation in Newcastle University, Singapore. His academic credentials include an M.Sc. in Advanced Control and Systems Engineering from The University of Manchester and a Ph.D. in Robotics from Nanyang Technological University.

외부 링크
n8n.io에서 보기

이 워크플로우 공유

카테고리

카테고리: 34