8
n8n 中文网amn8n.com

使用AI通过LinkedIn公司数据丰富CRM潜在客户

中级

这是一个Content Creation, Multimodal AI领域的自动化工作流,包含 14 个节点。主要使用 Code, Airtable, HttpRequest, OpenAi 等节点。 使用GPT-4和Airtable通过LinkedIn公司数据丰富CRM潜在客户

前置要求
  • Airtable API Key
  • 可能需要目标 API 的认证凭证
  • OpenAI API Key
工作流预览
可视化展示节点连接关系,支持缩放和平移
导出工作流
复制以下 JSON 配置到 n8n 导入,即可使用此工作流
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "使用 AI 通过 LinkedIn 公司数据丰富 CRM 潜在客户",
  "tags": [],
  "nodes": [
    {
      "id": "workflow-description-note",
      "name": "工作流描述",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        -300
      ],
      "parameters": {
        "color": 4,
        "width": 520,
        "height": 680,
        "content": "## 🚀 使用 AI 通过 LinkedIn 公司数据丰富 CRM 潜在客户"
      },
      "typeVersion": 1
    },
    {
      "id": "step-1-note",
      "name": "步骤 1 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 📋 步骤 1:检索潜在客户数据"
      },
      "typeVersion": 1
    },
    {
      "id": "step-2-note",
      "name": "步骤 2 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🌐 步骤 2:抓取 LinkedIn 个人资料"
      },
      "typeVersion": 1
    },
    {
      "id": "step-3-note",
      "name": "步骤 3 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🧹 步骤 3:清理 HTML 内容"
      },
      "typeVersion": 1
    },
    {
      "id": "step-4-note",
      "name": "步骤 4 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🤖 步骤 4:AI 公司分析"
      },
      "typeVersion": 1
    },
    {
      "id": "step-5-note",
      "name": "步骤 5 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 📊 步骤 5:提取邮件变量"
      },
      "typeVersion": 1
    },
    {
      "id": "step-6-note",
      "name": "步骤 6 说明",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 💾 步骤 6:更新 CRM 记录"
      },
      "typeVersion": 1
    },
    {
      "id": "fetch-lead-from-crm",
      "name": "从 CRM 获取潜在客户",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -500,
        40
      ],
      "parameters": {
        "id": "={{ $json.recordId }}",
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_AIRTABLE_BASE_ID",
          "cachedResultName": "Your CRM Base"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_TABLE_ID",
          "cachedResultName": "Leads"
        },
        "options": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "scrape-linkedin-profile",
      "name": "抓取 LinkedIn 公司个人资料",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -260,
        40
      ],
      "parameters": {
        "url": "={{ $json['LinkedIn Organization URL'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "clean-html-content",
      "name": "清理 HTML 内容",
      "type": "n8n-nodes-base.code",
      "position": [
        -20,
        40
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const htmlContent = $node[\"Scrape LinkedIn Company Profile\"].json[\"data\"];\n\nconst extractPlainText = (html) => {\n    if (!html) return \"\";\n\n    const withoutScriptsAndStyles = html.replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, \"\")\n                                        .replace(/<style[\\s\\S]*?>[\\s\\S]*?<\\/style>/gi, \"\");\n\n    const strippedText = withoutScriptsAndStyles.replace(/<\\/?[^>]+(>|$)/g, \"\");\n\n    const decodedText = strippedText.replace(/&nbsp;/gi, \" \")\n                                    .replace(/&amp;/gi, \"&\")\n                                    .replace(/&lt;/gi, \"<\")\n                                    .replace(/&gt;/gi, \">\")\n                                    .replace(/&quot;/gi, \"\\\"\")\n                                    .replace(/&#39;/gi, \"'\");\n\n    const cleanedText = decodedText.replace(/\\s+/g, \" \").trim();\n\n    return cleanedText;\n};\n\nconst plainText = extractPlainText(htmlContent);\n\nreturn {\n    plainText: plainText,\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "analyze-company-profile",
      "name": "使用 AI 分析公司个人资料",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        220,
        40
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "**Role:**  \nYou are an expert in professional business analysis and LinkedIn data extraction.  \n\n**Task:**  \nAnalyze the scraped LinkedIn profile data of a company and produce a **high-quality, detailed company report** for CRM upload. Your analysis must be **precise, fact-based, structured, and derived entirely from the provided data** while also including **recent company posts with timestamps**. Ensure that the **exact employee count is extracted instead of a company size range.**  \n\n### **Output Structure:**  \nYour response must be a **single string titled \"Company LinkedIn\"** and divided into exactly **five** clearly labeled sections:  \n\n#### **1. Company Overview:**  \n- Provide a **concise yet comprehensive summary** of the company.  \n- Include the **official name, industry, headquarters location, and founding year** if available.  \n- Extract the **exact employee count** from the profile (e.g., \"20 employees\" instead of \"11-50 employees\"). Look for \"Follow View all X employees.\"\n- Summarize the company's **mission statement** and its **core value proposition**.  \n- Highlight its **business type (Privately Held, Public, Nonprofit, etc.)**.  \n\n#### **2. Products, Services, and Technology:**  \n- Summarize the **company's key offerings**, including **products, services, and technology**.  \n- List **notable software platforms, SaaS solutions, or proprietary technologies** the company uses or sells.  \n- If available, include any **strategic advantages or differentiators** (e.g., AI-powered, automation-focused, integration-ready).  \n\n#### **3. Business Operations and Market Presence:**  \n- List the company's **primary office locations**, including headquarters and any additional branches.  \n- Summarize any **recent funding rounds, major investments, or key investors** if applicable.  \n- Mention any **notable partnerships, affiliations, or alliances** that contribute to their market position.  \n- If applicable, highlight **major clients, certifications, awards, or industry recognitions**.  \n\n#### **4. Recent Announcements and Market Activity:**  \n- Summarize **recent press releases, product launches, partnerships, or growth milestones**.  \n- If hiring data is available, note whether the company is **actively recruiting**.  \n- Capture any **noteworthy social engagement** (e.g., G2 rankings, LinkedIn hiring growth, conference participation).  \n\n#### **5. Company Posts (Including Timestamps):**  \n- Extract all **company posts**, including **the date they were published**.  \n- Summarize the **core message** of each post.  \n- Include links if available.  \n\n**Format for Posts Section:**  \n📅 **[Date]** - **Post Title or Summary**  \nPost ALL content.  \n\n### **Additional Guidelines:**  \n- **Extract and use the exact employee count** instead of a company size range.  \n- **The analysis must be concise, fact-based, and structured** without assumptions or filler content.  \n- **Use exact data where available** (e.g., \"Founded in 2020\" instead of \"several years ago\").  \n- **Maintain a professional tone and structured formatting** for easy CRM readability.  \n- **Ensure all extracted variables are seamlessly integrated** into the summary."
            },
            {
              "content": "=Input: {{ $json.plainText }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "extract-email-variables",
      "name": "提取可用于邮件的变量",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        600,
        40
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini",
          "cachedResultName": "GPT-4O-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "### **Extract Usable Company Data for Email Templates**  \n\n> **Extract structured company variables from the LinkedIn profile text. Ensure all variables are formatted properly, using natural phrasing as if they were placed in the middle of a sentence. Capitalization must be correct for seamless insertion into an email template. If a field is not explicitly stated, return `\"not listed\"` instead of `null`.**  \n\n### **Company Profile Extraction Rules:**  \n\n#### **1. General Company Information**  \n- **{CompanyName}** → Extract the full company name, properly capitalized.  \n- **{Industry}** → Extract a **concise and specific industry descriptor** (e.g., `\"AI-driven cybersecurity\"` instead of `\"Technology\"`).  \n- **{Headquarters}** → Extract the **city and state/country** in a natural format (e.g., `\"based in San Francisco, California\"`).  \n- **{YearFounded}** → Extract as `\"founded in [YEAR]\"` (e.g., `\"founded in 2019\"`). If not listed, return `\"not listed\"`.  \n- **{EmployeeCount}** → Extract as `\"a team of [NUMBER] employees\"` (e.g., `\"a team of 20 employees\"`).  \n- **{CompanyType}** → Extract as `\"a [company type]\"` (e.g., `\"a privately held company\"`).  \n\n#### **2. Mission & Business Summary**  \n- **{MissionStatement}** → Extract as `\"on a mission to [mission]\"` (e.g., `\"on a mission to eliminate infrastructure concerns and accelerate software deployment\"`). If not available, return `\"not listed\"`.  \n- **{CompanyOverview}** → Extract as `\"specializes in [core service]\"` (e.g., `\"specializes in cloud-native full-stack environments for DevOps teams\"`).  \n\n#### **3. Products, Services, and Technology**  \n- **{PrimaryServices}** → Extract as `\"offers [services]\"` (e.g., `\"offers environments as a service, preview environments, and DevOps solutions\"`).  \n- **{TechnologyOrProducts}** → Extract as `\"its technology includes [products]\"` (e.g., `\"its technology includes an internal developer platform and on-demand environments\"`). If no products are mentioned, return `\"not listed\"`.  \n\n#### **4. Business Operations & Market Presence**  \n- **{OfficeLocations}** → Extract as `\"with offices at [address]\"` (e.g., `\"with offices at 530 Divisadero St, San Francisco, California\"`). If not listed, return `\"not listed\"`.  \n- **{FundingRounds}** → Extract as `\"has raised funding in [#] rounds\"` (e.g., `\"has raised funding in 3 rounds\"`). If not listed, return `\"not listed\"`.  \n- **{RecentFundingRound}** → Extract as `\"most recently raised [amount] in a [funding round] round in [date]\"` (e.g., `\"most recently raised $13.2M in a Series A round in March 2022\"`). If no funding is listed, return `\"not listed\"`.  \n- **{Investors}** → Extract as `\"backed by [investors]\"` (e.g., `\"backed by 8VC and 14 other investors\"`). If not listed, return `\"not listed\"`.  \n- **{NotablePartnershipsOrClients}** → Extract as `\"works with [partners]\"` (e.g., `\"works with Docker and NVIDIA\"`). If not listed, return `\"not listed\"`.  \n- **{AwardsOrCertifications}** → Extract as `\"recognized for [awards]\"` (e.g., `\"recognized for its G2 Momentum Leader award in CPQ\"`). If not listed, return `\"not listed\"`.  \n- **{HiringStatus}** → Extract as `\"currently hiring\"` if the company is hiring, or `\"not currently hiring\"` if there is no mention.  \n\n### **Return Output as JSON (Email-Friendly Formatting)**  \nReturn all variables in a JSON object with proper sentence-case formatting ready for email insertion."
            },
            {
              "content": "=Input: {{ $json.message.content }}\nToday's date: {{ $now }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "typeVersion": 1.8
    },
    {
      "id": "update-crm-with-enriched-data",
      "name": "使用丰富数据更新 CRM",
      "type": "n8n-nodes-base.airtable",
      "position": [
        1020,
        40
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_AIRTABLE_BASE_ID",
          "cachedResultName": "Your CRM Base"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "YOUR_TABLE_ID",
          "cachedResultName": "Leads"
        },
        "columns": {
          "value": {
            "id": "={{ $('Fetch Lead from CRM').first().json.id }}",
            "Lead Status": "Cold",
            "LinkedIn Company": "=",
            "Date Lead Enriched": "={{ new Date().toISOString().split('T')[0] }}",
            "Start Lead Enrichment": false
          },
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ]
        },
        "options": {},
        "operation": "update"
      },
      "typeVersion": 2.1
    },
    {
      "id": "email-variables-reference",
      "name": "邮件变量参考",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        440
      ],
      "parameters": {
        "color": 6,
        "width": 460,
        "height": 680,
        "content": "## 📧 邮件模板变量参考"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "Clean HTML Content": {
      "main": [
        [
          {
            "node": "Analyze Company Profile with AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Lead from CRM": {
      "main": [
        [
          {
            "node": "Scrape LinkedIn Company Profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Email-Ready Variables": {
      "main": [
        [
          {
            "node": "Update CRM with Enriched Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyze Company Profile with AI": {
      "main": [
        [
          {
            "node": "Extract Email-Ready Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape LinkedIn Company Profile": {
      "main": [
        [
          {
            "node": "Clean HTML Content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
常见问题

如何使用这个工作流?

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

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

中级 - 内容创作, 多模态 AI

需要付费吗?

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

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

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

作者
Amirul Hakimi

Amirul Hakimi

@amirulhaaakimi

CS Student Specializing in Artificial Intelligence @UNITEN | Certified in CRO & Copywriting for High-Impact Digital Growth

外部链接
在 n8n.io 查看

分享此工作流