AI 기반 PDF 송장 파서 - Google Drive, Google Sheets 및 OpenAI
이것은Finance, AI분야의자동화 워크플로우로, 10개의 노드를 포함합니다.주로 GoogleDrive, GoogleSheets, Agent, ExtractFromFile, GoogleDriveTrigger 등의 노드를 사용하며인공지능 기술을 결합하여 스마트 자동화를 구현합니다. Google Drive, Google Sheets 및 OpenAI를 활용한 AI 기반 PDF 송장 파서
- •Google Drive API 인증 정보
- •Google Sheets API 인증 정보
- •OpenAI API Key
사용된 노드 (10)
{
"meta": {
"instanceId": "d1786ab0d745a7498abf13a9c2cdabb1374c006e889b79eef64ce0386b8f8a41",
"templateCredsSetupCompleted": true
},
"nodes": [
{
"id": "5c1a182c-3485-48db-91b2-d46f0f1d3fd5",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
560,
200
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4o-mini"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "MGwGMKEkdcjzlYCw",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "45f94af9-147a-434c-aef5-fc3f7e60a140",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
780,
200
],
"parameters": {
"jsonSchemaExample": "{\n \"invoice_number\": \"\",\n \"invoice_date\": \"\",\n \"due_date\": \"\",\n \"vendor_name\": \"\",\n \"total_amount\": \"\",\n \"currency\": \"\",\n \"items\": [\n {\n \"description\": \"\",\n \"amount\": \"\"\n }\n ],\n \"tax\": \"\",\n \"category\": \"\"\n}"
},
"typeVersion": 1.2
},
{
"id": "01c8daa7-81e1-46cd-b927-f264e90391b4",
"name": "송장 폴더 모니터",
"type": "n8n-nodes-base.googleDriveTrigger",
"position": [
0,
0
],
"parameters": {
"event": "fileCreated",
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"triggerOn": "specificFolder",
"folderToWatch": {
"__rl": true,
"mode": "id",
"value": "1KJ4fvXcKVMGJunsKvPYf8PkX5K9SVwFk"
}
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "SEUhrgz30NMJS3cH",
"name": "Google Drive account"
}
},
"typeVersion": 1
},
{
"id": "af299424-233a-4ac0-a92b-7f456d11e15a",
"name": "송장 PDF 다운로드",
"type": "n8n-nodes-base.googleDrive",
"position": [
200,
0
],
"parameters": {
"fileId": {
"__rl": true,
"mode": "id",
"value": "={{ $json.id }}"
},
"options": {},
"operation": "download"
},
"credentials": {
"googleDriveOAuth2Api": {
"id": "SEUhrgz30NMJS3cH",
"name": "Google Drive account"
}
},
"typeVersion": 3
},
{
"id": "e896d679-a064-459a-8e4f-603436879cda",
"name": "PDF 텍스트 추출기",
"type": "n8n-nodes-base.extractFromFile",
"position": [
400,
0
],
"parameters": {
"options": {},
"operation": "pdf"
},
"typeVersion": 1
},
{
"id": "f43fe296-b04b-41fd-ad4d-a845d009e80f",
"name": "송장 파서 AI 에이전트",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
580,
0
],
"parameters": {
"text": "=You are an intelligent invoice parser. I will give you raw text extracted from a PDF invoice. \n\n========================\nSTART OF RAW INVOICE TEXT\n\n{{ $json.text }}\n\nEND OF RAW INVOICE TEXT\n========================\n\nYour job is to:\n\n1. Extract key information from the invoice such as:\n - invoice_number\n - invoice_date\n - due_date (if available)\n - vendor_name\n - total_amount\n - currency (e.g., USD, IDR, etc.)\n - items (as a list of item descriptions and their amounts)\n - tax (if available)\n\n2. Detect the invoice **category**, such as:\n - Utilities\n - Office Supplies\n - Travel\n - Software\n - Food & Beverage\n - Others (if unknown)\n\n3. Return the result in this exact JSON format:\n\n```json\n{\n \"invoice_number\": \"\",\n \"invoice_date\": \"\",\n \"due_date\": \"\",\n \"vendor_name\": \"\",\n \"total_amount\": \"\",\n \"currency\": \"\",\n \"items\": [\n {\n \"description\": \"\",\n \"amount\": \"\"\n }\n ],\n \"tax\": \"\",\n \"category\": \"\"\n}\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.9
},
{
"id": "00eec735-03c4-4a78-829c-54354613812a",
"name": "송장 데이터 삽입",
"type": "n8n-nodes-base.googleSheets",
"position": [
920,
0
],
"parameters": {
"columns": {
"value": {
"Tax": "={{ $json.output.tax }}",
"Items": "={{ $json.output.items }}",
"Category": "={{ $json.output.category }}",
"Currency": "={{ $json.output.currency }}",
"Due Date": "={{ $json.output.due_date }}",
"Vendor Name": "={{ $json.output.vendor_name }}",
"Invoice Date": "={{ $json.output.invoice_date }}",
"Total Amount": "={{ $json.output.total_amount }}",
"Invoice Number": "={{ $json.output.invoice_number }}"
},
"schema": [
{
"id": "Invoice Number",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Invoice Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Invoice Date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Invoice Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Due Date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Due Date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Vendor Name",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Vendor Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Total Amount",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Total Amount",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Currency",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Currency",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Items",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Items",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Tax",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Tax",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Category",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Category",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5dHeytao9y3L0Mgv8cSomPVLS3CMrn_eOwXW3oQ3c8/edit#gid=0",
"cachedResultName": "Invoices"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1u5dHeytao9y3L0Mgv8cSomPVLS3CMrn_eOwXW3oQ3c8",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u5dHeytao9y3L0Mgv8cSomPVLS3CMrn_eOwXW3oQ3c8/edit?usp=drivesdk",
"cachedResultName": "PDF Invoice Parser - n8n template"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "ypmzFxQFfAacuVVC",
"name": "Google Sheets account"
}
},
"typeVersion": 4.5
},
{
"id": "78ead6a4-7ae7-4182-a7f1-eebb7f38d776",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-100
],
"parameters": {
"color": 4,
"width": 280,
"height": 400,
"content": "## SETUP REQUIRED\n\nGoogle Sheets Structure:\nSheet: \"Invoices\"\n• Column A: Invoice Number \n• Column B: Invoice Date \n• Column C: Due Date \n• Column D: Vendor Name \n• Column E: Total Amount \n• Column F: Currency \n• Column G: Items \n• Column H: Tax \n• Column I: Category \n\nRequired Credentials:\n• Google Drive Credential \n• Google Sheets Credential \n• OpenAI API Key (GPT-4)\n"
},
"typeVersion": 1
},
{
"id": "45fc8d0a-c76a-4c2a-871e-19ad144993f0",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
340
],
"parameters": {
"color": 5,
"width": 460,
"height": 400,
"content": "## 🧾 AI-Powered PDF Invoice Parser for Google Drive & Sheets\n\nWhat This Template Does:\n\n- Monitors a designated Google Drive folder for new incoming PDF invoices \n- Automatically downloads and extracts text content from the PDFs \n- Uses GPT-4 to intelligently parse and structure invoice data (amount, vendor, items, date, etc.) \n- Categorizes invoices by type (Office Supplies, Food & Beverage, etc.) \n- Saves all parsed invoice data into a Google Sheets document \n- Fully automates invoice processing and bookkeeping for businesses "
},
"typeVersion": 1
},
{
"id": "d85f3e8e-38cc-4a12-9592-ce32373ddcf9",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
340
],
"parameters": {
"color": 5,
"width": 400,
"height": 340,
"content": "## 📋 WORKFLOW PROCESS OVERVIEW\n\nStep 1: 📂 Invoice Folder Monitor watches a specific Google Drive folder for new PDF invoices \nStep 2: ⬇️ Download Invoice PDF downloads the new invoice as binary data \nStep 3: 🔍 PDF Text Extractor converts the PDF binary into readable text using OCR and extraction tools \nStep 4: 🤖 Invoice Parser AI Agent (GPT-4) analyzes the text and extracts structured invoice data in JSON format \nStep 5: 📝 Insert Invoice Data appends the structured invoice data to the Google Sheets \"Invoices\""
},
"typeVersion": 1
}
],
"pinData": {
"Invoice Folder Monitor": [
{
"id": "168eK7xkg9bhZRC9Nn3aoVbeU--Cy_4ie",
"kind": "drive#file",
"name": "invoice123123.pdf",
"size": "43627",
"owners": [
{
"me": true,
"kind": "drive#user",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYEvqVbfrYpVM3Esbt8CDt_Fije42MxkdcBFDBR1qni7Tgw5j7=s64",
"displayName": "Billy Christi Hartanto",
"emailAddress": "billychartanto@gmail.com",
"permissionId": "06783842879122931240"
}
],
"shared": false,
"spaces": [
"drive"
],
"parents": [
"1KJ4fvXcKVMGJunsKvPYf8PkX5K9SVwFk"
],
"starred": false,
"trashed": false,
"version": "3",
"iconLink": "https://drive-thirdparty.googleusercontent.com/16/type/application/pdf",
"mimeType": "application/pdf",
"ownedByMe": true,
"viewedByMe": true,
"createdTime": "2025-05-27T08:17:54.309Z",
"md5Checksum": "c1bda6d4249306eeb6b30da641eb2ad8",
"permissions": [
{
"id": "06783842879122931240",
"kind": "drive#permission",
"role": "owner",
"type": "user",
"deleted": false,
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYEvqVbfrYpVM3Esbt8CDt_Fije42MxkdcBFDBR1qni7Tgw5j7=s64",
"displayName": "Billy Christi Hartanto",
"emailAddress": "billychartanto@gmail.com",
"pendingOwner": false
}
],
"webViewLink": "https://drive.google.com/file/d/168eK7xkg9bhZRC9Nn3aoVbeU--Cy_4ie/view?usp=drivesdk",
"capabilities": {
"canCopy": true,
"canEdit": true,
"canShare": true,
"canTrash": true,
"canDelete": true,
"canRename": true,
"canComment": true,
"canUntrash": true,
"canDownload": true,
"canReadLabels": false,
"canAddChildren": false,
"canListChildren": false,
"canModifyLabels": false,
"canModifyContent": true,
"canReadRevisions": true,
"canRemoveChildren": false,
"canAcceptOwnership": false,
"canAddMyDriveParent": false,
"canMoveItemOutOfDrive": true,
"canMoveItemWithinDrive": true,
"canRemoveMyDriveParent": true,
"canMoveItemIntoTeamDrive": true,
"canMoveChildrenWithinDrive": false,
"canModifyContentRestriction": true,
"canRemoveContentRestriction": false,
"canEnableInheritedPermissions": true,
"canChangeSecurityUpdateEnabled": false,
"canChangeViewersCanCopyContent": true,
"canDisableInheritedPermissions": false,
"canModifyOwnerContentRestriction": true,
"canModifyEditorContentRestriction": true,
"canChangeCopyRequiresWriterPermission": true
},
"hasThumbnail": true,
"modifiedByMe": true,
"modifiedTime": "2025-05-27T08:17:38.000Z",
"sha1Checksum": "54243509f843e8ec9f2913715d9ae0f6df14cdde",
"fileExtension": "pdf",
"permissionIds": [
"06783842879122931240"
],
"thumbnailLink": "https://lh3.googleusercontent.com/drive-storage/AJQWtBNR_JHmbwFJT9hZOqNB1DU8CkWed-A0mH2ukYEDpQt7OdutXoLStFjhGHdTvgpzX3ORUOqOVaAeNqt9vuUJt0KUQ_0L0nxkCqXPZ68ybuhugn0=s220",
"headRevisionId": "0B3oBzhOa0rqUUCtZU3E5TDBGaUkrTEhETWNKQ1h0L2djcFRZPQ",
"quotaBytesUsed": "43627",
"sha256Checksum": "c2de358a0974f9b047aed8e457def7d4b1b39170f44819ec3152b42db787d72e",
"viewedByMeTime": "2025-05-27T08:17:54.309Z",
"webContentLink": "https://drive.google.com/uc?id=168eK7xkg9bhZRC9Nn3aoVbeU--Cy_4ie&export=download",
"isAppAuthorized": false,
"writersCanShare": true,
"modifiedByMeTime": "2025-05-27T08:17:38.000Z",
"originalFilename": "invoice123123.pdf",
"thumbnailVersion": "1",
"explicitlyTrashed": false,
"fullFileExtension": "pdf",
"lastModifyingUser": {
"me": true,
"kind": "drive#user",
"photoLink": "https://lh3.googleusercontent.com/a/ACg8ocKYEvqVbfrYpVM3Esbt8CDt_Fije42MxkdcBFDBR1qni7Tgw5j7=s64",
"displayName": "Billy Christi Hartanto",
"emailAddress": "billychartanto@gmail.com",
"permissionId": "06783842879122931240"
},
"linkShareMetadata": {
"securityUpdateEnabled": true,
"securityUpdateEligible": false
},
"viewersCanCopyContent": true,
"copyRequiresWriterPermission": false,
"inheritedPermissionsDisabled": false
}
]
},
"connections": {
"5c1a182c-3485-48db-91b2-d46f0f1d3fd5": {
"ai_languageModel": [
[
{
"node": "f43fe296-b04b-41fd-ad4d-a845d009e80f",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e896d679-a064-459a-8e4f-603436879cda": {
"main": [
[
{
"node": "f43fe296-b04b-41fd-ad4d-a845d009e80f",
"type": "main",
"index": 0
}
]
]
},
"af299424-233a-4ac0-a92b-7f456d11e15a": {
"main": [
[
{
"node": "e896d679-a064-459a-8e4f-603436879cda",
"type": "main",
"index": 0
}
]
]
},
"01c8daa7-81e1-46cd-b927-f264e90391b4": {
"main": [
[
{
"node": "af299424-233a-4ac0-a92b-7f456d11e15a",
"type": "main",
"index": 0
}
]
]
},
"f43fe296-b04b-41fd-ad4d-a845d009e80f": {
"main": [
[
{
"node": "00eec735-03c4-4a78-829c-54354613812a",
"type": "main",
"index": 0
}
]
]
},
"45f94af9-147a-434c-aef5-fc3f7e60a140": {
"ai_outputParser": [
[
{
"node": "f43fe296-b04b-41fd-ad4d-a845d009e80f",
"type": "ai_outputParser",
"index": 0
}
]
]
}
}
}이 워크플로우를 어떻게 사용하나요?
위의 JSON 구성 코드를 복사하여 n8n 인스턴스에서 새 워크플로우를 생성하고 "JSON에서 가져오기"를 선택한 후, 구성을 붙여넣고 필요에 따라 인증 설정을 수정하세요.
이 워크플로우는 어떤 시나리오에 적합한가요?
중급 - 금융, 인공지능
유료인가요?
이 워크플로우는 완전히 무료이며 직접 가져와 사용할 수 있습니다. 다만, 워크플로우에서 사용하는 타사 서비스(예: OpenAI API)는 사용자 직접 비용을 지불해야 할 수 있습니다.
관련 워크플로우 추천
Billy Christi
@billyI'm a professional software engineer and n8n expert with a passion for building scalable, no-code and low-code automation workflows. I specialize in creating seamless integrations between APIs, CRMs, and everyday tools to help businesses save time, reduce manual work, and operate smarter. Whether it's automating marketing pipelines, backend systems, or approval processes, I turn complex logic into simple, powerful workflows with n8n.
이 워크플로우 공유