使用 GPT-4o、Clearbit、HubSpot CRM 和 Slack 提醒筛选和路由潜在客户
高级
这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 18 个节点。主要使用 If, Code, Slack, Hubspot, Webhook 等节点。 使用 GPT-4o、Clearbit、HubSpot CRM 和 Slack 提醒筛选和路由潜在客户
前置要求
- •Slack Bot Token 或 Webhook URL
- •HubSpot API Key
- •HTTP Webhook 端点(n8n 会自动生成)
- •Airtable API Key
- •可能需要目标 API 的认证凭证
- •OpenAI API Key
使用的节点 (18)
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
"meta": {
"instanceId": "d23ca638a83fba54c06ee57ee6430730afe25e4177b234d2a702bd83cbe8f349"
},
"nodes": [
{
"id": "b0cc5f9e-3066-4d8b-b5a5-80ad8b249d08",
"name": "表单提交5",
"type": "n8n-nodes-base.webhook",
"position": [
2192,
5472
],
"webhookId": "lead-intake-webhook",
"parameters": {
"path": "lead-intake",
"options": {},
"httpMethod": "POST",
"responseMode": "lastNode"
},
"typeVersion": 2
},
{
"id": "3e0bf932-2b5e-44a5-ba9e-2c3a716eb672",
"name": "AI 潜在客户分析助手5",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2416,
5472
],
"parameters": {
"text": "=Analyze this lead submission and provide a JSON response with the following structure:\n\n{\n \"qualification_score\": [0-100 integer],\n \"buying_intent\": \"high\" | \"medium\" | \"low\",\n \"urgency_level\": \"immediate\" | \"this_week\" | \"this_month\" | \"exploratory\",\n \"budget_indicator\": \"enterprise\" | \"mid-market\" | \"small_business\" | \"unknown\",\n \"pain_points\": [\"list of identified pain points\"],\n \"recommended_action\": \"immediate_call\" | \"schedule_demo\" | \"nurture_sequence\" | \"disqualify\",\n \"summary\": \"2-3 sentence summary for sales team\"\n}\n\nLead Information:\nName: {{ $json.body.name }}\nEmail: {{ $json.body.email }}\nCompany: {{ $json.body.company }}\nMessage: {{ $json.body.message }}\nPhone: {{ $json.body.phone || 'Not provided' }}\nWebsite: {{ $json.body.website || 'Not provided' }}\n\n**IMPORTANT INSTRUCTIONS:**\n1. If website or email domain is available, USE the clearbit_enrichment tool to get company data\n2. Company size and revenue data are CRITICAL for accurate scoring\n3. Extract the domain from website URL or email address\n4. Call tool format: {\"domain\": \"company.com\"}\n5. Use enrichment data in your qualification scoring",
"options": {
"systemMessage": "You are an expert B2B lead qualification analyst with access to company enrichment tools.\n\nANALYSIS FRAMEWORK:\n1. ALWAYS use the clearbit_enrichment tool when you have a company domain\n2. Score leads based on weighted criteria:\n - Company size (30%): Enterprise (500+) = high score, SMB (<50) = medium/low\n - Buying signals (25%): Budget mentions, timeline, decision authority\n - Urgency (20%): Immediate needs score higher than exploratory\n - Budget fit (15%): Enterprise budget indicators vs small business\n - Pain severity (10%): Critical business problems vs nice-to-haves\n\n3. Scoring guidelines:\n - 90-100: Enterprise company + immediate urgency + clear budget + severe pain\n - 80-89: Large company (500+) OR immediate urgency with clear need\n - 70-79: Mid-market (50-500) with good intent OR enterprise with low urgency\n - 60-69: Small business with strong signals OR larger company vague inquiry\n - Below 60: Unqualified, unclear needs, no budget indicators\n\n4. Action recommendations:\n - immediate_call: Score 85+, clear urgency\n - schedule_demo: Score 70-84, good fit but less urgent\n - nurture_sequence: Score 50-69, potential but not ready\n - disqualify: Score <50, poor fit\n\nProvide objective, data-driven recommendations. Sales teams need clear, actionable guidance."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.7
},
{
"id": "e8a07af0-8c70-4ba2-bfb5-1e280aaa4a2a",
"name": "高质量潜在客户?5",
"type": "n8n-nodes-base.if",
"position": [
3200,
5472
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "qual-score-check",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.qualification_score }}",
"rightValue": 70
}
]
}
},
"typeVersion": 2
},
{
"id": "1d242346-2105-4bf2-890e-4ccb14d13283",
"name": "当被另一个工作流调用时",
"type": "n8n-nodes-base.executeWorkflowTrigger",
"position": [
656,
5584
],
"parameters": {},
"typeVersion": 1.1
},
{
"id": "30c2a7e3-5a34-477e-a7c4-cfbc3a0b4446",
"name": "Clearbit API",
"type": "n8n-nodes-base.httpRequest",
"position": [
880,
5584
],
"parameters": {
"url": "=https://company.clearbit.com/v2/companies/find?domain={{ $json.domain }}",
"options": {
"response": {
"response": {
"neverError": true
}
}
},
"authentication": "genericCredentialType",
"genericAuthType": "httpHeaderAuth"
},
"credentials": {
"httpHeaderAuth": {
"id": "exVxOWDpxBu7XVql",
"name": "nithichote.com header auth key"
}
},
"typeVersion": 4.2
},
{
"id": "9853452d-465b-4ff2-97e9-c1e1275b3410",
"name": "找到公司?",
"type": "n8n-nodes-base.if",
"position": [
1104,
5584
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "success-check",
"operator": {
"type": "string",
"operation": "notEmpty"
},
"leftValue": "={{ $json.name }}",
"rightValue": ""
}
]
}
},
"typeVersion": 2
},
{
"id": "f0befc3a-24f8-4042-bac7-53b2eb2df52f",
"name": "格式化数据",
"type": "n8n-nodes-base.code",
"position": [
1312,
5488
],
"parameters": {
"jsCode": "const c = $input.first().json;\n\nreturn {\n json: {\n success: true,\n company_name: c.name,\n domain: c.domain,\n employees: c.metrics?.employees || 0,\n employee_range: c.metrics?.employeesRange || 'Unknown',\n industry: c.category?.industry || 'Unknown',\n sector: c.category?.sector,\n description: c.description,\n location: [c.geo?.city, c.geo?.stateCode, c.geo?.country].filter(Boolean).join(', '),\n founded: c.foundedYear,\n annual_revenue: c.metrics?.annualRevenue,\n funding: c.metrics?.raised,\n tech: (c.tech || []).slice(0, 10).join(', '),\n summary: `${c.name} - ${c.category?.industry || 'company'}, ${c.metrics?.employeesRange || 'unknown size'}, ${c.geo?.city || 'location unknown'}`\n }\n};"
},
"typeVersion": 2
},
{
"id": "25fb30f0-00d0-4efe-ac31-0a2e00b87278",
"name": "无数据",
"type": "n8n-nodes-base.code",
"position": [
1312,
5696
],
"parameters": {
"jsCode": "return {\n json: {\n success: false,\n domain: $('When called by another workflow').first().json.domain,\n error: 'Company not found',\n summary: 'No data available'\n }\n};"
},
"typeVersion": 2
},
{
"id": "03a31c3b-426f-4c30-afab-bf958b6778c0",
"name": "便签1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2576,
6192
],
"parameters": {
"width": 1008,
"height": 944,
"content": "## 🎯 AI 潜在客户质量评估 + CRM 智能分析"
},
"typeVersion": 1
},
{
"id": "1bb8ccb4-f383-4af5-b29f-4ef79c52c415",
"name": "便签 2",
"type": "n8n-nodes-base.stickyNote",
"position": [
544,
6176
],
"parameters": {
"width": 960,
"height": 944,
"content": "## 🏢 Clearbit 公司数据丰富工具"
},
"typeVersion": 1
},
{
"id": "b000c32e-e629-4b96-807a-dd4566bd2475",
"name": "记录到 Airtable",
"type": "n8n-nodes-base.airtable",
"position": [
3424,
5568
],
"parameters": {
"base": {
"__rl": true,
"mode": "id",
"value": "REPLACE_WITH_AIRTABLE_BASE_ID"
},
"table": {
"__rl": true,
"mode": "id",
"value": "REPLACE_WITH_AIRTABLE_TABLE_ID"
},
"columns": {
"value": {
"Name": "={{ $json.name }}",
"Email": "={{ $json.email }}",
"Phone": "={{ $json.phone }}",
"Budget": "={{ $json.budget_indicator }}",
"Status": "Needs Review",
"Company": "={{ $json.company }}",
"Urgency": "={{ $json.urgency_level }}",
"Website": "={{ $json.website }}",
"AI_Summary": "={{ $json.ai_summary }}",
"Pain_Points": "={{ $json.pain_points.join(', ') }}",
"Buying_Intent": "={{ $json.buying_intent }}",
"Submitted_Date": "={{ $json.submission_date }}",
"Recommended_Action": "={{ $json.recommended_action }}",
"Qualification_Score": "={{ $json.qualification_score }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "create"
},
"typeVersion": 2
},
{
"id": "593649f8-282c-4a38-ac35-02b5e97b443d",
"name": "请求人工审核",
"type": "n8n-nodes-base.slack",
"position": [
3648,
5568
],
"webhookId": "0440e11f-72b5-4d45-a004-eca82e065be2",
"parameters": {
"text": "=📋 *Lead Review Required - Score: {{ $json.qualification_score }}/100*\n\nThis lead scored below the qualification threshold (70) and needs manual review.\n\n*Lead Details:*\n• Name: {{ $json.name }}\n• Company: {{ $json.company }}\n• Email: {{ $json.email }}\n• Phone: {{ $json.phone || 'Not provided' }}\n\n*Qualification Analysis:*\n• Score: {{ $json.qualification_score }}/100\n• Buying Intent: {{ $json.buying_intent }}\n• Urgency: {{ $json.urgency_level }}\n• Budget: {{ $json.budget_indicator }}\n\n*AI Summary:*\n{{ $json.ai_summary }}\n\n*Original Message:*\n{{ $json.message }}\n\n---\nReply with your decision:\n✅ Pursue this lead\n❌ Disqualify\n💬 Request more information",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "REPLACE_WITH_SLACK_REVIEW_CHANNEL_ID"
},
"otherOptions": {
"includeLinkToWorkflow": false
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "AziwZo3O6NXOdbLM",
"name": "x-agent"
}
},
"typeVersion": 2.2
},
{
"id": "46b30b45-1610-48b3-93d2-bf32c4b09134",
"name": "通知销售团队",
"type": "n8n-nodes-base.slack",
"position": [
3648,
5376
],
"webhookId": "f5bca09d-baff-4620-bac7-6843213f39a7",
"parameters": {
"text": "=🚨 *HOT LEAD ALERT - Score: {{ $json.qualification_score }}/100*\n\n*Lead Information:*\n• Name: {{ $json.name }}\n• Company: {{ $json.company }}\n• Email: {{ $json.email }}\n• Phone: {{ $json.phone || 'Not provided' }}\n• Website: {{ $json.website || 'Not provided' }}\n\n*AI Qualification Analysis:*\n• Qualification Score: *{{ $json.qualification_score }}/100*\n• Buying Intent: {{ $json.buying_intent.toUpperCase() }}\n• Urgency Level: {{ $json.urgency_level.replace('_', ' ').toUpperCase() }}\n• Budget Indicator: {{ $json.budget_indicator.replace('_', ' ').toUpperCase() }}\n\n*Pain Points Identified:*\n{{ $json.pain_points.map(p => '• ' + p).join('\\n') }}\n\n*AI Summary:*\n{{ $json.ai_summary }}\n\n*Recommended Action:* {{ $json.recommended_action.replace('_', ' ').toUpperCase() }}\n\n*Submitted:* {{ new Date($json.submission_date).toLocaleString() }}\n\n---\n_Qualified by AI Agent | Powered by GPT-4o_",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "REPLACE_WITH_SLACK_SALES_CHANNEL_ID"
},
"otherOptions": {
"includeLinkToWorkflow": false
},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"id": "AziwZo3O6NXOdbLM",
"name": "x-agent"
}
},
"typeVersion": 2.2
},
{
"id": "aa50b6a2-0240-45b2-b429-f17745e753fd",
"name": "添加到 HubSpot CRM",
"type": "n8n-nodes-base.hubspot",
"position": [
3424,
5376
],
"parameters": {
"email": "={{ $json.email }}",
"options": {},
"additionalFields": {
"customPropertiesUi": {
"customPropertiesValues": [
{
"value": "={{ $json.qualification_score }}",
"property": "qualification_score"
},
{
"value": "={{ $json.buying_intent }}",
"property": "buying_intent"
},
{
"value": "={{ $json.urgency_level }}",
"property": "urgency_level"
},
{
"value": "={{ $json.budget_indicator }}",
"property": "budget_indicator"
},
{
"value": "={{ $json.ai_summary }}",
"property": "ai_summary"
},
{
"value": "={{ $json.pain_points.join(', ') }}",
"property": "pain_points"
},
{
"value": "={{ $json.recommended_action }}",
"property": "recommended_action"
}
]
}
}
},
"typeVersion": 2
},
{
"id": "5da79ef6-b456-4a0f-a1d4-830d40eca62c",
"name": "结构化潜在客户数据",
"type": "n8n-nodes-base.code",
"position": [
2976,
5472
],
"parameters": {
"jsCode": "// Parse AI Agent output and structure data for downstream nodes\nconst aiResponse = JSON.parse($input.first().json.output);\nconst leadData = $('Form Submission5').first().json.body;\n\nreturn {\n json: {\n // Original lead information\n name: leadData.name,\n email: leadData.email,\n company: leadData.company,\n phone: leadData.phone || '',\n website: leadData.website || '',\n message: leadData.message || '',\n \n // AI qualification results\n qualification_score: aiResponse.qualification_score,\n buying_intent: aiResponse.buying_intent,\n urgency_level: aiResponse.urgency_level,\n budget_indicator: aiResponse.budget_indicator,\n pain_points: aiResponse.pain_points,\n recommended_action: aiResponse.recommended_action,\n ai_summary: aiResponse.summary,\n \n // Metadata\n submission_date: new Date().toISOString(),\n source: 'website_form',\n workflow_version: '2025-pro',\n \n // Extract domain for potential enrichment\n domain: leadData.website \n ? new URL(leadData.website).hostname.replace('www.', '')\n : leadData.email.split('@')[1]\n }\n};"
},
"typeVersion": 2
},
{
"id": "1a41a3f7-359e-4b13-8deb-2ad9000b901f",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2544,
5904
],
"parameters": {
"model": "gpt-4o",
"options": {
"maxTokens": 1000,
"temperature": 0.3,
"responseFormat": "json_object"
}
},
"credentials": {
"openAiApi": {
"id": "MyU1ad1BJAlbvZXe",
"name": "OpenAi account 2"
}
},
"typeVersion": 1
},
{
"id": "6d783ecf-ee31-4f13-8d2a-e605660c06c1",
"name": "Clearbit 数据丰富工具",
"type": "@n8n/n8n-nodes-langchain.toolWorkflow",
"position": [
2480,
5696
],
"parameters": {
"name": "clearbit_enrichment",
"workflowId": {
"__rl": true,
"mode": "id",
"value": "REPLACE_WITH_CLEARBIT_WORKFLOW_ID",
"cachedResultName": "Clearbit Company Enrichment Tool"
},
"description": "使用 Clearbit Company API 丰富公司数据。当您有公司域名时调用此工具(从网站 URL 或邮箱地址提取)。输入格式:{\"domain\": \"stripe.com\"}。返回:公司名称、员工数量、员工范围、行业、领域、年收入、融资额、技术栈、位置和业务描述。这些数据对于准确的潜在客户质量评估评分至关重要 - 仅公司规模就占质量评分的 30%。",
"specifyInputSchema": true
},
"typeVersion": 1.1
},
{
"id": "b8662b37-43ca-4c8a-9208-570f49be018e",
"name": "结构化输出解析器",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2608,
5696
],
"parameters": {
"autoFix": true,
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"qualification_score\": {\n \"type\": \"number\",\n \"description\": \"Lead qualification score from 0-100\"\n },\n \"buying_intent\": {\n \"type\": \"string\",\n \"enum\": [\"high\", \"medium\", \"low\"],\n \"description\": \"Assessed buying intent level\"\n },\n \"urgency_level\": {\n \"type\": \"string\",\n \"enum\": [\"immediate\", \"this_week\", \"this_month\", \"exploratory\"],\n \"description\": \"Timeline urgency\"\n },\n \"budget_indicator\": {\n \"type\": \"string\",\n \"enum\": [\"enterprise\", \"mid-market\", \"small_business\", \"unknown\"],\n \"description\": \"Budget tier indicator\"\n },\n \"pain_points\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n },\n \"description\": \"List of identified pain points\"\n },\n \"recommended_action\": {\n \"type\": \"string\",\n \"enum\": [\"immediate_call\", \"schedule_demo\", \"nurture_sequence\", \"disqualify\"],\n \"description\": \"Recommended next action\"\n },\n \"summary\": {\n \"type\": \"string\",\n \"description\": \"2-3 sentence summary for sales team\"\n }\n },\n \"required\": [\"qualification_score\", \"buying_intent\", \"urgency_level\", \"budget_indicator\", \"pain_points\", \"recommended_action\", \"summary\"]\n}"
},
"typeVersion": 1.3
}
],
"pinData": {},
"connections": {
"Clearbit API": {
"main": [
[
{
"node": "Company Found?",
"type": "main",
"index": 0
}
]
]
},
"Company Found?": {
"main": [
[
{
"node": "Format Data",
"type": "main",
"index": 0
}
],
[
{
"node": "No Data",
"type": "main",
"index": 0
}
]
]
},
"Log to Airtable": {
"main": [
[
{
"node": "Request Manual Review",
"type": "main",
"index": 0
}
]
]
},
"Form Submission5": {
"main": [
[
{
"node": "AI Lead Analysis Agent5",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Lead Analysis Agent5",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Structured Output Parser",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Add to HubSpot CRM": {
"main": [
[
{
"node": "Notify Sales Team",
"type": "main",
"index": 0
}
]
]
},
"High Quality Lead?5": {
"main": [
[
{
"node": "Add to HubSpot CRM",
"type": "main",
"index": 0
}
],
[
{
"node": "Log to Airtable",
"type": "main",
"index": 0
}
]
]
},
"Structure Lead Data": {
"main": [
[
{
"node": "High Quality Lead?5",
"type": "main",
"index": 0
}
]
]
},
"AI Lead Analysis Agent5": {
"main": [
[
{
"node": "Structure Lead Data",
"type": "main",
"index": 0
}
]
]
},
"Clearbit Enrichment Tool": {
"ai_tool": [
[
{
"node": "AI Lead Analysis Agent5",
"type": "ai_tool",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Lead Analysis Agent5",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"When called by another workflow": {
"main": [
[
{
"node": "Clearbit API",
"type": "main",
"index": 0
}
]
]
}
}
}常见问题
如何使用这个工作流?
复制上方的 JSON 配置代码,在您的 n8n 实例中创建新工作流并选择「从 JSON 导入」,粘贴配置后根据需要修改凭证设置即可。
这个工作流适合什么场景?
高级 - 内容创作, 多模态 AI
需要付费吗?
本工作流完全免费,您可以直接导入使用。但请注意,工作流中使用的第三方服务(如 OpenAI API)可能需要您自行付费。
相关工作流推荐
GPT-4o:Twilio集成与自动跟进功能
GPT-4o:Twilio集成与自动跟进功能
If
Code
Wait
+11
21 节点Greypillar
内容创作
使用HubSpot、Gmail和AI驱动调度的自动化客户入职
使用HubSpot、Gmail和AI驱动调度的自动化客户入职
If
Set
Gmail
+14
31 节点Punit
内容创作
博客文章转换为多平台内容(GPT-4o、Unsplash 和 Airtable)
使用 GPT-4o、Unsplash 和 Airtable 将博客文章转换为多平台内容
Code
Slack
Twitter
+8
14 节点Greypillar
内容创作
1. 播放列表详情设置机器人副本
使用 Suno、GPT-4、Runway 和 Creatomate 创建 AI 生成的 YouTube 音乐播放列表
If
Set
Code
+22
203 节点Joseph
内容创作
内容生成器 v3
AI驱动博客自动化:使用GPT-4生成并发布SEO文章至WordPress和Twitter
If
Set
Code
+25
144 节点Jay Emp0
内容创作
✨🩷自动化社交媒体内容发布工厂 + 系统提示组合
基于动态系统提示和GPT-4o的AI驱动多平台社交媒体内容工厂
If
Set
Code
+20
100 节点Amit Mehta
内容创作
工作流信息
难度等级
高级
节点数量18
分类2
节点类型13
作者
Greypillar
@greypillarWe design AI systems that fix hidden revenue leaks in service businesses. Every engagement starts with one guaranteed win in 30 days — no risk, just results.
外部链接
在 n8n.io 查看 →
分享此工作流