8
n8n 中文网amn8n.com

自动化差旅费用报销工作流

高级

这是一个Invoice Processing, AI Summarization领域的自动化工作流,包含 20 个节点。主要使用 Code, EmailSend, FormTrigger, GoogleDrive, GoogleSheets 等节点。 使用GPT-4.1-mini从差旅收据中提取数据,结合Google Sheets和邮件通知

前置要求
  • Google Drive API 凭证
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "r6Clz7C4iBTnB3ar",
  "meta": {
    "instanceId": "4a2e6764ba7a6bc9890d9225f4b21d570ce88fc9bd57549c89057fcee58fed0f",
    "templateId": "5453",
    "templateCredsSetupCompleted": true
  },
  "name": "Automated Trip Expense Reporting Workflow With gpt-4.1-mini",
  "tags": [
    {
      "id": "5HqPDYxcmr92h5gG",
      "name": "Finance Workflow",
      "createdAt": "2025-08-02T13:47:30.790Z",
      "updatedAt": "2025-08-02T13:47:30.790Z"
    }
  ],
  "nodes": [
    {
      "id": "511042e8-828d-4eed-a305-58a5fb10c8bb",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2544,
        1168
      ],
      "parameters": {
        "width": 1120,
        "height": 1568,
        "content": "# 🧾 Automated Trip Expense Reporting Workflow With gpt-4.1-mini\n## 👤 Who’s it for\n\nThis workflow is designed for employees who need to submit expense claims for business trips. It automates the process of extracting data from receipts/invoices, logging it to a Google Sheet, and notifying the finance team via email.\n\nIdeal users:\n- Employees submitting business trip expense claims\n- HR or Admins reviewing travel-related reimbursements\n- Finance teams responsible for processing claims\n\n## ⚙️ How it works / What it does\n\n1. **Employee submits a form** with trip information (name, department, purpose, dates) and uploads one or more receipts/invoices (PDF).\n2. **Uploaded files are saved to Google Drive** for record-keeping.\n3. Each PDF is passed to a **DocClaim Assistant agent**, which uses GPT-4o and a structured parser to extract structured invoice data.\n4. The data is **transformed and formatted** into a standard JSON structure.\n5. Two parallel paths are followed:\n   - Invoice records are appended to a **Google Sheet** for centralized tracking.\n   - A detailed **HTML email** summarizing the trip and expenses is generated and sent to the **finance department** for claim processing.\n\n## 🛠 How to set up\n\n1. **Create a form** to capture:\n   - Employee Name\n   - Department\n   - Trip Purpose\n   - From Date / To Date\n   - Receipt/Invoice File Upload (multiple PDFs)\n\n2. **Configure file upload node** to store files in a specific Google Drive folder.\n\n3. **Set up DocClaim Agent** using:\n   - GPT-4o or any LLM with document analysis capability\n   - Output parser for standardizing extracted receipt data (e.g., vendor, total, tax, date)\n\n4. **Transform extracted data** into a structured claim record (Code Node).\n\n5. **Path 1**: Save records to a Google Sheet (one row per expense).\n\n6. **Path 2**:\n   - Format the employee + claim data into a dynamic **HTML email**\n   - Use `Send Email` node to notify the finance department (e.g., `finance@yourcompany.com`)\n\n## ✅ Requirements\n\n- n8n running with access to:\n  - Google Drive API (for file uploads)\n  - Google Sheets API (for logging expenses)\n  - Email node (SMTP or Gmail for sending)\n- GPT-4o or equivalent LLM with document parsing ability\n- PDF invoices with clear formatting\n- Shared Google Sheet for claim tracking\n- Optional: Shared inbox for finance team\n\n\n\n## 🧩 How to customize the workflow\n\n- **Add approval steps**: route the email to a manager before finance\n- **Attach original PDFs**: include uploaded files in the email as attachments\n- **Localize for other languages**: adapt form labels, email content, or parser prompts\n- **Sync to ERP or accounting system**: replace Google Sheet with QuickBooks, Xero, etc.\n- **Set limits/validation**: enforce max claim per trip or required fields before submission\n- **Auto-tag expenses**: add categories (e.g., travel, accommodation) for better reporting\n"
      },
      "typeVersion": 1
    },
    {
      "id": "5f325f14-8a4e-4920-9302-c598805b5a70",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1360,
        1168
      ],
      "parameters": {
        "width": 540,
        "height": 948,
        "content": "![Alt text](https://wisestackai.s3.ap-southeast-1.amazonaws.com/Screenshot+2025-08-02+at+10.06.31%E2%80%AFPM.png \"Optional title text\")\n"
      },
      "typeVersion": 1
    },
    {
      "id": "e3f8bbb9-594e-4e89-9d78-e55a0db9803f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1632
      ],
      "parameters": {
        "width": 892,
        "height": 496,
        "content": "## 1.1 – Extract and Parse Invoices with AI Agent\n\nUploaded PDF receipts are processed using OCR and AI. The DocClaim Assistant extracts key invoice details such as vendor, date, amount, and itemized lines, then outputs them in a clean, structured JSON format ready for further processing."
      },
      "typeVersion": 1
    },
    {
      "id": "efe400aa-4b57-4651-a847-976e1a4c927b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1408,
        1664
      ],
      "parameters": {
        "width": 556,
        "height": 336,
        "content": "## 3. Send Claim Summary to Finance Team\n\nA formatted email with the employee’s business trip and expense breakdown is sent to the finance team for review and reimbursement. The email includes vendor names, invoice totals, dates, and itemized expense tables."
      },
      "typeVersion": 1
    },
    {
      "id": "5c0dd81a-634f-4f98-83c5-6420c19fe3c4",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        1856
      ],
      "parameters": {
        "width": 1004,
        "height": 516,
        "content": "![Alt text](https://wisestackai.s3.ap-southeast-1.amazonaws.com/Screenshot+2025-08-02+at+10.01.32%E2%80%AFPM.png \"Optional title text\")"
      },
      "typeVersion": 1
    },
    {
      "id": "6c4e9c64-e684-45c3-b979-b7de198df9b8",
      "name": "On form submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -736,
        1664
      ],
      "webhookId": "d2b90e45-460e-416f-8e8f-00cb2d370d9d",
      "parameters": {
        "options": {},
        "formTitle": "Business Trip Claim Submission",
        "formFields": {
          "values": [
            {
              "fieldLabel": "Employee Name",
              "placeholder": "Your full name",
              "requiredField": true
            },
            {
              "fieldType": "dropdown",
              "fieldLabel": "Department",
              "fieldOptions": {
                "values": [
                  {
                    "option": "Sales"
                  },
                  {
                    "option": "Engineering"
                  },
                  {
                    "option": "HR"
                  },
                  {
                    "option": "Executive"
                  }
                ]
              },
              "requiredField": true
            },
            {
              "fieldLabel": "Trip Purpose",
              "placeholder": "Client meeting with ABC Corp",
              "requiredField": true
            },
            {
              "fieldType": "date",
              "fieldLabel": "From Date",
              "requiredField": true
            },
            {
              "fieldType": "date",
              "fieldLabel": "To Date",
              "requiredField": true
            },
            {
              "fieldType": "file",
              "fieldLabel": "Receipts / Invoices",
              "requiredField": true,
              "acceptFileTypes": ".pdf"
            }
          ]
        },
        "formDescription": "Submit your business trip expense claim by providing trip details and uploading all related invoices or receipts."
      },
      "typeVersion": 2.2
    },
    {
      "id": "fca9ee73-d2da-4420-a541-8b641a70b097",
      "name": "Transform Output",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        1808
      ],
      "parameters": {
        "jsCode": "// Static or dynamic employee information\nconst profile = $('On form submission').first().json;\nconst employee = {\n  name: profile[\"Employee Name\"],\n  department: profile[\"Department\"],\n  tripPurpose: profile[\"Trip Purpose\"],\n  fromDate: profile[\"From Date\"],\n  toDate: profile[\"To Date\"],\n};\n\n// Collect parsed expense outputs\nconst items = $input.all();\nconst expenses = items.map((item, index) => {\n  const data = item.json.output;\n\n  return {\n    index: index + 1,\n    expenseType: data.expense_type || \"\",\n    vendor: data.vendor_name || \"\",\n    invoiceNumber: data.invoice_number || \"\",\n    receiptNumber: data.receipt_number || \"\",\n    issueDate: data.issue_date || \"\",\n    totalAmount: data.total_amount || 0,\n    currency: data.currency || \"\",\n    taxAmount: data.tax_amount || 0,\n    paymentMethod: data.payment_method || \"\",\n    location: data.location || \"\",\n    notes: data.notes || \"\",\n    items: data.itemized_descriptions || []\n  };\n});\n\nreturn [\n  {\n    json: {\n      employee,\n      expenses\n    }\n  }\n];"
      },
      "typeVersion": 2
    },
    {
      "id": "2d99c9cf-842c-4fec-af66-c87291a39383",
      "name": "Upload file",
      "type": "n8n-nodes-base.googleDrive",
      "position": [
        -96,
        1424
      ],
      "parameters": {
        "name": "=invoice-{{ $now.toFormat(\"yyyyLLdd-HHmmss\") }}-{{$binary.data.fileName}}",
        "driveId": {
          "__rl": true,
          "mode": "list",
          "value": "My Drive"
        },
        "options": {},
        "folderId": {
          "__rl": true,
          "mode": "list",
          "value": "1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
          "cachedResultUrl": "https://drive.google.com/drive/folders/1IPcko8bzogO3W4mxhrW2Q017QA0Lc5MI",
          "cachedResultName": "SmartSales"
        }
      },
      "credentials": {
        "googleDriveOAuth2Api": {
          "id": "fC471es5gk5Mm900",
          "name": "Google Drive account"
        }
      },
      "typeVersion": 3
    },
    {
      "id": "f2249caa-a6b6-41d5-8ed8-9dac36134716",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -240,
        1280
      ],
      "parameters": {
        "width": 892,
        "height": 320,
        "content": "## 1.2. Store Invoices in Google Sheet\n\nThe parsed invoice records are transformed and appended to a Google Sheet for tracking, auditing, or reimbursement purposes. Each uploaded receipt is saved with relevant trip metadata and financial details."
      },
      "typeVersion": 1
    },
    {
      "id": "509b2701-e1d7-43da-bf7f-c51b0f4b68d6",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        720,
        1664
      ],
      "parameters": {
        "width": 620,
        "height": 336,
        "content": "## 2. Transform and Generate HTML Email\n\nThis step prepares a professional email summary by combining employee trip details and all extracted expense information. The result is an HTML email template suitable for sending to the finance department."
      },
      "typeVersion": 1
    },
    {
      "id": "e8937db3-e66b-4638-84b1-06c847440628",
      "name": "Extract from File",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        -96,
        1808
      ],
      "parameters": {
        "options": {},
        "operation": "pdf"
      },
      "typeVersion": 1
    },
    {
      "id": "36c4ad16-9720-4a79-b112-81b7836234be",
      "name": "DocClaim Assistant Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        176,
        1808
      ],
      "parameters": {
        "text": "=Extract all relevant information from thisreceipt or invoice below:\n---\n{{ $json.text }}\n---\nI need the output in a structured format suitable for generating a business expense claim report. Include fields like vendor name, invoice or receipt number, date, total amount, tax, payment method, currency, and item descriptions.",
        "options": {
          "systemMessage": "You are a document extraction assistant specialized in parsing receipts and invoices. Your role is to read and extract all relevant financial and business information from uploaded PDF files. Focus on identifying fields commonly used in expense claim reports, such as vendor name, invoice number, receipt number, date of issue, total amount, tax amount, currency, payment method, and itemized descriptions. Return the data in a clean, structured format. Do not include unnecessary text or decorative content. If some fields are missing, leave them blank. Maintain consistency in field naming and format."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 2.1
    },
    {
      "id": "ca934b9b-3c6a-45e3-8df6-90593691a6e3",
      "name": "Append row in sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        384,
        1424
      ],
      "parameters": {
        "columns": {
          "value": {},
          "schema": [
            {
              "id": "EmployeeName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "EmployeeName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Department",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Department",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "TripPurpose",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "TripPurpose",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FromDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FromDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "ToDate",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "ToDate",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "FileName",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "FileName",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "DownloadURL",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "DownloadURL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Size",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "SubmittedAt",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "SubmittedAt",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "autoMapInputData",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qk6OebcuZkIRorf1k235ew88oZ-UlUJSyiHFqZYDbaU/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1qk6OebcuZkIRorf1k235ew88oZ-UlUJSyiHFqZYDbaU",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qk6OebcuZkIRorf1k235ew88oZ-UlUJSyiHFqZYDbaU/edit?usp=drivesdk",
          "cachedResultName": "Invoices Tracking"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "L670Nly6gZGo71br",
          "name": "Google Sheets account 2"
        }
      },
      "typeVersion": 4.6
    },
    {
      "id": "ac2f4a6e-d950-4aa8-b0b3-072eac9fbe0d",
      "name": "Transform invoice record",
      "type": "n8n-nodes-base.code",
      "position": [
        144,
        1424
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const claimForm = $('On form submission').first().json;\nreturn {\n      EmployeeName: claimForm[\"Employee Name\"],\n      Department: claimForm[\"Department\"],\n      TripPurpose: claimForm[\"Trip Purpose\"],\n      FromDate: claimForm[\"From Date\"],\n      ToDate: claimForm[\"To Date\"],\n      FileName: $json.name,\n      DownloadURL: $json.webContentLink,\n      Size: $json.size,\n      SubmittedAt: claimForm[\"submittedAt\"]\n    }"
      },
      "typeVersion": 2
    },
    {
      "id": "4ab39a13-3479-40d8-b782-201416bb4cc8",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        384,
        1984
      ],
      "parameters": {
        "jsonSchemaExample": "{\n  \"expense_type\": \"Hotel\",\n  \"vendor_name\": \"Grand Central Hotel\",\n  \"invoice_number\": \"INV-20250802-001\",\n  \"receipt_number\": \"RCPT-56789\",\n  \"issue_date\": \"2025-08-02\",\n  \"total_amount\": 150.00,\n  \"tax_amount\": 15.00,\n  \"currency\": \"USD\",\n  \"payment_method\": \"Credit Card\",\n  \"location\": \"Hanoi, Vietnam\",\n  \"trip_purpose\": \"Client Meeting\",\n  \"trip_dates\": {\n    \"from\": \"2025-08-02\",\n    \"to\": \"2025-08-03\"\n  },\n  \"itemized_descriptions\": [\n    {\n      \"category\": \"Accommodation\",\n      \"description\": \"1 night stay - Deluxe Room\",\n      \"quantity\": 1,\n      \"unit_price\": 120.00,\n      \"line_total\": 120.00\n    },\n    {\n      \"category\": \"Service Charge\",\n      \"description\": \"Hotel service fee\",\n      \"quantity\": 1,\n      \"unit_price\": 10.00,\n      \"line_total\": 10.00\n    },\n    {\n      \"category\": \"Tax\",\n      \"description\": \"VAT 10%\",\n      \"quantity\": 1,\n      \"unit_price\": 15.00,\n      \"line_total\": 15.00\n    }\n  ],\n  \"notes\": \"\"\n}"
      },
      "typeVersion": 1.3
    },
    {
      "id": "8ae7f569-3bb0-4d3b-91a2-fd0ae82649bc",
      "name": "Create HTML Email Template",
      "type": "n8n-nodes-base.code",
      "position": [
        1120,
        1808
      ],
      "parameters": {
        "jsCode": "const data = $input.first().json;\n\nconst { employee, expenses } = data;\n\n// Helper to generate expense summary rows\nconst expenseSummaryRows = expenses.map(expense => `\n  <tr>\n    <td>${expense.index}</td>\n    <td>${expense.expenseType}</td>\n    <td>${expense.vendor}</td>\n    <td>${expense.issueDate}</td>\n    <td>${expense.totalAmount}</td>\n    <td>${expense.currency}</td>\n    <td>${expense.taxAmount}</td>\n    <td>${expense.paymentMethod}</td>\n  </tr>\n`).join(\"\");\n\n// Helper to generate detailed tables for each expense\nconst expenseDetailSections = expenses.map(expense => {\n  const itemRows = (expense.items || []).map(item => `\n    <tr>\n      <td>${item.category}</td>\n      <td>${item.description}</td>\n      <td>${item.quantity}</td>\n      <td>${item.unit_price}</td>\n      <td>${item.line_total}</td>\n    </tr>\n  `).join(\"\");\n\n  return `\n    <div style=\"margin-top:32px;\">\n      <h4>Details for Expense #${expense.index} - ${expense.expenseType}</h4>\n      <p><strong>Vendor:</strong> ${expense.vendor}</p>\n      <p><strong>Invoice No.:</strong> ${expense.invoiceNumber}</p>\n      <p><strong>Receipt No.:</strong> ${expense.receiptNumber}</p>\n      <p><strong>Location:</strong> ${expense.location}</p>\n      <p><strong>Notes:</strong> ${expense.notes}</p>\n      <table border=\"1\" cellpadding=\"6\" cellspacing=\"0\" width=\"100%\" style=\"border-collapse:collapse;margin-top:10px;\">\n        <thead>\n          <tr style=\"background-color:#f4f4f4;\">\n            <th>Category</th>\n            <th>Description</th>\n            <th>Qty</th>\n            <th>Unit Price</th>\n            <th>Line Total</th>\n          </tr>\n        </thead>\n        <tbody>${itemRows}</tbody>\n      </table>\n    </div>\n  `;\n}).join(\"\");\n\nconst html = `\n<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"UTF-8\" />\n  <style>\n    body { font-family: Arial, sans-serif; color: #333; }\n    h2 { color: #0077b6; }\n    table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }\n    th, td { padding: 8px; border: 1px solid #ddd; font-size: 14px; }\n    th { background-color: #f4f4f4; text-align: left; }\n    h4 { margin-bottom: 5px; margin-top: 30px; color: #444; }\n  </style>\n</head>\n<body>\n\n  <h2>Expense Claim Request</h2>\n\n  <p><strong>Employee Name:</strong> ${employee.name}</p>\n  <p><strong>Department:</strong> ${employee.department}</p>\n  <p><strong>Trip Purpose:</strong> ${employee.tripPurpose}</p>\n  <p><strong>Trip Dates:</strong> ${employee.fromDate} to ${employee.toDate}</p>\n\n  <h3>Expense Summary</h3>\n  <table>\n    <thead>\n      <tr>\n        <th>#</th>\n        <th>Type</th>\n        <th>Vendor</th>\n        <th>Issue Date</th>\n        <th>Total</th>\n        <th>Currency</th>\n        <th>Tax</th>\n        <th>Payment</th>\n      </tr>\n    </thead>\n    <tbody>\n      ${expenseSummaryRows}\n    </tbody>\n  </table>\n\n  ${expenseDetailSections}\n\n  <p style=\"margin-top:32px;\">Thank you,<br/>${employee.name}</p>\n\n</body>\n</html>\n`;\n\nreturn [{ json: { html } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "b32b2c21-d4a9-4c58-8f4b-0cc35436cce5",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2000,
        1328
      ],
      "parameters": {
        "width": 1004,
        "height": 516,
        "content": "![Alt text](https://wisestackai.s3.ap-southeast-1.amazonaws.com/Screenshot+2025-08-02+at+10.00.53%E2%80%AFPM.png \"Optional title text\")"
      },
      "typeVersion": 1
    },
    {
      "id": "c3755330-96b8-4aa6-9463-8bb77a6c178c",
      "name": "Send trip expense request to finance team",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        1600,
        1808
      ],
      "webhookId": "0ed7153b-1dbc-45af-8509-511e3478c079",
      "parameters": {
        "html": "={{ $json.html }}",
        "options": {},
        "subject": "=Expense Claim Request - {{ $('Transform Output').item.json.employee.name }} – {{ $('Transform Output').item.json.employee.department }} - {{ $('Transform Output').item.json.employee.tripPurpose }}"
      },
      "credentials": {
        "smtp": {
          "id": "Cqc9p9Z5PHj2MHzn",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "97927e98-c5b0-4a7c-a183-88e47919b050",
      "name": "Handle multiple files",
      "type": "n8n-nodes-base.code",
      "position": [
        -464,
        1664
      ],
      "parameters": {
        "jsCode": "const data = $input.item.json;\nconst binaryData = $input.item.binary;\n\nlet output = [];\n\nObject.keys(binaryData)\n  .filter(label => label.startsWith(\"Receipts___Invoices_\"))\n  .forEach(label => {\n    output.push({\n      json: data,\n      binary: { data: binaryData[label] }\n    });\n  });\n\nreturn output;"
      },
      "typeVersion": 2
    },
    {
      "id": "5cd08389-4b62-41e8-845b-c321361e03d2",
      "name": "GPT",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        160,
        1984
      ],
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "gpt-4.1-mini"
        },
        "options": {}
      },
      "credentials": {
        "openAiApi": {
          "id": "PPSwAKeLQYgAPobT",
          "name": "OpenAi account"
        }
      },
      "typeVersion": 1.2
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "55afe44c-c3c5-42ac-9857-70e65e57e5ee",
  "connections": {
    "5cd08389-4b62-41e8-845b-c321361e03d2": {
      "ai_languageModel": [
        [
          {
            "node": "36c4ad16-9720-4a79-b112-81b7836234be",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "2d99c9cf-842c-4fec-af66-c87291a39383": {
      "main": [
        [
          {
            "node": "ac2f4a6e-d950-4aa8-b0b3-072eac9fbe0d",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fca9ee73-d2da-4420-a541-8b641a70b097": {
      "main": [
        [
          {
            "node": "8ae7f569-3bb0-4d3b-91a2-fd0ae82649bc",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "e8937db3-e66b-4638-84b1-06c847440628": {
      "main": [
        [
          {
            "node": "36c4ad16-9720-4a79-b112-81b7836234be",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "6c4e9c64-e684-45c3-b979-b7de198df9b8": {
      "main": [
        [
          {
            "node": "97927e98-c5b0-4a7c-a183-88e47919b050",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "97927e98-c5b0-4a7c-a183-88e47919b050": {
      "main": [
        [
          {
            "node": "2d99c9cf-842c-4fec-af66-c87291a39383",
            "type": "main",
            "index": 0
          },
          {
            "node": "e8937db3-e66b-4638-84b1-06c847440628",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "36c4ad16-9720-4a79-b112-81b7836234be": {
      "main": [
        [
          {
            "node": "fca9ee73-d2da-4420-a541-8b641a70b097",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "4ab39a13-3479-40d8-b782-201416bb4cc8": {
      "ai_outputParser": [
        [
          {
            "node": "36c4ad16-9720-4a79-b112-81b7836234be",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "ac2f4a6e-d950-4aa8-b0b3-072eac9fbe0d": {
      "main": [
        [
          {
            "node": "ca934b9b-3c6a-45e3-8df6-90593691a6e3",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "8ae7f569-3bb0-4d3b-91a2-fd0ae82649bc": {
      "main": [
        [
          {
            "node": "c3755330-96b8-4aa6-9463-8bb77a6c178c",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。

这个工作流适合什么场景?

高级 - 发票处理, AI 摘要总结

需要付费吗?

本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。

工作流信息
难度等级
高级
节点数量20
分类2
节点类型10
难度说明

适合高级用户,包含 16+ 个节点的复杂工作流

作者
Trung Tran

Trung Tran

@trungtran

Empowering small and medium businesses with smart automation and practical AI, no big tech team required. Reach out: lets@automatewith.me

外部链接
在 n8n.io 查看

分享此工作流

分类

分类: 34