8
n8n 中文网amn8n.com

在Google Sheets中跟踪Pipedrive交易用于销售管道报告

中级

这是一个CRM, Multimodal AI领域的自动化工作流,包含 11 个节点。主要使用 Set, Code, Merge, Pipedrive, GoogleSheets 等节点。 在Google Sheets中跟踪Pipedrive交易用于销售管道报告

前置要求
  • Google Sheets API 凭证
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "ad0113c344ee237399e44e9f11798b05baeb83a6196d514a9ae9d2ad71c3b5c9",
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "da1b90d1-a828-484d-85f7-d67c9463d4de",
      "name": "获取多个交易1",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        -528,
        7312
      ],
      "parameters": {
        "filters": {},
        "operation": "getAll",
        "returnAll": true
      },
      "credentials": {
        "pipedriveApi": {
          "id": "Tk6DUhlSCIuPlg0c",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "94915914-ea83-49c3-8f82-e60213af604a",
      "name": "便签12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -624,
        6912
      ],
      "parameters": {
        "color": 3,
        "width": 288,
        "height": 544,
        "content": "### 2️⃣ 连接 Pipedrive"
      },
      "typeVersion": 1
    },
    {
      "id": "e206c83f-d4e9-421e-b84c-7ef3200357ed",
      "name": "当点击“执行工作流”时",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -656,
        7312
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "845b7a0b-d4bc-4041-8c76-0c4d7dec578b",
      "name": "分类阶段",
      "type": "n8n-nodes-base.code",
      "position": [
        -192,
        6912
      ],
      "parameters": {
        "jsCode": "// Code node: Rename stage_id numbers to names\n// Input: items with item.json.stage_id\n// Output: item.json.stage_name (string)\n\nconst stageMap = {\n  1: \"Prospecting\",\n  2: \"Qualified\",\n  3: \"Proposal Sent\",\n  4: \"Negotiation\",\n  5: \"Closed Won\"\n};\n\nreturn items.map(item => {\n  const stageId = item.json.stage_id;\n  item.json.stage_name = stageMap[stageId] || `Unknown (${stageId})`;\n  return item;\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "a9191249-7b71-4218-ac59-4e6586f9c7f6",
      "name": "今日日期",
      "type": "n8n-nodes-base.code",
      "position": [
        -144,
        7376
      ],
      "parameters": {
        "jsCode": "return [\n  {\n    json: {\n      badges: {\n        today: new Date().toISOString().split('T')[0]  \n      }\n    }\n  }\n];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "c8317b16-77f2-4d03-b727-63d59ae6d0f1",
      "name": "合并",
      "type": "n8n-nodes-base.merge",
      "position": [
        64,
        7088
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineAll"
      },
      "typeVersion": 3.2
    },
    {
      "id": "a6d7d5de-64e3-42b8-8fe3-eb49c4809b31",
      "name": "便签13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        400,
        6848
      ],
      "parameters": {
        "color": 3,
        "width": 352,
        "height": 384,
        "content": "### 2️⃣ 准备您的 Google 表格"
      },
      "typeVersion": 1
    },
    {
      "id": "80f49397-1db1-44bf-b768-4abe02dc9a97",
      "name": "便签58",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -688,
        6688
      ],
      "parameters": {
        "color": 7,
        "width": 1488,
        "height": 928,
        "content": "# 📋 Pipedrive → Google 表格"
      },
      "typeVersion": 1
    },
    {
      "id": "e6e97e79-a17e-4c5a-9779-a82fc7f5d12f",
      "name": "便签 15",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1136,
        6688
      ],
      "parameters": {
        "width": 400,
        "height": 928,
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "14a3cd0a-d1b1-4a57-82fa-4a2e05d7cd1a",
      "name": "存储到 Google",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        528,
        7072
      ],
      "parameters": {
        "columns": {
          "value": {
            "Date": "={{ $json.Date }}",
            "Deal": "={{ $json.Deal }}",
            "stage_name": "={{ $json.stage_name }}"
          },
          "schema": [
            {
              "id": "Date",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Date",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "stage_name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "stage_name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Deal",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Deal",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "append",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u0i-sfPxmfmm5YMU3ekEdQgdOHA6OgnbI-VwuRMDq4Q/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "1u0i-sfPxmfmm5YMU3ekEdQgdOHA6OgnbI-VwuRMDq4Q",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1u0i-sfPxmfmm5YMU3ekEdQgdOHA6OgnbI-VwuRMDq4Q/edit?usp=drivesdk",
          "cachedResultName": "Pipedrive Progress"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "HlBW2puZbuCCq8jJ",
          "name": "Google Sheets account 3"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "d7536de3-e3cc-41cf-a60d-2b295358cbde",
      "name": "设置字段",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        7088
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "fc41847f-2c15-43ed-b627-970f270088ea",
              "name": "Date",
              "type": "string",
              "value": "={{ $json.badges.today }}"
            },
            {
              "id": "321b11b5-040f-4a34-b99b-55be66f97a39",
              "name": "stage_name",
              "type": "string",
              "value": "={{ $json.stage_name }}"
            },
            {
              "id": "cb9b3673-6826-400c-8d84-5cd29c095935",
              "name": "Deal",
              "type": "string",
              "value": "={{ $('Get many deals1').item.json.title }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    }
  ],
  "pinData": {},
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Set Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set Fields": {
      "main": [
        [
          {
            "node": "Store in google",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Today's Date": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get many deals1": {
      "main": [
        [
          {
            "node": "Categorize stages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Categorize stages": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Execute workflow’": {
      "main": [
        [
          {
            "node": "Get many deals1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 客户关系管理, 多模态 AI

需要付费吗?

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

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

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

作者
Robert Breen

Robert Breen

@rbreen

Professional services consultant with over 10 years of experience solving complex business problems across industries. I specialize in n8n and process automation—designing custom workflows that integrate tools like Google Calendar, Airtable, GPT, and internal systems. Whether you need to automate scheduling, sync data, or streamline operations, I build solutions that save time and drive results.

外部链接
在 n8n.io 查看

分享此工作流