8
n8n 中文网amn8n.com

基于Google Sheet数据在Quickbook中创建客户和销售收据

中级

这是一个Invoice Processing领域的自动化工作流,包含 8 个节点。主要使用 If, Quickbooks, GoogleSheetsTrigger 等节点。 从Google Sheet自动化QuickBooks客户和销售收据生成

前置要求
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "0PCgKBDaVH6uI0KX",
  "meta": {
    "instanceId": "1a54c41d9050a8f1fa6f74ca858828ad9fb97b9fafa3e9760e576171c531a787",
    "templateCredsSetupCompleted": true
  },
  "name": "基于Google Sheet数据在Quickbook中创建客户和销售收据",
  "tags": [],
  "nodes": [
    {
      "id": "01eb09e0-1209-4614-ab15-16ee134500b4",
      "name": "Google Sheets 触发器",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -360,
        -60
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1vHkhooOUi5AbeLg-HG72jU-jCCJncqdEyY3dXboQc1g/edit#gid=0",
          "cachedResultName": "Customers"
        },
        "documentId": {
          "__rl": true,
          "mode": "url",
          "value": "https://docs.google.com/spreadsheets/d/1vHkhooOUi5AbeLg-HG72jU-jCCJncqdEyY3dXboQc1g/edit?gid=0#gid=0"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "2QhkhdXWYCUB5Sf9",
          "name": "Google Sheets Trigger account 3"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "generated-601704ef-7cbd-449a-afd3-da0f6d324ddd",
      "name": "工作流概览",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -580,
        -400
      ],
      "parameters": {
        "width": 800,
        "height": 280,
        "content": "## 工作流概览"
      }
    },
    {
      "id": "generated-b0d6eeec-8888-4a1a-a47e-6e4507bd358c",
      "name": "QuickBooks客户检查与创建",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -200,
        200
      ],
      "parameters": {
        "color": 4,
        "width": 800,
        "height": 280,
        "content": "### QuickBooks客户检查与创建"
      }
    },
    {
      "id": "generated-2e0f8a9c-3a00-4222-997a-ccfd0dfdd357",
      "name": "客户是否存在?",
      "type": "n8n-nodes-base.if",
      "position": [
        440,
        40
      ],
      "parameters": {
        "options": {
          "ignoreCase": true,
          "looseTypeValidation": true
        },
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "ba271f0d-1115-4bb7-a39b-7b2e97afe9cb",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $('Get many customers').all().length }}",
              "rightValue": 0
            }
          ]
        }
      }
    },
    {
      "id": "generated-035f9a50-5501-4f7e-a282-4054830fd813",
      "name": "创建客户",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        760,
        160
      ],
      "parameters": {
        "operation": "create",
        "displayName": "={{ $json[\"Customer Name\"] }}",
        "additionalFields": {
          "Active": true,
          "Balance": "",
          "Taxable": false,
          "GivenName": "",
          "FamilyName": "",
          "CompanyName": "",
          "PrimaryPhone": "={{ $json.Phone }}",
          "BillWithParent": false,
          "BalanceWithJobs": 0,
          "PrimaryEmailAddr": "={{ $json.Email }}",
          "PrintOnCheckName": "",
          "FullyQualifiedName": "",
          "PreferredDeliveryMethod": "Print"
        }
      },
      "credentials": {
        "quickBooksOAuth2Api": {
          "id": "cOFFQQfsoezdBS0c",
          "name": "QuickBooks Online account 2"
        }
      }
    },
    {
      "id": "generated-f97635f5-7da3-4756-9569-88abcf4259ea",
      "name": "创建销售收据",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        1020,
        -20
      ],
      "parameters": {
        "resource": "payment",
        "operation": "create",
        "CustomerRef": "={{ $json.Id || $json.customer.Id }}",
        "additionalFields": {
          "TxnDate": ""
        }
      },
      "credentials": {
        "quickBooksOAuth2Api": {
          "id": "cOFFQQfsoezdBS0c",
          "name": "QuickBooks Online account 2"
        }
      }
    },
    {
      "id": "ae9dae6f-5c70-4547-8dd7-90fd4eb3b431",
      "name": "QuickBooks客户检查与创建1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        -380
      ],
      "parameters": {
        "color": 4,
        "width": 820,
        "height": 340,
        "content": "### 销售收据"
      },
      "typeVersion": 1
    },
    {
      "id": "0b6028de-052f-40ad-a384-c126f3d2c20a",
      "name": "检查客户存在性",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        60,
        0
      ],
      "parameters": {
        "filters": {
          "query": "=DisplayName = '{{ $json[\"Customer Name\"] }}'"
        },
        "operation": "getAll"
      },
      "credentials": {
        "quickBooksOAuth2Api": {
          "id": "cOFFQQfsoezdBS0c",
          "name": "QuickBooks Online account 2"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "32e15321-dbce-4da0-b087-1bd2c8902643",
  "connections": {
    "Create Customer": {
      "main": [
        [
          {
            "node": "Create Sales Receipt",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Customer Exists?": {
      "main": [
        [
          {
            "node": "Create Sales Receipt",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets Trigger": {
      "main": [
        [
          {
            "node": "Create a customer",
            "type": "main",
            "index": 0
          },
          {
            "node": "Check Customer Existence",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Customer Existence": {
      "main": [
        [
          {
            "node": "Customer Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 发票处理

需要付费吗?

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

工作流信息
难度等级
中级
节点数量8
分类1
节点类型4
难度说明

适合有一定经验的用户,包含 6-15 个节点的中等复杂度工作流

作者
Intuz

Intuz

@intuz

Workflow automation can help automate your routine activities and help saves $$$, as well as hours of time. As a boutique tech consulting company, Intuz help businesses with custom AI/ML, AI Workflow Automations, and software development. Automate your business workflow for: Sales Marketing Accounting Finance Operations E-Commerce Customer Support Admin & Backoffice Logistics & Supply Chain

外部链接
在 n8n.io 查看

分享此工作流