8
n8n 中文网amn8n.com

从Stripe支付和客户创建自动生成QuickBooks销售收据

高级

这是一个Miscellaneous, Multimodal AI领域的自动化工作流,包含 17 个节点。主要使用 If, Code, Merge, Stripe, Webhook 等节点。 从Stripe支付自动化QuickBooks销售收据和客户创建

前置要求
  • Stripe API Key
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "mbJzXoWPLzePg3yv",
  "meta": {
    "instanceId": "1a54c41d9050a8f1fa6f74ca858828ad9fb97b9fafa3e9760e576171c531a787"
  },
  "name": "从 Stripe 支付和客户创建自动生成 QuickBooks 销售收据",
  "tags": [],
  "nodes": [
    {
      "id": "fb397649-1ad0-4463-9fb8-49e108d8bc79",
      "name": "QuickBooks - 查找客户",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        2720,
        1040
      ],
      "parameters": {
        "limit": 500,
        "filters": {
          "query": "=WHERE DisplayName = '{{ $json.name }}'\n\n"
        },
        "operation": "getAll"
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "73f28e8b-93b2-4558-9ec7-230da270ec68",
      "name": "IF - 客户是否存在?",
      "type": "n8n-nodes-base.if",
      "position": [
        3712,
        1472
      ],
      "parameters": {
        "conditions": {
          "number": [
            {
              "value1": "={{ $json.Id ?? \"\" }}",
              "operation": "isEmpty"
            }
          ]
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": false
    },
    {
      "id": "25aec5a5-126e-4742-ab8a-011c18b26db7",
      "name": "创建客户",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        4800,
        992
      ],
      "parameters": {
        "operation": "create",
        "displayName": "={{ $('Get a customer').item.json.name }}",
        "additionalFields": {
          "PrimaryEmailAddr": "={{ $('Get a customer').item.json.email }}"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "6bca213b-7091-4665-bc11-5c903acb155f",
      "name": "创建支付",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        6880,
        992
      ],
      "parameters": {
        "TotalAmt": "={{ $('Convert payment Amount').item.json.convertedAmount }}",
        "resource": "payment",
        "operation": "create",
        "CustomerRef": "={{ $json.Id }}",
        "additionalFields": {}
      },
      "typeVersion": 1
    },
    {
      "id": "7bf091c8-9387-4934-bec7-7d2ef106c5ea",
      "name": "获取客户",
      "type": "n8n-nodes-base.stripe",
      "position": [
        1744,
        1520
      ],
      "parameters": {
        "resource": "customer",
        "customerId": "={{ $json.body.data.object.customer }}"
      },
      "typeVersion": 1
    },
    {
      "id": "5e2a9bfc-45f4-407a-b40e-6244123003eb",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        5856,
        1472
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "4cc8fdbd-19b2-40d3-8925-1516b66ef8d0",
      "name": "捕获支付",
      "type": "n8n-nodes-base.webhook",
      "position": [
        64,
        1488
      ],
      "webhookId": "3a5c2d05-9c40-43f0-898e-90a5fde7280b",
      "parameters": {
        "path": "3a5c2d05-9c40-43f0-898e-90a5fde7280b",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "77fcc804-50f2-4e82-8a9d-100be12a0fef",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        1120
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 512,
        "content": "### **步骤 1 – Webhook(捕获支付)**"
      },
      "typeVersion": 1
    },
    {
      "id": "194c40c9-e398-4b78-a537-1c999570304d",
      "name": "转换支付金额",
      "type": "n8n-nodes-base.code",
      "position": [
        928,
        1072
      ],
      "parameters": {
        "jsCode": "// n8n Code Node (JavaScript)\n\nreturn items.map(item => {\n  const amount = $input.first().json.body.data.object.amount;\n  \n  // Convert from cents to dollars\n  const convertedAmount = amount / 100;\n\n  // Add the new value to the output JSON\n  item.json.convertedAmount = convertedAmount;\n\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "29c99c71-3c5d-4255-bd7a-522874ef43e5",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        736,
        752
      ],
      "parameters": {
        "width": 480,
        "height": 512,
        "content": "### **步骤 2 – 代码(解析支付金额)**"
      },
      "typeVersion": 1
    },
    {
      "id": "45b854bb-cd87-4cf6-a67d-bc6a21a2e080",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1536,
        1280
      ],
      "parameters": {
        "color": 4,
        "width": 496,
        "height": 432,
        "content": "### **步骤 3 – 获取客户(Stripe)**"
      },
      "typeVersion": 1
    },
    {
      "id": "ae0e4c66-fac8-4514-b816-8de9ed4e4961",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2576,
        768
      ],
      "parameters": {
        "color": 5,
        "width": 400,
        "height": 448,
        "content": "### **步骤 4 – 查找客户(QuickBooks)**"
      },
      "typeVersion": 1
    },
    {
      "id": "cfdca3ee-8198-46e5-9729-9c9bcd7f3112",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        3552,
        1232
      ],
      "parameters": {
        "color": 3,
        "width": 432,
        "height": 384,
        "content": "### **步骤 5 – IF 节点:客户是否存在?**"
      },
      "typeVersion": 1
    },
    {
      "id": "e4d83682-634b-43f7-8a10-108f922edb0c",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        4624,
        784
      ],
      "parameters": {
        "width": 448,
        "height": 368,
        "content": "### **步骤 6 – 在 QuickBooks 中创建客户**"
      },
      "typeVersion": 1
    },
    {
      "id": "89751237-b9f3-4ace-adcb-4720aa04d5c6",
      "name": "便签6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        5680,
        1232
      ],
      "parameters": {
        "color": 6,
        "width": 448,
        "height": 416,
        "content": "### **步骤 7 – 合并客户数据**"
      },
      "typeVersion": 1
    },
    {
      "id": "674159c2-9903-4fb3-a36e-a25d4ea847d0",
      "name": "便签7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        6720,
        768
      ],
      "parameters": {
        "color": 4,
        "width": 416,
        "height": 384,
        "content": "### **步骤 8 – 在 QuickBooks 中创建销售收据**"
      },
      "typeVersion": 1
    },
    {
      "id": "2bc405e8-a7de-4e4b-afe4-58a064311f91",
      "name": "便签8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -96,
        592
      ],
      "parameters": {
        "color": 4,
        "width": 560,
        "height": 432,
        "content": "### **先决条件**"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "9d1ff60d-2326-486a-968c-b0fee80f6efc",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Create a payment",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get a customer": {
      "main": [
        [
          {
            "node": "QuickBooks - Find Customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Capture Payment": {
      "main": [
        [
          {
            "node": "Convert payment Amount",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a customer": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF - Customer Exists?": {
      "main": [
        [
          {
            "node": "Create a customer",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Convert payment Amount": {
      "main": [
        [
          {
            "node": "Get a customer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QuickBooks - Find Customer": {
      "main": [
        [
          {
            "node": "IF - Customer Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

高级 - 杂项, 多模态 AI

需要付费吗?

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

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

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

作者
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 查看

分享此工作流