8
n8n 中文网amn8n.com

自动化 QuickBooks 发票到自定义 PDF 和电子邮件

高级

这是一个Invoice Processing领域的自动化工作流,包含 19 个节点。主要使用 Code, Html, Merge, Webhook, EmailSend 等节点。 使用 Gotenberg 将自定义品牌 QuickBooks 发票转为 PDF 并邮件发送

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "2hX0dXVASiaWn1Vg",
  "meta": {
    "instanceId": "e727f992f69a44655d3d4d5a1d4a30ca3ec1573139240bc4d84b17b8f66642c8",
    "templateCredsSetupCompleted": true
  },
  "name": "自动化 QuickBooks 发票到自定义 PDF 和电子邮件",
  "tags": [],
  "nodes": [
    {
      "id": "05599a83-f5c2-46db-8864-53c9e1b45f0d",
      "name": "监听新的 QuickBooks 发票",
      "type": "n8n-nodes-base.webhook",
      "position": [
        512,
        1248
      ],
      "webhookId": "f94d4908-7ef3-42b7-aa27-d6028475d32c",
      "parameters": {
        "path": "qbo-invoice-webhook",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "1dc144aa-6849-4e95-a4d1-1f9c80b16b63",
      "name": "从 QuickBooks 获取发票数据",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1248,
        976
      ],
      "parameters": {
        "resource": "invoice",
        "invoiceId": "={{ $json.body.eventNotifications[0].dataChangeEvent.entities[0].id }}"
      },
      "credentials": {
        "quickBooksOAuth2Api": {
          "id": "r3A6wRAzyp859vQL",
          "name": "QuickBooks Online account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b56096d7-37cf-41b7-ab77-ebb35c176e01",
      "name": "获取公司徽标图像",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        1248
      ],
      "parameters": {
        "url": "https://www.logomyway.com/logos_new/32474/CLEARWATER-HUDSON_497267718070.png",
        "options": {},
        "responseFormat": "file",
        "dataPropertyName": "logodata"
      },
      "typeVersion": 1
    },
    {
      "id": "97f6e4f4-82c8-4bbd-bad2-a02f69ca6150",
      "name": "获取公司签名图像",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        880,
        1600
      ],
      "parameters": {
        "url": "https://upload.wikimedia.org/wikipedia/commons/2/27/Narf_signature.png",
        "options": {},
        "responseFormat": "file",
        "dataPropertyName": "signaturedata"
      },
      "typeVersion": 1
    },
    {
      "id": "7b5653c7-4483-463c-a7e2-fab408ea1f91",
      "name": "将徽标转换为 Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1248,
        1248
      ],
      "parameters": {
        "options": {},
        "operation": "binaryToPropery",
        "destinationKey": "logodata",
        "binaryPropertyName": "logodata"
      },
      "typeVersion": 1
    },
    {
      "id": "4fa1d59c-2ace-4251-a0db-49b62d18f62a",
      "name": "将签名转换为 Base64",
      "type": "n8n-nodes-base.extractFromFile",
      "position": [
        1248,
        1424
      ],
      "parameters": {
        "options": {},
        "operation": "binaryToPropery",
        "destinationKey": "signaturedata",
        "binaryPropertyName": "signaturedata"
      },
      "typeVersion": 1
    },
    {
      "id": "38d30ac3-298c-4731-a7b3-d45ac80abb25",
      "name": "合并发票、徽标和签名",
      "type": "n8n-nodes-base.merge",
      "position": [
        1472,
        1232
      ],
      "parameters": {
        "numberInputs": 3
      },
      "typeVersion": 3.2
    },
    {
      "id": "8539ed24-374b-4ecb-b152-ef6d76365f0b",
      "name": "为模板准备所有数据",
      "type": "n8n-nodes-base.code",
      "position": [
        1680,
        1248
      ],
      "parameters": {
        "jsCode": "// This is the final, production-ready code. It fixes the \"PAID\" stamp logic.\n\nconst items = $items(\"Combine Invoice, Logo & Signature\"); // Ensure this is the correct name of your Merge node\n\n// Step 1: Correctly access the data\nconst invoiceData = items[0].json;\nconst logoJson = items[1].json;\nconst signatureJson = items[2].json;\n\n// Step 2: Safety check\nif (!logoJson || !logoJson.logodata || !signatureJson || !signatureJson.signaturedata) {\n  throw new Error(\"Could not find 'logodata' or 'signaturedata' properties. Check the nodes providing the images.\");\n}\n\n// Step 3: Create the full, correct Data URI for the images\nconst logoSrc = `data:image/png;base64,${logoJson.logodata}`;\nconst signatureSrc = `data:image/png;base64,${signatureJson.signaturedata}`;\n\n// Step 4: Format dates professionally\nfunction formatDate(dateString) {\n  if (!dateString) return 'N/A';\n  const options = { year: 'numeric', month: 'long', day: 'numeric' };\n  return new Date(dateString + 'T00:00:00-00:00').toLocaleDateString('en-US', options);\n}\n\n// Step 5: Build the HTML for the line items\nlet lineItemsHtml = '';\nfor (const item of invoiceData.Line) {\n  if (item.DetailType === 'SalesItemLineDetail') {\n    // Added a subtle grey color for the description for a more refined look\n    const description = item.Description ? `<br><span style=\"color: #718096; font-size: 0.85rem;\">${item.Description}</span>` : '';\n    lineItemsHtml += `\n      <tr>\n        <td><strong>${item.SalesItemLineDetail.ItemRef.name || 'N/A'}</strong>${description}</td>\n        <td class=\"text-center\">${item.SalesItemLineDetail.Qty || 1}</td>\n        <td class=\"text-right\">$${(item.SalesItemLineDetail.UnitPrice || 0).toFixed(2)}</td>\n        <td class=\"text-right\">$${(item.Amount || 0).toFixed(2)}</td>\n      </tr>`;\n  }\n}\n\n// Step 6: THE FIX - Conditionally create the PAID stamp HTML\nlet paidStampHtml = '';\n// Only if the balance is zero or less, create the entire div. Otherwise, it's an empty string.\nif (invoiceData.Balance <= 0) {\n  paidStampHtml = '<div class=\"paid-stamp\">PAID</div>';\n}\n\n// Step 7: Return the final JSON object\nreturn [{\n  json: {\n    customerName: invoiceData.CustomerRef.name,\n    customerEmail: invoiceData.BillEmail.Address,\n    invoiceNumber: invoiceData.DocNumber,\n    invoiceDate: formatDate(invoiceData.TxnDate),\n    dueDate: formatDate(invoiceData.DueDate),\n    lineItems: lineItemsHtml,\n    subtotal: (invoiceData.TotalAmt - invoiceData.TxnTaxDetail.TotalTax).toFixed(2),\n    tax: (invoiceData.TxnTaxDetail.TotalTax).toFixed(2),\n    balanceDue: (invoiceData.Balance).toFixed(2),\n    notes: invoiceData.CustomerMemo.value,\n    paymentTerms: invoiceData.SalesTermRef.name,\n    logoSrc: logoSrc,\n    signatureSrc: signatureSrc,\n    paidStampHtml: paidStampHtml // Pass the conditional HTML to the template\n  }\n}];"
      },
      "typeVersion": 2
    },
    {
      "id": "2fdd3ef9-ef1f-42a5-8a29-64e439645e83",
      "name": "从数据构建 HTML 发票",
      "type": "n8n-nodes-base.html",
      "position": [
        1888,
        1248
      ],
      "parameters": {
        "html": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <title>Invoice #{{$json.invoiceNumber}}</title>\n    <link rel=\"preconnect\" href=\"https://fonts.googleapis.com\">\n    <link rel=\"preconnect\" href=\"https://fonts.gstatic.com\" crossorigin>\n    <link href=\"https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap\" rel=\"stylesheet\">\n    <style>\n        @page {\n            size: A4;\n            margin: 1.5cm;\n            @bottom-center {\n                content: \"Page \" counter(page) \" of \" counter(pages);\n                font-family: 'Inter', sans-serif;\n                font-size: 9pt;\n                color: #999;\n                padding-top: 10px;\n                border-top: 1px solid #e0e0e0;\n                width: 100%;\n            }\n        }\n        body {\n            font-family: 'Inter', sans-serif;\n            color: #212529;\n            font-size: 9pt;\n            line-height: 1.5;\n        }\n        .invoice-wrapper { width: 100%; }\n        thead { display: table-header-group; }\n        tbody { display: table-row-group; }\n        tr { page-break-inside: avoid; }\n        .header {\n            display: flex;\n            justify-content: space-between;\n            align-items: flex-start;\n            padding-bottom: 20px;\n            border-bottom: 3px solid #0d2a4b;\n            margin-bottom: 40px;\n        }\n        .company-logo { max-width: 180px; max-height: 70px; }\n        .invoice-title { text-align: right; }\n        .invoice-title h1 {\n            margin: 0;\n            font-size: 26pt;\n            color: #0d2a4b;\n            font-weight: 700;\n        }\n        .invoice-title p {\n            margin: 2px 0 0 0;\n            color: #5a6a7b;\n            font-size: 10pt;\n        }\n        .meta-section {\n            display: grid;\n            grid-template-columns: 1fr 1fr 1fr;\n            gap: 30px;\n            margin-bottom: 40px;\n            font-size: 9pt;\n        }\n        .meta-section strong {\n            display: block;\n            margin-bottom: 6px;\n            color: #8898aa;\n            font-weight: 500;\n            text-transform: uppercase;\n            letter-spacing: 0.5px;\n            font-size: 8pt;\n        }\n        .meta-section span { color: #212529; }\n        .line-items-table {\n            width: 100%;\n            border-collapse: collapse;\n            margin-bottom: 20px;\n        }\n        .line-items-table th {\n            padding: 8px 5px;\n            background-color: #f8f9fa;\n            border-bottom: 2px solid #dee2e6;\n            /* text-align: left; <-- THE BUGGY LINE IS NOW REMOVED */\n            font-size: 8pt;\n            text-transform: uppercase;\n            letter-spacing: 0.5px;\n            font-weight: 700;\n            color: #495057;\n        }\n        .line-items-table td {\n            padding: 8px 5px;\n            border-bottom: 1px solid #edf2f7;\n            vertical-align: top;\n        }\n        .item-description { font-size: 8.5pt; color: #6c757d; }\n        .text-right { text-align: right; }\n        .text-left { text-align: left; }\n        .text-center { text-align: center; }\n        .summary-section {\n            page-break-inside: avoid !important;\n        }\n        .totals-section {\n            display: flex;\n            justify-content: flex-end;\n            margin-top: 20px;\n        }\n        .totals-table {\n            width: 100%;\n            max-width: 400px;\n        }\n        .totals-table td {\n            padding: 10px 12px;\n        }\n        .totals-table .label {\n            color: #495057;\n            text-align: right;\n        }\n        .totals-table .amount {\n            font-weight: 700;\n            text-align: right;\n            font-size: 10pt;\n        }\n        .grand-total {\n            border-top: 3px solid #0d2a4b;\n            background-color: #f8f9fa;\n        }\n        .grand-total .label, .grand-total .amount {\n            color: #0d2a4b;\n            font-size: 14pt;\n            font-weight: 700;\n        }\n        .footer {\n            margin-top: 40px;\n            padding-top: 20px;\n            border-top: 1px solid #e0e0e0;\n            font-size: 9pt;\n            color: #6c757d;\n        }\n        .footer strong { color: #343a40; }\n        .signature { max-height: 40px; margin-top: 15px; }\n    </style>\n</head>\n<body>\n    <div class=\"invoice-wrapper\">\n        <header class=\"header\">\n            <div>\n                <img src=\"{{$json.logoSrc}}\" alt=\"Company Logo\" class=\"company-logo\">\n            </div>\n            <div class=\"invoice-title\">\n                <h1>INVOICE</h1>\n                <p>Invoice # {{$json.invoiceNumber}}</p>\n            </div>\n        </header>\n        \n        <section class=\"meta-section\">\n            <div>\n                <strong>Bill To</strong>\n                <span>{{$json.customerName}}</span><br>\n                <span>{{$json.customerEmail}}</span>\n            </div>\n            <div>\n                <strong>Payable To</strong>\n                <span>YOUR COMPANY NAME</span><br>\n                <span>123 Your Street, Your City, State, Postal Code</span>\n            </div>\n            <div>\n                <strong>Dates</strong>\n                <span>Date of Issue: {{$json.invoiceDate}}</span><br>\n                <span>Due Date: {{$json.dueDate}}</span>\n            </div>\n        </section>\n\n        <table class=\"line-items-table\">\n            <thead>\n                <tr>\n                    <th class=\"text-left\" style=\"width: 50%;\">Item & Description</th>\n                    <th class=\"text-center\" style=\"width: 15%;\">Quantity</th>\n                    <th class=\"text-right\" style=\"width: 15%;\">Rate</th>\n                    <th class=\"text-right\" style=\"width: 20%;\">Amount</th>\n                </tr>\n            </thead>\n            <tbody>\n                {{$json.lineItems}}\n            </tbody>\n        </table>\n        \n        <div class=\"summary-section\">\n            <section class=\"totals-section\">\n                <table class=\"totals-table\">\n                    <tr>\n                        <td class=\"label\">Subtotal</td>\n                        <td class=\"amount\">${{$json.subtotal}}</td>\n                    </tr>\n                    <tr>\n                        <td class=\"label\">Tax</td>\n                        <td class=\"amount\">${{$json.tax}}</td>\n                    </tr>\n                    <tr class=\"grand-total\">\n                        <td class=\"label\">Balance Due</td>\n                        <td class=\"amount\">${{$json.balanceDue}}</td>\n                    </tr>\n                </table>\n            </section>\n        \n            <footer class=\"footer\">\n                <strong>Payment Terms: {{$json.paymentTerms}}</strong>\n                <p>{{$json.notes}}</p>\n                <img src=\"{{$json.signatureSrc}}\" alt=\"Signature\" class=\"signature\">\n                <p>Your Name, Your Title</p>\n            </footer>\n        </div>\n    </div>\n</body>\n</html>"
      },
      "typeVersion": 1.2
    },
    {
      "id": "905e1af5-3c1d-4a57-9df6-f7d0683f486a",
      "name": "将 HTML 转换为二进制文件",
      "type": "n8n-nodes-base.convertToFile",
      "position": [
        2096,
        1248
      ],
      "parameters": {
        "options": {
          "encoding": "utf8",
          "fileName": "index.html"
        },
        "operation": "toText",
        "sourceProperty": "html"
      },
      "typeVersion": 1.1
    },
    {
      "id": "14bf3ebc-3a0f-468c-b650-6b282fe7f572",
      "name": "通过 Gotenberg 生成 PDF",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        2368,
        1248
      ],
      "parameters": {
        "url": "http://yourGotenBergInstanceURL/forms/chromium/convert/html",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "contentType": "multipart-form-data",
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "files",
              "parameterType": "formBinaryData",
              "inputDataFieldName": "=data"
            },
            {
              "name": "scale",
              "value": "1"
            },
            {
              "name": "metadata",
              "value": "={\"Author\":\"IA2S\",\"Copyright\":\"IA2S\",\"CreateDate\":\"{{ $now.format('yyyy-MM-dd') }}\",\"Creator\":\"IA2S\",\"Keywords\":[],\"ModDate\":\"{{ $now.format('yyyy-MM-dd') }}\",\"PDFVersion\":1.7,\"Producer\":\"IA2S\",\"Subject\":\"PDF\",\"Title\":\"IA2S PDF\"}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Gotenberg-Output-Filename",
              "value": "={{ $('Prepare All Data for Template').item.json.invoiceNumber }}"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fc4105a5-f50c-4ac8-8010-a0ba82ffdf11",
      "name": "通过电子邮件向客户发送 PDF 发票",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        2704,
        1248
      ],
      "webhookId": "c88f607c-5e1e-4f9e-aa2c-2f69df6e29cc",
      "parameters": {
        "html": "=<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <style>\n        body {\n            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;\n            margin: 0;\n            padding: 0;\n            background-color: #f4f4f7;\n        }\n        .container {\n            max-width: 600px;\n            margin: 20px auto;\n            background-color: #ffffff;\n            border: 1px solid #e0e0e0;\n            border-radius: 8px;\n            padding: 40px;\n            line-height: 1.6;\n            color: #333333;\n        }\n        .header {\n            text-align: center;\n            margin-bottom: 30px;\n        }\n        .header h1 {\n            color: #0d2a4b;\n            margin: 0;\n        }\n        .content p {\n            font-size: 16px;\n        }\n        .invoice-details {\n            background-color: #f8f9fa;\n            padding: 20px;\n            border-radius: 5px;\n            margin: 30px 0;\n            font-size: 15px;\n        }\n        .invoice-details strong {\n            color: #0d2a4b;\n        }\n        .footer {\n            text-align: center;\n            margin-top: 40px;\n            font-size: 12px;\n            color: #888888;\n        }\n    </style>\n</head>\n<body>\n    <div class=\"container\">\n        <div class=\"header\">\n            <!-- You can optionally place your logo URL here -->\n            <!-- <img src=\"URL_TO_YOUR_LOGO\" alt=\"Your Company Name\" style=\"max-width: 180px; margin-bottom: 20px;\"> -->\n            <h1>New Invoice from YOUR COMPANY NAME</h1>\n        </div>\n\n        <div class=\"content\">\n            <p>Hi {{$node[\"Prepare All Data for Template\"].json.customerName}},</p>\n            \n            <p>We hope you are doing well.</p>\n            \n            <p>A new invoice has been generated for you. You can find a detailed PDF version of the invoice attached to this email.</p>\n            \n            <div class=\"invoice-details\">\n                <strong>Summary:</strong><br>\n                Invoice Number: {{$node[\"Prepare All Data for Template\"].json.invoiceNumber}}<br>\n                Balance Due: ${{$node[\"Prepare All Data for Template\"].json.balanceDue}}\n            </div>\n            \n            <p>If you have any questions or concerns, please don't hesitate to contact us.</p>\n            \n            <p>Thank you for your business!</p>\n            \n            <p>\n                Best regards,<br>\n                The Team at YOUR COMPANY NAME\n            </p>\n        </div>\n\n        <div class=\"footer\">\n            <p>YOUR COMPANY NAME | Your Address | Your Phone Number</p>\n        </div>\n    </div>\n</body>\n</html>",
        "options": {
          "attachments": "=data"
        },
        "subject": "=Invoice {{$node[\"Prepare All Data for Template\"].json.invoiceNumber}} from YOUR COMPANY NAME",
        "toEmail": "company.ebtech@gmail.com",
        "fromEmail": "={{$node[\"Prepare All Data for Template\"].json.customerEmail}}"
      },
      "credentials": {
        "smtp": {
          "id": "ZSjtbi8UmObTzmbO",
          "name": "SMTP account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "af2a01c1-65a8-49a5-8b34-ce853125a5bf",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1168,
        416
      ],
      "parameters": {
        "color": 5,
        "width": 1264,
        "height": 1824,
        "content": "# 自动化 QuickBooks 发票到自定义 PDF 和电子邮件"
      },
      "typeVersion": 1
    },
    {
      "id": "6edf064f-44ed-449e-a597-bd1b0d71bbe2",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        432,
        1088
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 336,
        "content": "**1. 配置 Webhook**"
      },
      "typeVersion": 1
    },
    {
      "id": "09597ad8-12d2-4bc6-aaf4-e4478499e5b3",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1168,
        848
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 320,
        "content": "**2. 连接 QuickBooks**"
      },
      "typeVersion": 1
    },
    {
      "id": "6fb09bca-2e1b-434f-8a13-054e96f45e18",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        1088
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 336,
        "content": "**3. 添加您的徽标 URL**"
      },
      "typeVersion": 1
    },
    {
      "id": "269b246b-58cc-44f3-8bf2-44c30b8a5544",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        800,
        1472
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 320,
        "content": "**4. 添加您的签名 URL**"
      },
      "typeVersion": 1
    },
    {
      "id": "b6cb4da6-78f6-4090-99bf-c443ee044ce3",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2288,
        1120
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 320,
        "content": "**5. 设置您的 Gotenberg URL**"
      },
      "typeVersion": 1
    },
    {
      "id": "7b8bbac0-14a7-45ac-854c-84e43a5dd052",
      "name": "### 需要帮助?",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2624,
        1072
      ],
      "parameters": {
        "color": 5,
        "width": 256,
        "height": 368,
        "content": "**6. 配置您的电子邮件**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "8fcaea2c-adec-42a6-8dc4-1eb0ab254cee",
  "connections": {
    "Convert Logo to Base64": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Fetch Company Logo Image": {
      "main": [
        [
          {
            "node": "Convert Logo to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate PDF via Gotenberg": {
      "main": [
        [
          {
            "node": "Email PDF Invoice to Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert HTML to Binary File": {
      "main": [
        [
          {
            "node": "Generate PDF via Gotenberg",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Convert Signature to Base64": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Build HTML Invoice from Data": {
      "main": [
        [
          {
            "node": "Convert HTML to Binary File",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Company Signature Image": {
      "main": [
        [
          {
            "node": "Convert Signature to Base64",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Prepare All Data for Template": {
      "main": [
        [
          {
            "node": "Build HTML Invoice from Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Invoice Data from QuickBooks": {
      "main": [
        [
          {
            "node": "Combine Invoice, Logo & Signature",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Combine Invoice, Logo & Signature": {
      "main": [
        [
          {
            "node": "Prepare All Data for Template",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Listen for New QuickBooks Invoice": {
      "main": [
        [
          {
            "node": "Get Invoice Data from QuickBooks",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Company Logo Image",
            "type": "main",
            "index": 0
          },
          {
            "node": "Fetch Company Signature Image",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 发票处理

需要付费吗?

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

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

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

外部链接
在 n8n.io 查看

分享此工作流