8
n8n 中文网amn8n.com

11 - B2B 情报上传链接

中级

这是一个Lead Generation, Multimodal AI领域的自动化工作流,包含 13 个节点。主要使用 If, Set, Hubspot, GoogleSheets, OpenAi 等节点。 使用 GPT-4o-mini 自动丰富并同步 Google Sheets 中的公司信息到 HubSpot

前置要求
  • HubSpot API Key
  • Google Sheets API 凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "id": "REMOVED_FOR_PRIVACY",
  "meta": {
    "instanceId": "REMOVED_FOR_PRIVACY",
    "templateCredsSetupCompleted": true
  },
  "name": "11 - B2B 情报上传链接",
  "tags": [],
  "nodes": [
    {
      "id": "6cb9736d-0484-41e5-bb15-1dad740b7ca8",
      "name": "📥 表格触发器 - 新公司",
      "type": "n8n-nodes-base.googleSheetsTrigger",
      "position": [
        -1780,
        80
      ],
      "parameters": {
        "event": "rowAdded",
        "options": {},
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Company's"
        }
      },
      "credentials": {
        "googleSheetsTriggerOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_CREDENTIAL_ID",
          "name": "Google Sheets Trigger account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ffb9fb95-1acf-496f-89d0-f8ee4a8e5281",
      "name": "🧹 过滤器:非空公司名称",
      "type": "n8n-nodes-base.if",
      "position": [
        -1560,
        80
      ],
      "parameters": {
        "conditions": {
          "string": [
            {
              "value1": "={{ $json['Company Name'] }}",
              "operation": "isNotEmpty"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "8a554f66-63ed-432a-a7cf-1eced7e69cfd",
      "name": "🤖 OpenAI 数据增强 (GPT-4o-mini)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1340,
        80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {
          "maxTokens": 500,
          "temperature": 0.3
        },
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are a business intelligence assistant that provides accurate company information. Return your response as a valid JSON object with the following structure:\n{\n  \"Company Name\": \"string\"\n  \"industry\": \"string\",\n  \"description\": \"string (max 200 characters)\",\n  \"company_size\": \"string (Small/Medium/Large/Enterprise)\",\n  \"headquarters\": \"string (City, Country)\",\n  \"website\": \"string (if known, otherwise null)\",\n  \"founded_year\": \"number (if known, otherwise null)\",\n  \"business_type\": \"string (B2B/B2C/B2B2C)\"\n}\n\nProvide accurate information based on your knowledge. If you're unsure about specific details, use null for that field."
            },
            {
              "content": "=Provide detailed information about the company: {{ $json['Company Name'] }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "id": "YOUR_OPENAI_CREDENTIAL_ID",
          "name": "OpenAI account"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "66bd0732-d785-4360-9037-1c111da4b7cb",
      "name": "🧾 解析增强数据",
      "type": "n8n-nodes-base.set",
      "position": [
        -964,
        80
      ],
      "parameters": {
        "mode": "raw",
        "options": {},
        "jsonOutput": "={{ $json.message.content }}"
      },
      "typeVersion": 3
    },
    {
      "id": "985924aa-dd77-4d2c-9648-26d6b842942d",
      "name": "🔍 HubSpot:通过域名查找公司",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -744,
        80
      ],
      "parameters": {
        "domain": "={{ $json[\"Company Name\"] }}",
        "options": {},
        "resource": "company",
        "operation": "searchByDomain",
        "authentication": "appToken"
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2,
      "alwaysOutputData": true
    },
    {
      "id": "bb322fb5-b449-4106-8f39-36c66b742a79",
      "name": "⚖️ 检查:公司是否存在于 HubSpot?",
      "type": "n8n-nodes-base.if",
      "position": [
        -524,
        80
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "e394276a-8753-46d6-bb4e-e993263ef805",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "bed544fe-3b79-4cd7-9fc9-d938195f73fd",
      "name": "🏢 在 HubSpot 创建公司",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -304,
        155
      ],
      "parameters": {
        "name": "={{ $('🧾 Parse Enriched Data').item.json[\"Company Name\"] }}",
        "resource": "company",
        "authentication": "appToken",
        "additionalFields": {
          "websiteUrl": "={{ $('🧾 Parse Enriched Data').item.json.website }}",
          "description": "={{ $('🧾 Parse Enriched Data').item.json.description }}",
          "yearFounded": "={{ $('🧾 Parse Enriched Data').item.json.founded_year }}",
          "countryRegion": "={{ $('🧾 Parse Enriched Data').item.json.headquarters }}"
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "id": "YOUR_HUBSPOT_CREDENTIAL_ID",
          "name": "HubSpot account"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "bf7b2709-51e7-47bb-99f3-9577cd017484",
      "name": "🧰 准备表格数据",
      "type": "n8n-nodes-base.set",
      "position": [
        -84,
        80
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "471e239f-294c-42c7-8077-8631efe0212e",
      "name": "📊 更新 Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        136,
        80
      ],
      "parameters": {
        "columns": {
          "value": {
            "Website": "={{ $('🧾 Parse Enriched Data').item.json.website }}",
            "Industry": "={{ $('🧾 Parse Enriched Data').item.json.industry }}",
            "Description": "={{ $('🧾 Parse Enriched Data').item.json.description }}",
            "Headquaters": "={{ $('🧾 Parse Enriched Data').item.json.headquarters }}",
            "Company Name": "={{ $('🧾 Parse Enriched Data').item.json[\"Company Name\"] }}",
            "Company Size": "={{ $('🧾 Parse Enriched Data').item.json.company_size }}",
            "Founded Year": "={{ $('🧾 Parse Enriched Data').item.json.founded_year }}",
            "Buisness Type": "={{ $('🧾 Parse Enriched Data').item.json.business_type }}"
          },
          "schema": [
            {
              "id": "Company Name",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Industry",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Industry",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Description",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Description",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Size",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Company Size",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Headquaters",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Headquaters",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Founded Year",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Founded Year",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Buisness Type",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Buisness Type",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Company Name"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_GOOGLE_SHEET_ID",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_GOOGLE_SHEET_ID/edit?usp=drivesdk",
          "cachedResultName": "Company's"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "YOUR_GOOGLE_SHEETS_OAUTH_CREDENTIAL_ID",
          "name": "Google Sheets account"
        }
      },
      "typeVersion": 4
    },
    {
      "id": "cc020973-ba65-4d33-8418-0d11e46b5f0a",
      "name": "便签",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1840,
        -140
      ],
      "parameters": {
        "color": 5,
        "width": 440,
        "height": 560,
        "content": "## 潜在客户接收过滤器"
      },
      "typeVersion": 1
    },
    {
      "id": "f7704369-4be3-4505-9dc4-e92115804665",
      "name": "便签1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1380,
        -140
      ],
      "parameters": {
        "color": 3,
        "width": 580,
        "height": 560,
        "content": "## 通过 GPT-4o-mini 获取公司情报"
      },
      "typeVersion": 1
    },
    {
      "id": "08b3b367-79cc-4d7d-bc1d-65323fa72cb7",
      "name": "便签2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -780,
        -140
      ],
      "parameters": {
        "width": 620,
        "height": 560,
        "content": "## CRM 同步:HubSpot 公司管理"
      },
      "typeVersion": 1
    },
    {
      "id": "74983ef9-6c90-42f8-95be-b53343030af7",
      "name": "便签3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -140,
        -140
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 560,
        "content": "## Google Sheets 记录保存"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "REMOVED_FOR_PRIVACY",
  "connections": {
    "🧰 Prepare Sheet Data": {
      "main": [
        [
          {
            "node": "📊 Update Google Sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📊 Update Google Sheet": {
      "main": [
        []
      ]
    },
    "🧾 Parse Enriched Data": {
      "main": [
        [
          {
            "node": "🔍 HubSpot: Find Company by Domain",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🏢 Create Company in HubSpot": {
      "main": [
        [
          {
            "node": "🧰 Prepare Sheet Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📥 Sheet Trigger - New Company": {
      "main": [
        [
          {
            "node": "🧹 Filter: Non-Empty Company Name'",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🔍 HubSpot: Find Company by Domain": {
      "main": [
        [
          {
            "node": "⚖️ Check: Company Exists in HubSpot?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🤖 OpenAI Enrichment (GPT-4o-mini)": {
      "main": [
        [
          {
            "node": "🧾 Parse Enriched Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧹 Filter: Non-Empty Company Name'": {
      "main": [
        [
          {
            "node": "🤖 OpenAI Enrichment (GPT-4o-mini)",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "⚖️ Check: Company Exists in HubSpot?": {
      "main": [
        [
          {
            "node": "🧰 Prepare Sheet Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "🏢 Create Company in HubSpot",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 潜在客户开发, 多模态 AI

需要付费吗?

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

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

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

作者
Avkash Kakdiya

Avkash Kakdiya

@itechnotion

🚀 Founder of iTechNotion — we build custom AI-powered automation workflows for startups, agencies, and founders. 💡 Specializing in agentic AI systems, content automation, sales funnels, and digital workers. 🔧 14+ years in tech | Building scalable no-code/low-code solutions using n8n, OpenAI, and other API-first tools. 📬 Let’s automate what slows you down.

外部链接
在 n8n.io 查看

分享此工作流