8
n8n 中文网amn8n.com

实时QuickBooks发票同步到Slack

中级

这是一个Invoice Processing, Multimodal AI领域的自动化工作流,包含 10 个节点。主要使用 Code, Slack, Webhook, Quickbooks 等节点。 在Slack中自动化实时QuickBooks发票提醒

前置要求
  • Slack Bot Token 或 Webhook URL
  • HTTP Webhook 端点(n8n 会自动生成)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "HryakGwRjy2LO1wa",
  "meta": {
    "instanceId": "1a54c41d9050a8f1fa6f74ca858828ad9fb97b9fafa3e9760e576171c531a787"
  },
  "name": "实时 QuickBooks 发票同步到 Slack",
  "tags": [],
  "nodes": [
    {
      "id": "4cbf005e-2368-4c6d-b3ab-e3530953ad40",
      "name": "QuickBooks Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        120,
        900
      ],
      "webhookId": "{YOUR_WEBHOOK_ID}",
      "parameters": {
        "path": "quickbooks-invoice",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 1
    },
    {
      "id": "0537ea5b-7013-4190-97ae-6e54501049bc",
      "name": "代码",
      "type": "n8n-nodes-base.code",
      "position": [
        1300,
        900
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  return {\n    json: {\n      ID: item.json.Id,\n      Domain: item.json.domain,\n      \"Customer Name\": item.json.CustomerRef?.name || \"\",\n      \"Due Date\": item.json.DueDate || \"\"\n    }\n  };\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "edb8d672-8327-4218-810e-17fc6a24d35f",
      "name": "获取发票",
      "type": "n8n-nodes-base.quickbooks",
      "position": [
        740,
        900
      ],
      "parameters": {
        "resource": "invoice",
        "invoiceId": "={{ $json.body.eventNotifications[0].dataChangeEvent.entities[0].id }}"
      },
      "typeVersion": 1
    },
    {
      "id": "75b72ba9-98a1-4369-a930-2189e3cead72",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        0,
        -40
      ],
      "parameters": {
        "color": 3,
        "width": 480,
        "height": 360,
        "content": "## 🛠️ 先决条件"
      },
      "typeVersion": 1
    },
    {
      "id": "ca26318b-5b28-4f13-b46e-ec7c6e055579",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -60,
        1040
      ],
      "parameters": {
        "width": 380,
        "height": 360,
        "content": "### 步骤 1:Webhook 触发器已激活!🪝📢"
      },
      "typeVersion": 1
    },
    {
      "id": "de869e01-8b5d-40f6-a441-367ed61d32cd",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        560,
        480
      ],
      "parameters": {
        "color": 5,
        "width": 460,
        "height": 400,
        "content": "### 步骤 2:发票数据获取器 📄🔍"
      },
      "typeVersion": 1
    },
    {
      "id": "9e919726-2e33-4d1a-90af-ce811a5435c0",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1140,
        1040
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 320,
        "content": "### 步骤 3:JSON 格式化器 🛠️📦"
      },
      "typeVersion": 1
    },
    {
      "id": "7e01de38-6b16-48fa-b125-dd0da09472de",
      "name": "便签4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1700,
        440
      ],
      "parameters": {
        "color": 6,
        "width": 540,
        "height": 440,
        "content": "### 步骤 4:Slack 消息生成器 💬⚡"
      },
      "typeVersion": 1
    },
    {
      "id": "0bd08387-d175-44f4-8f83-d37792c76de0",
      "name": "发送消息",
      "type": "n8n-nodes-base.slack",
      "position": [
        1960,
        900
      ],
      "webhookId": "3022ba8d-9f02-474a-9bed-997eea9a690d",
      "parameters": {
        "text": "=Invoice having ID: {{ $json.ID }} having the Domain: {{ $json.Domain }} for the customer {{ $json[\"Customer Name\"] }} which is due on {{ $json[\"Due Date\"] }} has been generated successfully\n",
        "select": "channel",
        "blocksUi": "=[\n  {\n    \"type\": \"section\",\n    \"text\": {\n      \"type\": \"mrkdwn\",\n      \"text\": \"Invoice having ID: {{ $json.ID }} having the Domain: {{ $json.Domain }} for the customer {{ $json['Customer Name'] }} which is due on {{ $json['Due Date'] }} has been generated successfully\"\n    }\n  }\n]\n",
        "channelId": {
          "__rl": true,
          "mode": "list",
          "value": "{YOUR_SLACK_CHANNEL_ID}",
          "cachedResultName": "n8nmessages"
        },
        "messageType": "block",
        "otherOptions": {},
        "authentication": "oAuth2"
      },
      "typeVersion": 2.3
    },
    {
      "id": "33917945-18e9-4a9a-8bf2-9bb131838de5",
      "name": "便签5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1880,
        1120
      ],
      "parameters": {
        "color": 3,
        "width": 420,
        "height": 320,
        "content": "### 联系我们"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "51ee5907-ffb1-46fe-8ea9-cda24f3190a9",
  "connections": {
    "Code": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get an invoice": {
      "main": [
        [
          {
            "node": "Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "QuickBooks Webhook": {
      "main": [
        [
          {
            "node": "Get an invoice",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 发票处理, 多模态 AI

需要付费吗?

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

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

适合有一定经验的用户,包含 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 查看

分享此工作流