Stripe → Pipedrive(自动创建人员+交易)

高级

这是一个Content Creation、Multimodal AI领域的自动化工作流,包含 16 个节点。主要使用 If、Set、Webhook、Pipedrive、HttpRequest 等节点。 Stripe → Pipedrive:从支付自动创建联系人和交易

前置要求
  • HTTP Webhook 端点(n8n 会自动生成)
  • 可能需要目标 API 的认证凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "mXqbFVOOlSD6kNIC",
  "meta": {
    "instanceId": "af9fe5bb0163dc4cbb85dd6fb4c45fe63eac1327996aeecd696d8f7aed2d776b"
  },
  "name": "Stripe → Pipedrive(自动创建人员+交易)",
  "tags": [
    {
      "id": "Af6k6it2U9my6q9Q",
      "name": "pipedrive",
      "createdAt": "2025-10-05T07:43:13.180Z",
      "updatedAt": "2025-10-05T07:43:13.180Z"
    },
    {
      "id": "YYaRjcTPQ5F8VMgV",
      "name": "stripe",
      "createdAt": "2025-10-05T07:43:08.134Z",
      "updatedAt": "2025-10-05T07:43:08.134Z"
    },
    {
      "id": "qtuQF3Lc141mfYiM",
      "name": "n8n template",
      "createdAt": "2025-09-11T07:44:43.900Z",
      "updatedAt": "2025-09-17T10:07:33.999Z"
    }
  ],
  "nodes": [
    {
      "id": "ee4fcc57-849c-4e74-bf2c-4ca93c6b6651",
      "name": "Stripe Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -1696,
        128
      ],
      "webhookId": "4ea76359-79a3-4724-8297-398cea3c0f21",
      "parameters": {
        "path": "stripe/4ea76359-79a3-4724-8297-398cea3c0f21",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2.1
    },
    {
      "id": "b85ff242-0fb5-4c49-b2aa-d4ba693c0eff",
      "name": "搜索联系人",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -1696,
        752
      ],
      "parameters": {
        "term": "={{ $json.data.object.customer_details.email }}",
        "resource": "person",
        "operation": "search",
        "returnAll": true,
        "additionalFields": {}
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    },
    {
      "id": "2c2d5603-c273-4e81-b8dd-92231c6c5490",
      "name": "创建联系人",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -1328,
        752
      ],
      "parameters": {
        "name": "={{ $('Check if event id is same').item.json.data.object.customer_details.email }}",
        "resource": "person",
        "additionalFields": {
          "email": [
            "={{ $('Check if event id is same').item.json.data.object.customer_details.email }}"
          ],
          "customProperties": {
            "property": [
              {
                "name": "b3fb48b7267e8c29b5e38ea00ac7d6a304a35aa7",
                "value": "={{ Number(     $('Stripe Webhook').item.json.body.data.object.amount_total     || $('Stripe Webhook').item.json.body.data.object.amount     || 0 ) / 100 }}"
              },
              {
                "name": "f727eccc234c3b4587fc699549bdfdce7b9f1ff1",
                "value": "Stripe"
              },
              {
                "name": "8f3e8ea545f8d8b75b9379758dc10b999fd764c1",
                "value": "={{ $('Stripe Webhook').item.json.body.data.object.payment_method_types[0] }}"
              },
              {
                "name": "7e78e1cec09a8d4c47d8f2538b2fced5ae11851e",
                "value": "={{ $('Stripe Webhook').item.json.body.data.object.payment_status }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "02872a84-39fe-4ec1-8d79-4ed6e86025c1",
      "name": "设置字段",
      "type": "n8n-nodes-base.set",
      "position": [
        -1440,
        128
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "5700f6e5-5f73-4e6e-8015-f89703e98fec",
              "name": "eventId",
              "type": "string",
              "value": "={{ $json.body.id }}"
            },
            {
              "id": "6597729e-e95d-47ab-b2ef-5cf7826b7c6f",
              "name": "eventType",
              "type": "string",
              "value": "={{ $json.body.type }}"
            },
            {
              "id": "0c3660f2-6465-470c-bf81-ddeea902f7de",
              "name": "payload",
              "type": "object",
              "value": "={{ $json.body.data.object }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "04913575-544f-4bba-85de-2d80aad0abc0",
      "name": "检查事件ID是否相同",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -1168,
        128
      ],
      "parameters": {
        "url": "=https://api.stripe.com/v1/events/{{ $json.eventId }}",
        "options": {},
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "id": "bAvGF9Yo6VYTfyir",
          "name": "Header Auth account"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "7bb40f1f-e751-4f36-9938-23cbf4c9f183",
      "name": "追加交易",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -592,
        752
      ],
      "parameters": {
        "title": "=Deposit — {{ $json.email[0].value }} — {{ Number(\n    $('Stripe Webhook').item.json.body.data.object.amount_total\n    || $('Stripe Webhook').item.json.body.data.object.amount\n    || 0\n) / 100 }}",
        "additionalFields": {
          "value": "={{ Number(\n    $('Stripe Webhook').item.json.body.data.object.amount_total\n    || $('Stripe Webhook').item.json.body.data.object.amount\n    || 0\n) / 100 }}",
          "person_id": "={{ $json.id }}",
          "customProperties": {
            "property": [
              {
                "name": "2c3f7005cae14a31a00631ecb0c9a9ac9164212b",
                "value": "={{ $('Set field').item.json.eventId }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "42ebf9ab-1cc6-4afb-9a39-84e187b726b3",
      "name": "如果事件ID存在",
      "type": "n8n-nodes-base.if",
      "position": [
        -864,
        656
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "267434a5-e6e1-4c2f-95d4-a30cd1774f7b",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $('Check if event id is same').item.json.id }}",
              "rightValue": "={{ $('Check if event id is same').item.json.id }}"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "4d41cc67-1961-42cf-8513-0d89105bec43",
      "name": "如果人员存在",
      "type": "n8n-nodes-base.if",
      "position": [
        -1520,
        752
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "571afebb-46e3-4694-8156-d198e558b638",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.item.emails[0] }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "b052c83a-3de5-486e-9935-18f0bf9ef15d",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        -96
      ],
      "parameters": {
        "color": 6,
        "width": 592,
        "height": 400,
        "content": "## 设置指南"
      },
      "typeVersion": 1
    },
    {
      "id": "8cbdb7ab-47e3-4003-aecb-33485cbb8c44",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        -96
      ],
      "parameters": {
        "color": 4,
        "width": 736,
        "height": 400,
        "content": "## 描述"
      },
      "typeVersion": 1
    },
    {
      "id": "dd170e8d-469f-47f9-9172-0f2f26c415f2",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2368,
        336
      ],
      "parameters": {
        "color": 5,
        "width": 592,
        "height": 608,
        "content": "## 工作原理(逐步说明)"
      },
      "typeVersion": 1
    },
    {
      "id": "5e28dc28-7999-4361-82f0-e6856a8ae2d8",
      "name": "创建交易",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -1168,
        752
      ],
      "parameters": {
        "title": "=Deposit — {{ $json.email[0].value }} — {{ Number(\n    $('Stripe Webhook').item.json.body.data.object.amount_total\n    || $('Stripe Webhook').item.json.body.data.object.amount\n    || 0\n) / 100 }}",
        "additionalFields": {
          "value": "={{ Number(\n    $('Stripe Webhook').item.json.body.data.object.amount_total\n    || $('Stripe Webhook').item.json.body.data.object.amount\n    || 0\n) / 100 }}",
          "person_id": "={{ $json.id }}",
          "customProperties": {
            "property": [
              {
                "name": "2c3f7005cae14a31a00631ecb0c9a9ac9164212b",
                "value": "={{ $('Set field').item.json.eventId }}"
              }
            ]
          }
        }
      },
      "typeVersion": 1
    },
    {
      "id": "a2d4afb9-d0cf-40a9-8da9-d94b126a6d55",
      "name": "不执行任何操作",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -400,
        608
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "ee468b0d-cae8-4a13-b187-f0eec0c6d1c7",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -944,
        336
      ],
      "parameters": {
        "width": 752,
        "height": 608,
        "content": "# 步骤3 - 检查事件是否不同以避免重复创建交易"
      },
      "typeVersion": 1
    },
    {
      "id": "1e7ffe51-e6af-4829-97fe-59b92cd2a933",
      "name": "便签说明4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1744,
        -96
      ],
      "parameters": {
        "width": 768,
        "height": 400,
        "content": "# 步骤1 - 初始设置"
      },
      "typeVersion": 1
    },
    {
      "id": "cfdb8846-c87c-40e7-8c8a-61c22ae6d1fd",
      "name": "便签说明5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1744,
        336
      ],
      "parameters": {
        "width": 768,
        "height": 608,
        "content": "# 步骤2 - 搜索联系人"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2237b3ce-4c15-4a80-bc92-0c8abb0eb0f2",
  "connections": {
    "Set field": {
      "main": [
        [
          {
            "node": "Check if event id is same",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Stripe Webhook": {
      "main": [
        [
          {
            "node": "Set field",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create a person": {
      "main": [
        [
          {
            "node": "Create a deal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search a person": {
      "main": [
        [
          {
            "node": "if person exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "if person exists": {
      "main": [
        [
          {
            "node": "If event id exist",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create a person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If event id exist": {
      "main": [
        [
          {
            "node": "Do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Append a deal",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if event id is same": {
      "main": [
        [
          {
            "node": "Search a person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

这是一个高级难度的工作流,适用于Content Creation、Multimodal AI等场景。适合高级用户,包含 16+ 个节点的复杂工作流

需要付费吗?

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

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

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

作者
Krishna Sharma

Krishna Sharma

@triggerall

An automation enthusiast, I help operations, sales, and marketing teams as well as founders, solopreneurs, freelancers, and growing businesses to streamline workflows and automate processes using n8n. 🚀 Need custom automation? Use the link below to book your initial consultation and let's build something powerful together.

外部链接
在 n8n.io 上查看 →

分享此工作流