This workflow corresponds to n8n.io template #9354 — we link there as the canonical source.
This workflow follows the Airtable → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"meta": {
"templateCredsSetupCompleted": false
},
"name": "Enrich CRM leads with LinkedIn company data using AI",
"tags": [],
"nodes": [
{
"id": "workflow-description-note",
"name": "Workflow Description",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1020,
-300
],
"parameters": {
"color": 4,
"width": 520,
"height": 680,
"content": "## \ud83d\ude80 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\ud83d\udca1 **Pro tip**: Run this workflow on new leads automatically to always have enriched data ready for outreach!"
},
"typeVersion": 1
},
{
"id": "step-1-note",
"name": "Step 1 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-560,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83d\udccb 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": "Step 2 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-320,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83c\udf10 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": "Step 3 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-80,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83e\uddf9 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": "Step 4 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
160,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83e\udd16 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": "Step 5 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
540,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83d\udcca 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": "Step 6 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
960,
-160
],
"parameters": {
"color": 7,
"width": 300,
"height": 180,
"content": "## \ud83d\udcbe 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": "Fetch Lead from 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": "Scrape LinkedIn Company Profile",
"type": "n8n-nodes-base.httpRequest",
"position": [
-260,
40
],
"parameters": {
"url": "={{ $json['LinkedIn Organization URL'] }}",
"options": {}
},
"typeVersion": 4.2
},
{
"id": "clean-html-content",
"name": "Clean HTML Content",
"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(/ /gi, \" \")\n .replace(/&/gi, \"&\")\n .replace(/</gi, \"<\")\n .replace(/>/gi, \">\")\n .replace(/"/gi, \"\\\"\")\n .replace(/'/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": "Analyze Company Profile with 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\ud83d\udcc5 **[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": "Extract Email-Ready Variables",
"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}** \u2192 Extract the full company name, properly capitalized. \n- **{Industry}** \u2192 Extract a **concise and specific industry descriptor** (e.g., `\"AI-driven cybersecurity\"` instead of `\"Technology\"`). \n- **{Headquarters}** \u2192 Extract the **city and state/country** in a natural format (e.g., `\"based in San Francisco, California\"`). \n- **{YearFounded}** \u2192 Extract as `\"founded in [YEAR]\"` (e.g., `\"founded in 2019\"`). If not listed, return `\"not listed\"`. \n- **{EmployeeCount}** \u2192 Extract as `\"a team of [NUMBER] employees\"` (e.g., `\"a team of 20 employees\"`). \n- **{CompanyType}** \u2192 Extract as `\"a [company type]\"` (e.g., `\"a privately held company\"`). \n\n#### **2. Mission & Business Summary** \n- **{MissionStatement}** \u2192 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}** \u2192 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}** \u2192 Extract as `\"offers [services]\"` (e.g., `\"offers environments as a service, preview environments, and DevOps solutions\"`). \n- **{TechnologyOrProducts}** \u2192 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}** \u2192 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}** \u2192 Extract as `\"has raised funding in [#] rounds\"` (e.g., `\"has raised funding in 3 rounds\"`). If not listed, return `\"not listed\"`. \n- **{RecentFundingRound}** \u2192 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}** \u2192 Extract as `\"backed by [investors]\"` (e.g., `\"backed by 8VC and 14 other investors\"`). If not listed, return `\"not listed\"`. \n- **{NotablePartnershipsOrClients}** \u2192 Extract as `\"works with [partners]\"` (e.g., `\"works with Docker and NVIDIA\"`). If not listed, return `\"not listed\"`. \n- **{AwardsOrCertifications}** \u2192 Extract as `\"recognized for [awards]\"` (e.g., `\"recognized for its G2 Momentum Leader award in CPQ\"`). If not listed, return `\"not listed\"`. \n- **{HiringStatus}** \u2192 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": "Update CRM with Enriched Data",
"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": "Email Variables Reference",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1020,
440
],
"parameters": {
"color": 6,
"width": 460,
"height": 680,
"content": "## \ud83d\udce7 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\u2014I 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,
"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
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Sales teams, marketers, and business development professionals who need to automatically enrich their CRM records with detailed company information from LinkedIn profiles. Perfect for anyone doing B2B outreach who wants to personalize their messaging at scale.
Source: https://n8n.io/workflows/9354/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This powerful n8n automation workflow is designed to execute advanced B2B lead enrichment and hyper-personalization for cold email outreach. By orchestrating a complex chain of data scraping, AI analy
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
Voice Note -> Veo 3 AD. Uses telegramTrigger, telegram, openAi, httpRequest. Event-driven trigger; 49 nodes.
This template is perfect for e-commerce entrepreneurs, marketers, agencies, and creative teams who want to turn simple product photos and short descriptions into professional flyers or product videos—
This n8n workflow automates the creation of 9:16 aspect ratio images optimized for short-form video content and thumbnails. It integrates multiple tools to retrieve content, generate scripts, and crea