8
n8n 中文网amn8n.com

GitHub仓库被复刻时在Pipedrive中添加新线索

中级

这是一个Sales, Engineering领域的自动化工作流,包含 8 个节点。主要使用 If, Set, Pipedrive, HttpRequest, GithubTrigger 等节点。 GitHub仓库被复刻时在Pipedrive中添加新线索

前置要求
  • 可能需要目标 API 的认证凭证
  • GitHub Personal Access Token
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "instanceId": "237600ca44303ce91fa31ee72babcdc8493f55ee2c0e8aa2b78b3b4ce6f70bd9"
  },
  "nodes": [
    {
      "id": "a84fa822-fd74-45db-93c6-f51be75ef307",
      "name": "人员存在",
      "type": "n8n-nodes-base.if",
      "position": [
        920,
        340
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{$json[\"name\"]}}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "500ef1bd-8965-4245-81d7-14c3897b4275",
      "name": "设置人员 ID",
      "type": "n8n-nodes-base.set",
      "position": [
        1480,
        320
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "PipedrivePersonId",
              "value": "={{ $json[\"id\"] }}"
            }
          ]
        },
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "ab1a1335-92c8-41f8-b008-5b19530f08e9",
      "name": "创建潜在客户",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        1740,
        320
      ],
      "parameters": {
        "title": "=Repo '{{$node[\"On fork\"].json[\"body\"][\"repository\"][\"full_name\"]}}' forked by {{$json[\"name\"]}}",
        "resource": "lead",
        "person_id": "={{$json[\"PipedrivePersonId\"]}}",
        "associateWith": "person",
        "additionalFields": {}
      },
      "credentials": {
        "pipedriveApi": {
          "id": "1",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4fd06c6a-4975-4a6a-95f3-bb48f3e9bdf6",
      "name": "在分支时",
      "type": "n8n-nodes-base.githubTrigger",
      "position": [
        180,
        340
      ],
      "webhookId": "ff05ca29-9ed3-4b97-a4ce-4f9b1c05255f",
      "parameters": {
        "owner": "John-n8n",
        "events": [
          "fork"
        ],
        "repository": "DemoRepo"
      },
      "credentials": {
        "githubApi": {
          "id": "7",
          "name": "GitHub account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "86554078-ce7c-4dd3-b36f-d1bf22530f7b",
      "name": "创建人员",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        1200,
        440
      ],
      "parameters": {
        "name": "={{ $node[\"On fork\"].json[\"body\"].forkee.owner.login }}",
        "resource": "person",
        "additionalFields": {
          "email": [
            "={{$node[\"Get Github user information\"].email}}"
          ]
        }
      },
      "credentials": {
        "pipedriveApi": {
          "id": "1",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "c4a8dae8-d6f3-4309-8fa5-78d69cf1b1e8",
      "name": "使用 GitHub URL 创建备注",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        1980,
        320
      ],
      "parameters": {
        "content": "=Github user url: {{ $node[\"On fork\"].json[\"body\"].sender.html_url }}",
        "resource": "note",
        "additionalFields": {
          "lead_id": "={{ $json[\"id\"] }}"
        }
      },
      "credentials": {
        "pipedriveApi": {
          "id": "1",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8dfa3e8e-29d8-4098-825d-8ec915ca6f3f",
      "name": "获取 GitHub 用户信息",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        440,
        340
      ],
      "parameters": {
        "url": "={{$json[\"body\"].sender.url}}",
        "options": {},
        "authentication": "predefinedCredentialType",
        "nodeCredentialType": "githubApi"
      },
      "credentials": {
        "githubApi": {
          "id": "7",
          "name": "GitHub account"
        }
      },
      "typeVersion": 2
    },
    {
      "id": "c4c2538a-28e8-4c75-856d-000a727a4f13",
      "name": "通过邮箱在 Pipedrive 中搜索复刻者",
      "type": "n8n-nodes-base.pipedrive",
      "position": [
        680,
        340
      ],
      "parameters": {
        "term": "={{ $json[\"email\"]}}",
        "resource": "person",
        "operation": "search",
        "additionalFields": {
          "fields": "email"
        }
      },
      "credentials": {
        "pipedriveApi": {
          "id": "1",
          "name": "Pipedrive account"
        }
      },
      "typeVersion": 1,
      "alwaysOutputData": true
    }
  ],
  "connections": {
    "On fork": {
      "main": [
        [
          {
            "node": "Get Github user information",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create lead": {
      "main": [
        [
          {
            "node": "Create note with github url",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create person": {
      "main": [
        [
          {
            "node": "Set person Id",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Set person Id": {
      "main": [
        [
          {
            "node": "Create lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "person exists": {
      "main": [
        [
          {
            "node": "Set person Id",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Create person",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Github user information": {
      "main": [
        [
          {
            "node": "Search forkee in Pipedrive by email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search forkee in Pipedrive by email": {
      "main": [
        [
          {
            "node": "person exists",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 销售, 工程

需要付费吗?

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

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

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

作者
n8n Team

n8n Team

@n8n-team

Meet the official n8n team. We specialize in building workflows that transform intricate tasks into seamless operations.

外部链接
在 n8n.io 查看

分享此工作流