Verwendung von KI zur Anreicherung von CRM-Leads mit LinkedIn-Unternehmensdaten

Fortgeschritten

Dies ist ein Content Creation, Multimodal AI-Bereich Automatisierungsworkflow mit 14 Nodes. Hauptsächlich werden Code, Airtable, HttpRequest, OpenAi und andere Nodes verwendet. Anreichung von CRM-Leads mit GPT-4 und Airtable über LinkedIn-Unternehmensdaten

Voraussetzungen
  • Airtable API Key
  • Möglicherweise sind Ziel-API-Anmeldedaten erforderlich
  • OpenAI API Key
Workflow-Vorschau
Visualisierung der Node-Verbindungen, mit Zoom und Pan
Workflow exportieren
Kopieren Sie die folgende JSON-Konfiguration und importieren Sie sie in n8n
{
  "meta": {
    "templateCredsSetupCompleted": false
  },
  "name": "Enrich CRM leads with LinkedIn company data using AI",
  "tags": [],
  "nodes": [
    {
      "id": "workflow-description-note",
      "name": "Workflow-Beschreibung",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        -300
      ],
      "parameters": {
        "color": 4,
        "width": 520,
        "height": 680,
        "content": "## 🚀 Enrich CRM Leads with LinkedIn Company Data Using AI\n\n### **Who's it for**\nSales teams, marketers, and business development professionals who need to automatically enrich their CRM records with detailed company information from LinkedIn profiles.\n\n### **What it does**\nThis workflow automatically:\n1. Pulls lead records from your Airtable CRM\n2. Scrapes the company's LinkedIn profile page\n3. Uses AI (GPT-4) to extract and structure key company data\n4. Generates email-ready variables for personalized outreach\n5. Updates your CRM with enriched company information\n\n### **How to set up**\n1. **Airtable Configuration**: Replace the Airtable base ID and table ID with your own CRM database\n2. **OpenAI API**: Add your OpenAI API credentials for AI analysis\n3. **Trigger**: Set up your preferred trigger (webhook, schedule, or manual)\n4. **LinkedIn URL**: Ensure your CRM has a field with LinkedIn company URLs\n\n### **Requirements**\n- Airtable account (free tier works)\n- OpenAI API key (GPT-4 recommended for best results)\n- LinkedIn company URLs in your CRM\n- Basic understanding of CRM field mapping\n\n### **Customization tips**\n- Modify the AI prompts to extract different company attributes\n- Adjust the output variables to match your email templates\n- Add additional enrichment sources (company websites, Crunchbase, etc.)\n- Connect to different CRMs (HubSpot, Salesforce, etc.)\n\n💡 **Pro tip**: Run this workflow on new leads automatically to always have enriched data ready for outreach!"
      },
      "typeVersion": 1
    },
    {
      "id": "step-1-note",
      "name": "Schritt 1 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -560,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 📋 Step 1: Retrieve Lead Data\n\nFetches the lead record from Airtable CRM containing the LinkedIn company URL and other lead information."
      },
      "typeVersion": 1
    },
    {
      "id": "step-2-note",
      "name": "Schritt 2 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🌐 Step 2: Scrape LinkedIn Profile\n\nRetrieves the raw HTML content from the company's LinkedIn profile page."
      },
      "typeVersion": 1
    },
    {
      "id": "step-3-note",
      "name": "Schritt 3 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -80,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🧹 Step 3: Clean HTML Content\n\nRemoves HTML tags and formats the scraped content into clean, readable text for AI processing."
      },
      "typeVersion": 1
    },
    {
      "id": "step-4-note",
      "name": "Schritt 4 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 🤖 Step 4: AI Company Analysis\n\nUses GPT-4 to analyze the LinkedIn profile and extract structured company information including overview, products, market presence, and recent posts."
      },
      "typeVersion": 1
    },
    {
      "id": "step-5-note",
      "name": "Schritt 5 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        540,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 📊 Step 5: Extract Email Variables\n\nConverts the company analysis into personalized, email-ready variables formatted for seamless insertion into outreach templates."
      },
      "typeVersion": 1
    },
    {
      "id": "step-6-note",
      "name": "Schritt 6 Hinweis",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        960,
        -160
      ],
      "parameters": {
        "color": 7,
        "width": 300,
        "height": 180,
        "content": "## 💾 Step 6: Update CRM Record\n\nWrites the enriched company data back to your Airtable CRM, marking the lead as enriched and ready for outreach."
      },
      "typeVersion": 1
    },
    {
      "id": "fetch-lead-from-crm",
      "name": "Lead aus CRM abrufen",
      "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 Unternehmensprofil scrapen",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -260,
        40
      ],
      "parameters": {
        "url": "={{ $json['LinkedIn Organization URL'] }}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "clean-html-content",
      "name": "HTML-Inhalt bereinigen",
      "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": "Unternehmensprofil mit KI analysieren",
      "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": "E-Mail-fähige Variablen extrahieren",
      "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 mit angereicherten Daten aktualisieren",
      "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": "E-Mail-Variablenreferenz",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1020,
        440
      ],
      "parameters": {
        "color": 6,
        "width": 460,
        "height": 680,
        "content": "## 📧 Email Template Variables Reference\n\n### Example Usage in Outreach Emails:\n\n**Opening Lines:**\n- \"Hi {FirstName}, I came across {CompanyName} and was impressed by how you're leading innovation in {Industry}.\"\n- \"Running {CompanyName} since {YearFounded} with {EmployeeCount} must have been an incredible journey.\"\n\n**Value Propositions:**\n- \"Given {CompanyName}'s expertise in {PrimaryServices}, I wanted to connect and share something that might align with your work.\"\n- \"Since {CompanyName} is already working with {NotablePartnershipsOrClients}, I wanted to explore collaboration opportunities.\"\n\n**Congratulatory Messages:**\n- \"Congrats on {CompanyName}'s continued success in {Industry}! Scaling to {EmployeeCount} employees while offering {PrimaryServices} is no small feat.\"\n- \"Expanding to {OfficeLocations} shows how fast {CompanyName} is growing!\"\n\n**Call-to-Action:**\n- \"Would love to schedule a quick chat to discuss how {PrimaryServices} trends are evolving.\"\n- \"Let's connect—I believe my work aligns closely with {CompanyName}'s expertise in {Industry}.\"\n\n### Available Variables:\n- CompanyName\n- Industry\n- Headquarters\n- YearFounded\n- EmployeeCount\n- CompanyType\n- MissionStatement\n- CompanyOverview\n- PrimaryServices\n- TechnologyOrProducts\n- OfficeLocations\n- FundingRounds\n- RecentFundingRound\n- Investors\n- NotablePartnershipsOrClients\n- AwardsOrCertifications\n- HiringStatus"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "pinData": {},
  "settings": {
    "executionOrder": "v1"
  },
  "connections": {
    "clean-html-content": {
      "main": [
        [
          {
            "node": "analyze-company-profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "fetch-lead-from-crm": {
      "main": [
        [
          {
            "node": "scrape-linkedin-profile",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "extract-email-variables": {
      "main": [
        [
          {
            "node": "update-crm-with-enriched-data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "analyze-company-profile": {
      "main": [
        [
          {
            "node": "extract-email-variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "scrape-linkedin-profile": {
      "main": [
        [
          {
            "node": "clean-html-content",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Häufig gestellte Fragen

Wie verwende ich diesen Workflow?

Kopieren Sie den obigen JSON-Code, erstellen Sie einen neuen Workflow in Ihrer n8n-Instanz und wählen Sie "Aus JSON importieren". Fügen Sie die Konfiguration ein und passen Sie die Anmeldedaten nach Bedarf an.

Für welche Szenarien ist dieser Workflow geeignet?

Fortgeschritten - Content-Erstellung, Multimodales KI

Ist es kostenpflichtig?

Dieser Workflow ist völlig kostenlos. Beachten Sie jedoch, dass Drittanbieterdienste (wie OpenAI API), die im Workflow verwendet werden, möglicherweise kostenpflichtig sind.

Workflow-Informationen
Schwierigkeitsgrad
Fortgeschritten
Anzahl der Nodes14
Kategorie2
Node-Typen5
Schwierigkeitsbeschreibung

Für erfahrene Benutzer, mittelkomplexe Workflows mit 6-15 Nodes

Autor
Amirul Hakimi

Amirul Hakimi

@amirulhaaakimi

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

Externe Links
Auf n8n.io ansehen

Diesen Workflow teilen

Kategorien

Kategorien: 34