AutomationFlowsAI & RAG › Personalize Cold Emails with Linkedin Data, Gpt-4 & Airtable-instantly

Personalize Cold Emails with Linkedin Data, Gpt-4 & Airtable-instantly

ByAmirul Hakimi @amirulhaaakimi on n8n.io

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 analysis (via LLMs/GPT-4.1), and CRM synchronization (using Airtable), this workflow…

Webhook trigger★★★★★ complexityAI-powered75 nodesOpenAIHTTP RequestAirtable
AI & RAG Trigger: Webhook Nodes: 75 Complexity: ★★★★★ AI nodes: yes Added:
Personalize Cold Emails with Linkedin Data, Gpt-4 & Airtable-instantly — n8n workflow card showing OpenAI, HTTP Request, Airtable integration

This workflow corresponds to n8n.io template #9243 — 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 →

Download .json
{
  "id": "dqadS3ZrqFWZn5MU",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Enrich Airtable leads with insights from LinkedIn posts using OpenAI",
  "tags": [
    {
      "id": "EcGk5u5PdIdrDClg",
      "name": "Skool",
      "createdAt": "2025-07-15T10:11:16.143Z",
      "updatedAt": "2025-07-15T10:11:16.143Z"
    }
  ],
  "nodes": [
    {
      "id": "highlevel-sticky-note-001",
      "name": "TEMPLATE OVERVIEW",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4000,
        -100
      ],
      "parameters": {
        "color": "yellow",
        "value": "**Enrich Airtable leads with insights from LinkedIn posts using OpenAI**\n\nThis workflow automates advanced lead enrichment and personalized outreach by combining Airtable records with LinkedIn company pages, decision-maker profiles, and recent posts, then applying OpenAI for tailored insights.\n\n**Who is this for?**\nSales and marketing teams that want to personalize outreach at scale by blending company research, personal activity, and AI-generated messaging.\n\n**Setup Instructions:**\n- Open the `Configure Variables` node at the top to update Airtable base/table placeholders, Instantly campaign IDs, and default limits.\n- Add your API credentials (Apify, NeverBounce, Instantly) via the HTTP Request header placeholders or the n8n credential store before running.\n- Set your Airtable Base ID, Table ID, and record fields throughout the Airtable nodes.\n- Connect integrations for LinkedIn scraping (Apify), NeverBounce, Instantly, and OpenAI.\n- Review sticky notes flagged for user configuration and adjust node-specific settings.\n\n**Requirements:**\n- Active accounts and API access for Airtable, LinkedIn scraping (Apify), NeverBounce, Instantly, and OpenAI.\n- Sufficient API quotas for scraping LinkedIn profiles and posts.\n\nOptional: embed a Loom walkthrough link here to guide teammates through setup."
      },
      "typeVersion": 1
    },
    {
      "id": "5e730b84-42f9-4f77-9a0e-7d420d15b3bd",
      "name": "Configure Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -3712,
        -48
      ],
      "parameters": {
        "values": {
          "string": [
            {
              "name": "airtableBaseId",
              "value": "YOUR_AIRTABLE_BASE_ID"
            },
            {
              "name": "airtableSourceTableId",
              "value": "YOUR_AIRTABLE_SOURCE_TABLE_ID"
            },
            {
              "name": "airtableTargetTableId",
              "value": "YOUR_AIRTABLE_TARGET_TABLE_ID"
            },
            {
              "name": "apifyPostsLimit",
              "value": "10"
            },
            {
              "name": "instantlyCampaignId",
              "value": "YOUR_INSTANTLY_CAMPAIGN_ID"
            }
          ]
        },
        "keepOnlySet": false
      },
      "typeVersion": 1
    },
    {
      "id": "a4bd3fd0-b6c9-48d0-8ae4-711fb4497e3a",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "notes": "const inputData = input.config()\nconst { recordId } = inputData;\nconst response = await fetch(\"YOUR PRODUCTION URL\"+\"?recordId=\"+recordId)\nconsole.log(response.status)",
      "position": [
        -3824,
        -48
      ],
      "parameters": {
        "path": "698bc83b-22b9-412f-894b-f74554964bcb",
        "options": {}
      },
      "typeVersion": 2
    },
    {
      "id": "6e1ff6d7-2d98-47c6-a342-d86cb62728f1",
      "name": "Turn X Items Into 1",
      "type": "n8n-nodes-base.code",
      "position": [
        1168,
        -240
      ],
      "parameters": {
        "jsCode": "return [{\n  mergedData: items.map(item => item.json.url) // Extract only the URLs, removing unnecessary objects\n}];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "958f3613-bf2b-4a28-b574-19d61fb09264",
      "name": "Determine Valuable URLs",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1392,
        -240
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You are given a **list of URLs extracted from a company\u2019s website**. Your task is to **identify and categorize the most relevant URLs** to help enrich lead data.  \n\nEach URL should be classified into **one of four key categories** that provide meaningful insights into the company\u2019s operations. If a category **does not have a matching URL**, return `\"no relevant URL\"` instead.  \n\n## **Selection Criteria & Context**  \n\n### **1. Company & Mission (About the Business & People Behind It)**  \n- **Purpose:** Find a page that explains **who the company is, what they stand for, and who runs it**.  \n- **Look for:** Company history, mission, vision, leadership, team, and core values.  \n- **Example matches:**  \n  - `/about`, `/company`, `/who-we-are`, `/our-story`, `/overview`, `/leadership`, `/team`, `/mission`, `/vision`  \n- **Avoid:** Generic pages like `/home`, contact pages, and customer support sections.  \n\n### **2. Offerings & Positioning (What They Sell & Their Market Fit)**  \n- **Purpose:** Identify a page that describes the company\u2019s **products, services, industries served, or unique differentiators**.  \n- **Look for:** Offerings, solutions, industry focus, and use cases.  \n- **Example matches:**  \n  - `/services`, `/what-we-do`, `/solutions`, `/products`, `/industries`, `/use-cases`, `/capabilities`  \n- **Avoid:** Pages that **only mention** clients but do not describe the company\u2019s services.  \n\n### **3. Process & Differentiation (How They Deliver Value)**  \n- **Purpose:** Identify a page that explains **how** the company operates and what makes them unique.  \n- **Look for:** Methodologies, workflows, onboarding process, value proposition, or unique technology/frameworks.  \n- **Example matches:**  \n  - `/how-it-works`, `/our-process`, `/methodology`, `/why-us`, `/why-choose-us`, `/approach`  \n- **Avoid:** Basic service descriptions without any details on processes or methodologies.  \n\n### **4. Proof of Success (Social Proof & Track Record)**  \n- **Purpose:** Find a page that demonstrates **the company\u2019s credibility through client results, testimonials, or case studies**.  \n- **Look for:** Success stories, partnerships, and testimonials.  \n- **Example matches:**  \n  - `/case-studies`, `/testimonials`, `/success-stories`, `/clients`, `/portfolio`  \n- **Avoid:** Generic client lists that do not contain results or success metrics.  \n\n## **Output Requirements**  \n- **Return exactly one URL per category** (or `\"no relevant URL\"` if none exist).  \n- **Output must be in JSON format** as shown below.  \n- **Only return the path (e.g., `/about` instead of `https://example.com/about`).**  \n- **Strictly follow the structured format\u2014no extra explanations or additional text.**  \n\n### **Expected Output Format**  \n```json\n{\n  \"selected_urls\": {\n    \"company_mission\": \"/about\",\n    \"offerings_positioning\": \"/solutions\",\n    \"process_differentiation\": \"/our-process\",\n    \"proof_of_success\": \"no relevant URL\"\n  }\n}\n```\n\n## **Additional Guidelines**  \n- **Prioritize broader coverage:** If multiple URLs match a category, choose the **most comprehensive one** (e.g., `/about` over `/company-overview`).  \n- **Handle duplicates:** If a URL appears more than once, select only one.  \n- **Exclude irrelevant pages:** Ignore contact pages, blog articles, FAQs, legal pages, or careers pages.  \n- **Do NOT infer missing information:** If no clear match exists, return `\"no relevant URL\"`.  "
            },
            {
              "content": "={{ $json.mergedData }}\n"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "69158508-dd0f-49f5-a346-6bc0cae91aa8",
      "name": "Split Out",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        1744,
        -240
      ],
      "parameters": {
        "options": {},
        "fieldToSplitOut": "message.content.selected_urls"
      },
      "typeVersion": 1
    },
    {
      "id": "da84a62e-8ad7-4fd9-850b-97130a109199",
      "name": "HTTP Request",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "{{ $('Pull Lead From Airtable,').first().json['Company Website'] }}{{ $json['message.content.selected_urls'] }}",
      "onError": "continueRegularOutput",
      "position": [
        1968,
        -240
      ],
      "parameters": {
        "url": "={{(() => {\n  const website = $('Pull Lead From Airtable').first().json['Company Website'];\n  const email = $('Pull Lead From Airtable').first().json['Email Address'];\n  // If 'Company Website' is empty, derive from 'Email Address'\n  return website || `https://${email.split('@')[1]}`;\n})()}}{{ $json['message.content.selected_urls'] === 'no relevant url' ? '' : $json['message.content.selected_urls'] }}",
        "options": {}
      },
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "1a3987d9-832d-4846-9701-0d3e6c59d46f",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        2192,
        -240
      ],
      "parameters": {
        "options": {},
        "fieldsToAggregate": {
          "fieldToAggregate": [
            {
              "fieldToAggregate": "data"
            }
          ]
        }
      },
      "typeVersion": 1
    },
    {
      "id": "5572b8a0-fa43-4b6f-a14b-d6fd76f233b5",
      "name": "Remove HTML Homepage",
      "type": "n8n-nodes-base.code",
      "position": [
        304,
        -464
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const htmlContent = $node[\"Company Homepage Scraper\"].json[\"data\"]; // Replace this with the field containing your HTML content\n\n// Function to strip HTML tags and clean the text\nconst extractPlainText = (html) => {\n    if (!html) return \"\";\n\n    // Remove script and style tags along with their content\n    const withoutScriptsAndStyles = html.replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, \"\")\n                                        .replace(/<style[\\s\\S]*?>[\\s\\S]*?<\\/style>/gi, \"\");\n\n    // Remove all remaining HTML tags\n    const strippedText = withoutScriptsAndStyles.replace(/<\\/?[^>]+(>|$)/g, \"\");\n\n    // Replace HTML entities with their plain-text equivalents\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    // Replace multiple spaces, tabs, and newlines with a single space\n    const cleanedText = decodedText.replace(/\\s+/g, \" \").trim();\n\n    return cleanedText;\n};\n\n// Call the function to process the HTML content\nconst plainText = extractPlainText(htmlContent);\n\n// Return the plain text as the output of this node\nreturn {\n    plainText: plainText,\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "83a5a1ef-f19f-44cb-923f-96aadd897e3b",
      "name": "Remove HTML Webpages",
      "type": "n8n-nodes-base.code",
      "position": [
        2400,
        -240
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\n\nconst cleanText = (html) => {\n    return html\n        .replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, '')  // Remove scripts\n        .replace(/<style[\\s\\S]*?>[\\s\\S]*?<\\/style>/gi, '')    // Remove styles\n        .replace(/<!--[\\s\\S]*?-->/g, '')                     // Remove comments\n        .replace(/<\\/?[^>]+(>|$)/g, '')                      // Remove HTML tags\n        .replace(/&nbsp;/gi, \" \")                           // Decode HTML entities\n        .replace(/&amp;/gi, \"&\")\n        .replace(/&lt;/gi, \"<\")\n        .replace(/&gt;/gi, \">\")\n        .replace(/&quot;/gi, \"\\\"\")\n        .replace(/&#39;/gi, \"'\")\n        .replace(/\\s+/g, ' ')                                // Normalize whitespace\n        .trim();\n};\n\nconst updatedItems = items.map((item) => {\n    const data = item.json.data.map(cleanText);\n    return { ...item.json, data };\n});\n\nreturn updatedItems;\n"
      },
      "typeVersion": 2
    },
    {
      "id": "f21dd167-8bfd-4450-bd20-c1989a5d41f5",
      "name": "Analyze Company/Mission",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1152,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=**Prompt:**  \n\nAnalyze the following company data and extract **only verifiable information** from the text. The output should be written as a **cohesive business overview** without unnecessary repetition or conclusions. **Do not fabricate or infer missing details**\u2014only include what is explicitly stated.  \n\nThe analysis should cover:  \n\n1. **Company History & Founders** \u2013 Who founded it, when (if stated), and any background on why it was established.  \n2. **Mission Statement & Core Values** \u2013 The company\u2019s core purpose, guiding principles, and approach to business.  \n3. **Vision Statement & Future Goals** \u2013 Any stated long-term objectives or future aspirations.  \n4. **Industries Served & Target Audience** \u2013 Broad industry classification and specific client types served.  \n5. **Services & Specialties** \u2013 The exact services offered and any notable areas of specialization.  \n6. **Company Achievements & Recognition** \u2013 Any awards, recognitions, partnerships, or milestones mentioned.  \n\n**Output Format:**  \n\nWrite the response as a **well-structured business overview** in clear paragraphs. **Do not include bullet points, lists, or conclusions.** Keep the tone **neutral, factual, and concise** while ensuring clarity. If specific details (e.g., founding year, awards) are not mentioned, **state that they are not provided** instead of assuming.  \n\n### **Additional Instruction:**  \nFor any detail that is not explicitly provided in the text, simply state \"Not mentioned in the text.\" Do not add extra commentary, qualifiers like \"However,\" or any inferred information. Keep your response strictly factual and concise."
            },
            {
              "content": "=Input: {{ $json.finalText }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "e26d8031-cc52-443c-b987-cedcdb4e2a94",
      "name": "Analyze Offerings & Positioning",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        1712,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=### **Prompt:**  \n\nAnalyze the following company data and extract **only verifiable information** from the text. The output should be written as a **cohesive business overview** without unnecessary repetition or conclusions. **Do not fabricate or infer missing details**\u2014only include what is explicitly stated.  \n\nThe analysis should cover:  \n\n1. **Core Products & Services** \u2013 The exact products or services the company offers, how they function, and their benefits to customers.  \n2. **Feature Lists & Differentiators** \u2013 What makes the company\u2019s offerings unique compared to competitors (e.g., superior technology, customization, industry expertise).  \n3. **Pricing Models** \u2013 If mentioned, describe the company's pricing approach (e.g., subscription-based, enterprise-level, one-time fee). If pricing is not provided, state that it is not mentioned.  \n4. **Industries Served** \u2013 A more detailed look at niche verticals or specialized markets the company caters to.  \n5. **Use Cases & Applications** \u2013 Real-world applications of the company\u2019s solutions, who benefits from them, and how they solve specific problems.  \n6. **Target Customers** \u2013 Whether the company serves SMBs, enterprises, B2B, B2C, or a specific customer segment.  \n7. **Service & Support Approach** \u2013 If mentioned, describe how the company supports its customers (e.g., dedicated account management, 24/7 support, implementation services).  \n8. **Geographical Reach** \u2013 If applicable, mention whether the company operates locally, nationally, or globally.  \n\n### **Output Format:**  \nWrite the response as a **well-structured business overview** in clear paragraphs. **Do not use bullet points, lists, or conclusions.** Keep the tone **neutral, factual, and concise** while ensuring clarity. If specific details (e.g., pricing, support) are not mentioned, **state that they are not provided** instead of assuming.  \n\n### **Additional Instruction:**  \nFor any detail that is not explicitly provided in the text, simply state \"Not mentioned in the text.\" Do not add extra commentary, qualifiers like \"However,\" or any inferred information. Keep your response strictly factual and concise."
            },
            {
              "content": "=Input: {{ $json.finalText }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "1ac9e801-007f-400a-be4a-68fb78dbf0be",
      "name": "Analyze Process & Differentiation",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2272,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=### **Prompt:**  \n\nAnalyze the following company data and extract **only verifiable information** from the text. The output should be written as a **cohesive business overview** without unnecessary repetition or conclusions. **Do not fabricate or infer missing details**\u2014only include what is explicitly stated.  \n\nThe analysis should cover:  \n\n1. **Company Methodology** \u2013 How the company delivers its services (e.g., agile, data-driven, consultative, customer-centric). If specific methodologies or approaches are mentioned, describe them.  \n2. **Step-by-Step Process** \u2013 If outlined, explain how the company operates from client onboarding to delivering results. Include any structured workflows or frameworks.  \n3. **Proprietary Tech or Frameworks** \u2013 Mention any unique models, software, patents, or proprietary methodologies that differentiate the company.  \n4. **Value Proposition** \u2013 What makes this company stand out? Identify key selling points compared to competitors, such as efficiency, customization, cost-effectiveness, or expertise.  \n5. **Onboarding Experience** \u2013 How the company interacts with new clients, including the initial consultation, setup, or integration process.  \n6. **Key Metrics & Focus Areas** \u2013 Identify any performance indicators they highlight, such as cost reduction, ROI, revenue impact, speed, or efficiency.  \n7. **Customer Engagement & Communication** \u2013 If mentioned, describe how the company interacts with clients (e.g., regular reporting, dedicated account managers, transparent feedback loops).  \n8. **Scalability & Adaptability** \u2013 If relevant, include how the company adapts to different client needs, business sizes, or industries.  \n\n### **Output Format:**  \nWrite the response as a **well-structured business overview** in clear paragraphs. **Do not use bullet points, lists, or conclusions.** Keep the tone **neutral, factual, and concise** while ensuring clarity. If specific details (e.g., proprietary tech, onboarding steps) are not mentioned, **state that they are not provided** instead of assuming.  \n\n### **Additional Instruction:**  \nFor any detail that is not explicitly provided in the text, simply state \"Not mentioned in the text.\" Do not add extra commentary, qualifiers like \"However,\" or any inferred information. Keep your response strictly factual and concise."
            },
            {
              "content": "=Input: {{ $json.finalText }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "7cf522a5-a716-4264-bdfc-14a0b4bd3f41",
      "name": "Analyze Proof Of Success",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        2832,
        0
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=### **Prompt:**  \n\nAnalyze the following company data and extract **only verifiable proof of success** from the text. The output should be written as a **detailed, fact-based summary** without unnecessary repetition, speculation, or conclusions. **Do not fabricate or infer missing details\u2014only include what is explicitly stated.**  \n\nThe analysis should cover:  \n\n1. **Case Studies & Real-World Success** \u2013 Extract any case studies, including company names, industries, and specific outcomes achieved. Summarize the challenge, the company\u2019s solution, and the measurable results. If numerical improvements (e.g., increased revenue, cost reduction, hiring efficiency) are provided, include them.  \n2. **Testimonials & Client Feedback** \u2013 Identify any direct client quotes, including who provided them (e.g., job title, company). If a testimonial includes specific praise (e.g., speed, expertise, impact), highlight the most compelling details.  \n3. **Notable Clients & Partnerships** \u2013 If company names are mentioned, extract them accurately. If industries or company sizes are referenced, include them.  \n4. **Key Results & Metrics** \u2013 If quantifiable outcomes are stated (e.g., \"helped hire 500+ executives,\" \"reduced time-to-hire by 40%\"), extract these with precise figures.  \n5. **Awards & Recognition** \u2013 If industry awards, certifications, or high-profile partnerships are mentioned, list them with dates where available.  \n6. **Long-Term Impact & Reputation** \u2013 If there are statements about repeat clients, high retention rates, or ongoing relationships, include them.  \n7. **Third-Party Validation** \u2013 If the company\u2019s success has been referenced in media, research reports, or by industry experts, extract relevant mentions.  \n\n### **Output Format:**  \nWrite the response as a **detailed business overview** in **clear, structured paragraphs**. **Do not use bullet points, lists, or conclusions.** Maintain a **neutral, factual, and concise tone** while ensuring clarity. If no case studies, testimonials, or quantifiable proof are found, **state that the text does not contain this information** instead of assuming.  \n\n### **Additional Instruction:**  \nFor any detail that is not explicitly provided in the text, simply state \"Not mentioned in the text.\" Do not add extra commentary, qualifiers like \"However,\" or any inferred information. Keep your response strictly factual and concise."
            },
            {
              "content": "=Input: {{ $json.finalText }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "201988fa-20ff-484a-9094-6df8b07ed839",
      "name": "Remove Duplicates Texts C/M",
      "type": "n8n-nodes-base.code",
      "position": [
        944,
        0
      ],
      "parameters": {
        "jsCode": "const homepageText = $('Remove HTML Homepage').first()?.json?.plainText || \"\";\nconst sectionText = $('Remove HTML Webpages').first()?.json?.data?.[0] || \"\";\n\n// Normalize text by replacing multiple whitespace characters with a single space and trimming.\nconst normalizeText = text => (text ? text.replace(/\\s+/g, ' ').trim() : \"\");\n\nconst normalizedHomepageText = normalizeText(homepageText);\nconst normalizedSectionText = normalizeText(sectionText);\n\nconst finalText = normalizedHomepageText === normalizedSectionText\n  ? homepageText\n  : (homepageText && sectionText) \n    ? homepageText + \"\\n\" + sectionText\n    : homepageText || sectionText; // Return whichever one is available\n\nreturn [{ json: { finalText } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "0d1ef84a-8ad3-45c7-a8a7-c1b0af985eb8",
      "name": "Remove Duplicates Texts O/P",
      "type": "n8n-nodes-base.code",
      "position": [
        1504,
        0
      ],
      "parameters": {
        "jsCode": "const homepageText = $('Remove HTML Homepage').first()?.json?.plainText || \"\";\nconst sectionText = $('Remove HTML Webpages').first()?.json?.data?.[1] || \"\";\n\n// Normalize text by replacing multiple whitespace characters with a single space and trimming.\nconst normalizeText = text => (text ? text.replace(/\\s+/g, ' ').trim() : \"\");\n\nconst normalizedHomepageText = normalizeText(homepageText);\nconst normalizedSectionText = normalizeText(sectionText);\n\nconst finalText = normalizedHomepageText === normalizedSectionText\n  ? homepageText\n  : (homepageText && sectionText) \n    ? homepageText + \"\\n\" + sectionText\n    : homepageText || sectionText; // Return whichever one is available\n\nreturn [{ json: { finalText } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "f42e6ef2-527c-4f99-92c8-d2e93978e549",
      "name": "Remove Duplicates Texts P/D",
      "type": "n8n-nodes-base.code",
      "position": [
        2064,
        0
      ],
      "parameters": {
        "jsCode": "const homepageText = $('Remove HTML Homepage').first()?.json?.plainText || \"\";\nconst sectionText = $('Remove HTML Webpages').first()?.json?.data?.[2] || \"\";\n\n// Normalize text by replacing multiple whitespace characters with a single space and trimming.\nconst normalizeText = text => (text ? text.replace(/\\s+/g, ' ').trim() : \"\");\n\nconst normalizedHomepageText = normalizeText(homepageText);\nconst normalizedSectionText = normalizeText(sectionText);\n\nconst finalText = normalizedHomepageText === normalizedSectionText\n  ? homepageText\n  : (homepageText && sectionText) \n    ? homepageText + \"\\n\" + sectionText\n    : homepageText || sectionText; // Return whichever one is available\n\nreturn [{ json: { finalText } }];"
      },
      "typeVersion": 2
    },
    {
      "id": "90663551-66df-4d37-bf12-fb22d66930c6",
      "name": "Remove Duplicates Texts PoS",
      "type": "n8n-nodes-base.code",
      "position": [
        2624,
        0
      ],
      "parameters": {
        "jsCode": "const homepageText = $('Remove HTML Homepage').first()?.json?.plainText || \"\";\nconst sectionText = $('Remove HTML Webpages').first()?.json?.data?.[3] || \"\";\n\n// Normalize text by replacing multiple whitespace characters with a single space and trimming.\nconst normalizeText = text => (text ? text.replace(/\\s+/g, ' ').trim() : \"\");\n\nconst normalizedHomepageText = normalizeText(homepageText);\nconst normalizedSectionText = normalizeText(sectionText);\n\nconst finalText = normalizedHomepageText === normalizedSectionText\n  ? homepageText\n  : (homepageText && sectionText) \n    ? homepageText + \"\\n\" + sectionText\n    : homepageText || sectionText; // Return whichever one is available\n\nreturn [{ json: { finalText } }];\n"
      },
      "typeVersion": 2
    },
    {
      "id": "3c8851c5-6db5-4b3f-a29f-8f979216f76c",
      "name": "Pull Lead From Airtable",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $json.query.recordId }}",
      "position": [
        -3616,
        -48
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableSourceTableId\"] }}"
        },
        "options": {}
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "b4c33e20-fb9c-461a-bdbe-72d68d1b5e0d",
      "name": "Analyze Company LinkedIn",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -1440,
        -464
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=### **Prompt:**  \n\nAnalyze the following **LinkedIn company profile data** and extract **only verifiable information** from the text. The output should be written as a **cohesive and structured overview**, divided into three sections:  \n\n1. **Company Overview** \u2013 Extract the **full official company name** as stated on the profile. Provide the **overview statement** exactly as written in the \"About\" section without modification. Identify the **industry classification** as explicitly mentioned.  \n\n2. **Company Details** \u2013 Extract the **company size range** as stated on LinkedIn (e.g., 51-200 employees). If available, include the **exact number of employees listed as \"associated members\"** on LinkedIn. Provide the **year of founding** if explicitly stated. Extract **specializations** exactly as written in the \"Specialties\" section. List **office locations** as stated under the \"Locations\" section. If any of these details are missing, state **\"Not mentioned in the text.\"**  \n\n3. **Funding Information** \u2013 If applicable, extract details on the **most recent funding round**, including the funding type (e.g., Series A, Series B) and the date if provided. Identify the **company\u2019s funding stage or status** (e.g., bootstrapped, venture-backed, acquired). If funding information is not available, state **\"Not mentioned in the text.\"**  \n\nThe response should be **fact-based, clearly structured, and free from assumptions or interpretations**. **Do not fabricate or infer missing details**\u2014only include what is explicitly stated in the text.  \n\n### **Output Format:**  \n\n#### **Company Overview**  \n[Write a structured paragraph including the company name, overview statement, and industry classification.]  \n\n#### **Company Details**  \n[Write a structured paragraph listing company size, exact employee count (if available), founding year, specializations, and office locations.]  \n\n#### **Funding Information**  \n[Write a structured paragraph summarizing funding details if available. If no funding information is provided, state \"Not mentioned in the text.\"]  \n\n**Additional Instruction:**  \n- Do not include bullet points\u2014write in **clear, well-structured paragraphs** for easy readability.  \n- Avoid redundancy and unnecessary filler text\u2014**keep it concise yet informative**.  \n- For any detail that is not explicitly provided in the text, simply state \"Not mentioned in the text.\" Do not add extra commentary, qualifiers like \"However,\" or any inferred information. Keep your response strictly factual and concise."
            },
            {
              "content": "=Input: {{ $('Remove HTML LinkedIn Page').item.json.plainText }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "8b9ca2b5-73ce-42a5-a67a-73fdde833c37",
      "name": "LinkedIn Profile Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "[INPUT JSON FROM APIFY SCRAPER HERE]\n\nYOU WANT THE LINKEDIN PROFILE URL TO BE VARIABLE US THIS AS AN EXMAMPLE: \"{{ $('Pull Lead From Airtable').item.json['LinkedIn URL'] }}\"\n\nhttps://www.linkedin.com/in/alexhormozi/",
      "onError": "continueRegularOutput",
      "position": [
        -1088,
        -464
      ],
      "parameters": {
        "url": "https://api.apify.com/v2/acts/curious_coder~linkedin-profile-scraper/run-sync-get-dataset-items",
        "method": "POST",
        "options": {},
        "jsonBody": "={YOUR APIFY JSON BODY}",
        "sendBody": true,
        "sendHeaders": true,
        "specifyBody": "json",
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer [YOUR APIFY API TOKEN]"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3f1c864a-73c6-45dc-bf3e-821b29268aee",
      "name": "JSON Into Text",
      "type": "n8n-nodes-base.code",
      "position": [
        -880,
        -464
      ],
      "parameters": {
        "jsCode": "const items = $input.all();\nconst text = items.map((item) => JSON.stringify(item.json)).join(\", \");\n\nreturn { text };\n"
      },
      "typeVersion": 2
    },
    {
      "id": "41997bf8-1332-43f5-a724-fcfa43777f28",
      "name": "Analyze Personal LinkedIn",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -688,
        -464
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=### **Prompt: LinkedIn Personal Profile Data Extraction**  \n\nAnalyze the following **LinkedIn personal profile data** and extract **only verifiable information** from the text. The output should be written as a **cohesive and structured overview**, divided into three sections:  \n\n1. **Profile Overview** \u2013 Extract the **individual\u2019s full name** as stated on the profile. Summarize their **core expertise and skills**, focusing on areas of specialization, professional strengths, and industry focus. Highlight any **major career achievements, awards, or significant contributions** explicitly mentioned. If stated, include their **aspirations, long-term career goals, and professional ambitions**. If the profile contains information about their **personal mission, values, or guiding principles**, integrate those as well. Finally, describe their **unique value proposition**\u2014what differentiates them in their field, whether it\u2019s **technical expertise, leadership, or strategic vision**.  \n\n2. **Experience Summary** \u2013 Extract and provide a structured summary of the individual's **current job title, company, and tenure** as stated on their profile. Describe their **responsibilities, leadership role, and contributions to business growth** based on the text. If listed, include **previous positions and career trajectory**, showing how they have progressed over time. Mention **seniority level** (executive, management, specialist) if explicitly stated. Highlight any **key projects, deals, or initiatives** they have led or contributed to. If the profile contains details about their **industry background or sector expertise**, integrate that as well.  \n\n3. **Education & Training** \u2013 Extract and list the **individual\u2019s academic background, degrees earned, and universities attended** as displayed on their profile. Include **fields of study and specializations** relevant to their industry. If additional **certifications, executive programs, or professional development courses** are mentioned, summarize those as well. If no education details are provided, state **\"Not mentioned in the text.\"** instead of making assumptions.  \n\nThe response should be **fact-based, clearly structured, and free from assumptions or interpretations**. **Do not fabricate or infer missing details**\u2014only include what is explicitly stated in the text.  \n\n### **Output Format:**  \n\n#### **Profile Overview**  \n[Write a structured paragraph containing the full name, core expertise, skills, major career achievements, aspirations, professional goals, personal mission, values, and unique value proposition.]  \n\n#### **Experience Summary**  \n[Write a structured paragraph detailing their current role, responsibilities, tenure, contributions, career progression, seniority level, and key projects or business initiatives.]  \n\n#### **Education & Training**  \n[Write a structured paragraph listing degrees, universities, specializations, and certifications. If no education details are provided, state \"Not mentioned in the text.\"]  \n\n\n### **Additional Instructions:**  \n- Do **not** include bullet points\u2014write in **clear, structured paragraphs** for readability.  \n- Avoid redundancy\u2014**keep it concise yet informative**.  \n- If a specific detail is not explicitly provided, state **\"Not mentioned in the text.\"** Do **not** add extra commentary or inferred details.  \n- **Extract text exactly as written** in the profile; do not paraphrase or reword personal descriptions.  "
            },
            {
              "content": "=Input: {{ $json.text }}\nToday's date: {{ $now }}"
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "1147d65a-9236-48f2-9133-5c257c005cd0",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1088,
        -576
      ],
      "parameters": {
        "color": 5,
        "width": 460,
        "height": 80,
        "content": "Link to Apify scraper used:\nhttps://console.apify.com/actors/PEgClm7RgRD7YO94b/input"
      },
      "typeVersion": 1
    },
    {
      "id": "82f25899-b778-4535-b870-2a54f18ef39f",
      "name": "Company Homepage Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "onError": "continueRegularOutput",
      "position": [
        80,
        -464
      ],
      "parameters": {
        "url": "={{(() => {\n  const website = $('Pull Lead From Airtable').first().json['Company Website'];\n  const email = $('Pull Lead From Airtable').first().json['Email Address'];\n  // If 'Company Website' is empty, derive from 'Email Address'\n  return website || `https://${email.split('@')[1]}`;\n})()}}",
        "options": {}
      },
      "typeVersion": 4.2
    },
    {
      "id": "26eba49b-7856-412b-baa6-12a9da7ac2d1",
      "name": "Check If Empty",
      "type": "n8n-nodes-base.code",
      "position": [
        528,
        -464
      ],
      "parameters": {
        "jsCode": "return items.map(item => {\n  if (!item.json.plainText || item.json.plainText.trim().length === 0) {\n    return { json: { message: \"item is empty\" } };\n  } else {\n    return { json: item.json };\n  }\n});\n"
      },
      "typeVersion": 2
    },
    {
      "id": "130e8fc7-9186-469c-9714-3c30b286c900",
      "name": "Unable To Scrape Website?",
      "type": "n8n-nodes-base.if",
      "position": [
        752,
        -464
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "f70aeaf4-f4ef-4cd6-b239-2f4911c079de",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.message }}",
              "rightValue": "item is empty"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "1beee158-a13e-4b3d-b136-90ac2f3a0112",
      "name": "Update Lead W/ Enrichment",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $json.query.recordId }}",
      "position": [
        2528,
        -640
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableTargetTableId\"] }}"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "19bad014-2599-4e03-ac95-9ddc23f38ab8",
      "name": "US: Yes or No?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3008,
        -144
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "7540d0aa-8723-4dd0-9c11-f9ad60a4fa38",
              "operator": {
                "type": "string",
                "operation": "contains"
              },
              "leftValue": "={{ $('Pull Lead From Airtable').item.json.Location }}",
              "rightValue": "United States"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "1be162b6-26c1-4b9e-979b-9e9ad1a5bce6",
      "name": "B2B: Yes or No?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1824,
        -240
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "or",
          "conditions": [
            {
              "id": "7540d0aa-8723-4dd0-9c11-f9ad60a4fa38",
              "operator": {
                "type": "string",
                "operation": "notEquals"
              },
              "leftValue": "={{ $json.message.content['1.) Business Model']['Business Model (B2B/B2C)'] }}",
              "rightValue": "B2C"
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "c7180a56-b748-4a69-aba1-c82318274307",
      "name": "Headcount: >5, <30?",
      "type": "n8n-nodes-base.if",
      "position": [
        -1648,
        -336
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "7540d0aa-8723-4dd0-9c11-f9ad60a4fa38",
              "operator": {
                "type": "number",
                "operation": "lte"
              },
              "leftValue": "={{ $json.message.content['2.) Number of Employees']['Exact Number of Employees'] }}",
              "rightValue": 30
            },
            {
              "id": "beb073f3-f5bc-4ec2-890e-f16ed4da2572",
              "operator": {
                "type": "number",
                "operation": "gte"
              },
              "leftValue": "={{ $json.message.content['2.) Number of Employees']['Exact Number of Employees'] }}",
              "rightValue": 5
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": false
    },
    {
      "id": "4b544862-135c-47ff-84ad-de105237c874",
      "name": "LinkedIn Company Scraper",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -2608,
        -240
      ],
      "parameters": {
        "url": "={{ $('Pull Lead From Airtable').item.json[\"LinkedIn Organization URL\"] }}",
        "options": {}
      },
      "typeVersion": 4.2,
      "alwaysOutputData": false
    },
    {
      "id": "6f62c5e1-f73a-4127-b25d-1c480bc7d657",
      "name": "Remove HTML LinkedIn Page",
      "type": "n8n-nodes-base.code",
      "position": [
        -2384,
        -240
      ],
      "parameters": {
        "mode": "runOnceForEachItem",
        "jsCode": "const htmlContent = $node[\"LinkedIn Company Scraper\"].json[\"data\"]; // Replace this with the field containing your HTML content\n\n// Function to strip HTML tags and clean the text\nconst extractPlainText = (html) => {\n    if (!html) return \"\";\n\n    // Remove script and style tags along with their content\n    const withoutScriptsAndStyles = html.replace(/<script[\\s\\S]*?>[\\s\\S]*?<\\/script>/gi, \"\")\n                                        .replace(/<style[\\s\\S]*?>[\\s\\S]*?<\\/style>/gi, \"\");\n\n    // Remove all remaining HTML tags\n    const strippedText = withoutScriptsAndStyles.replace(/<\\/?[^>]+(>|$)/g, \"\");\n\n    // Replace HTML entities with their plain-text equivalents\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    // Replace multiple spaces, tabs, and newlines with a single space\n    const cleanedText = decodedText.replace(/\\s+/g, \" \").trim();\n\n    return cleanedText;\n};\n\n// Call the function to process the HTML content\nconst plainText = extractPlainText(htmlContent);\n\n// Return the plain text as the output of this node\nreturn {\n    plainText: plainText,\n};\n\n"
      },
      "executeOnce": false,
      "typeVersion": 2,
      "alwaysOutputData": false
    },
    {
      "id": "b2f00390-c34d-46b7-8301-bfd183b3d384",
      "name": "Update Lead - Not US",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $('Pull Lead From Airtable').item.json.id }}",
      "position": [
        -2800,
        -48
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableTargetTableId\"] }}"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e9ddee9f-79c5-497f-b701-78dac840e9b2",
      "name": "Update Lead - Not B2B",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $('Pull Lead From Airtable').item.json.id }}",
      "position": [
        -1648,
        -144
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableTargetTableId\"] }}"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "3d04c36f-5570-48ce-b177-835ab3a19f31",
      "name": "Update Lead - Too Big or Small",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $('Pull Lead From Airtable').item.json.id }}",
      "position": [
        -1440,
        -224
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableTargetTableId\"] }}"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "49834d73-4207-4c69-85e0-fe8b47407a78",
      "name": "Email Validation - NeverBounce",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -3424,
        -48
      ],
      "parameters": {
        "url": "=https://api.neverbounce.com/v4/single/check?email={{ $json[\"Email Address\"] }}",
        "options": {},
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer [YOUR NEVERBOUNCE API KEY]"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "f3dc6331-e8f4-425b-9bbd-6ce273bab86a",
      "name": "Email Valid?",
      "type": "n8n-nodes-base.if",
      "position": [
        -3216,
        -48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "572a70bf-ae83-4107-906a-24d2d2971c44",
              "operator": {
                "name": "filter.operator.equals",
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.result }}",
              "rightValue": "valid"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "faeaaf02-6a66-4508-9da7-ae405a9f6744",
      "name": "Update Lead - No Valid Email",
      "type": "n8n-nodes-base.airtable",
      "notes": "{{ $('Pull Lead From Airtable').item.json.id }}",
      "position": [
        -3008,
        64
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableBaseId\"] }}"
        },
        "table": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $node[\"Configure Variables\"].json[\"airtableTargetTableId\"] }}"
        },
        "columns": {
          "value": {},
          "schema": [],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "01a468b4-def1-4225-992f-c12483d3612d",
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2800,
        -240
      ],
      "parameters": {
        "amount": "={{ Math.floor(Math.random() * (20 - 8 + 1)) + 8 }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "e43c4b58-3010-47ff-ab54-c53576c544c9",
      "name": "Analyze Company LinkedIn_",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -2176,
        -240
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1-mini",
          "cachedResultName": "GPT-4.1-MINI"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You are an expert in professional business analysis and LinkedIn data extraction. Your task is to analyze the scraped LinkedIn profile of a company to produce a high-quality, detailed report. Your response must be precise, structured, and focused on the specific insights outlined below. Ensure all outputs are professional, fact-based, and well-organized."
            },
            {
              "content": "=**Prompt:**  \nAnalyze the scraped LinkedIn profile data and extract the following key details:  \n\n1.) **Business Model**: Determine whether the company operates in a **B2B (business-to-business)** or **B2C (business-to-consumer)** model. The response must clearly state only **one** of these options.  \n\n2.) **Number of Employees**: Extract the exact number of employees listed on the profile. This number is found in text formatted as: `\"Follow View all X employees\"`. **Always output as a numerical value (# number).**  \n\n### **Output Format (JSON)**  \nEnsure the output follows this exact structure:  \n\n```json\n{\n  \"1.) Business Model\": {\n    \"Business Model (B2B/B2C)\": \"Specify B2B or B2C\"\n  },\n  \"2.) Number of Employees\": {\n    \"Exact Number of Employees\": #\n  },\n}\n```\n\n### **Rules & Constraints:**  \n- **Strictly follow the JSON structure above.**  \n- **No assumptions** \u2013 only use explicitly stated data. If unavailable, return `\"Not specified\"` instead.  \n- **Never include additional details, descriptions, or filler text.**  \n- **Ensure \"Exact Number of Employees\" is always a # number.**  \n- **For the cybersecurity question, answer only \"Yes\" or \"No\".**  "
            },
            {
              "content": "={{ $json.plainText }}\n- Today's date: {{$now}}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.7,
      "alwaysOutputData": false
    },
    {
      "id": "1b38b03a-c3d0-4191-ab9c-7d1cc6bc68ed",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2080,
        -1248
      ],
      "parameters": {
        "color": 7,
        "width": 500,
        "height": 200,
        "content": "From the Header & Top Navigation\nLikely Information Found:\n\nCompany Name \u2013 The official registered name of the company.\nIndustry \u2013 The primary sector in which the company operates (e.g., SaaS, healthcare, fintech).\nLocation \u2013 The company\u2019s geographic headquarters or primary office.\nCompany Size \u2013 Number of employees, often categorized into ranges (e.g., 1-10, 11-50, 51-200, etc.)."
      },
      "typeVersion": 1
    },
    {
      "id": "cb7ef910-c40a-4acc-93f7-0d5264c135c5",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -928,
        -1200
      ],
      "parameters": {
        "color": 5,
        "width": 500,
        "content": "From the Sidebar (Funding Section, if available)\nLikely Information Found:\n\nRecent Funding Round \u2013 If applicable, details on the company\u2019s latest funding event (e.g., Series A, Series B, amount, and date).\nFunding Stage/Status \u2013 Current funding position (e.g., bootstrapped, venture-backed, acquired)."
      },
      "typeVersion": 1
    },
    {
      "id": "13e88bf7-2c52-4ebc-a93c-c05bb1fb8970",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1504,
        -1488
      ],
      "parameters": {
        "color": 6,
        "width": 500,
        "height": 440,
        "content": "From the Company Overview/About Section\nLikely Information Found:\n\nCompany Name \u2013 The full official name of the company as stated on the profile.\nOverview Statement \u2013 The company\u2019s main description or summary from the \"About\" section. Extract the full statement without modification.\nIndustry \u2013 The primary industry classification of the company as explicitly mentioned.\nCompany Size (Range) \u2013 The estimated size of the company based on LinkedIn\u2019s provided range (e.g., 51-200 employees).\nExact Number of Employees (Associated Members) \u2013 The specific number of employees listed as \"associated members\" on LinkedIn. If unavailable, state \"Not mentioned in the text.\"\nFounded \u2013 The year the company was founded, if explicitly stated. If not mentioned, state \"Not mentioned in the text.\"\nSpecializations \u2013 Key areas of expertise, technologies, or capabilities listed under the \"Specialties\" section. Extract them exactly as stated without modification.\nOffice Locations \u2013 The exact office locations listed under the \"Locations\" section. If not specified, state \"Not mentioned in the text.\""
      },
      "typeVersion": 1
    },
    {
      "id": "575f91cf-da74-4fb1-8ec6-3fe66197b6d0",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        288,
        -1408
      ],
      "parameters": {
        "color": 4,
        "width": 500,
        "height": 360,
        "content": "Experience Section\nLikely Information Found:\n\nCurrent job title & company \u2013 The individual's current role and employer, often paired with tenure details.\nJob responsibilities & impact \u2013 A summary of duties, leadership responsibilities, and contributions to business growth.\nCompany background & industry \u2013 The sector the company operates in, giving insight into their professional environment.\nPrevious positions & career trajectory \u2013 A timeline of past roles, showing career progression, promotions, or job changes.\nEmployment duration & stability \u2013 Length of time spent in differe

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

How this works

Marketers and sales teams can enrich B2B leads with fresh LinkedIn data, then generate hyper-personalised cold emails in seconds using GPT-4 and Airtable. The workflow pulls profile details through HTTP requests, analyses them with OpenAI to identify key talking points, and writes the output straight into an Airtable base ready for outreach. This removes hours of manual research and keeps every message relevant to the recipient.

Use it when you need to scale personalised outreach from dozens to hundreds of leads without hiring extra researchers. Skip it for one-off emails or when LinkedIn data must stay strictly private, as the HTTP scraping step introduces compliance considerations. A common variation replaces Airtable with a direct email tool so messages are sent immediately rather than queued.

About this workflow

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 analysis (via LLMs/GPT-4.1), and CRM synchronization (using Airtable), this workflow…

Source: https://n8n.io/workflows/9243/ — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

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—

Airtable, OpenAI, HTTP Request +1
AI & RAG

AI-Powered Fake Review Detection Workflow Using n8n & Airtable. Uses httpRequest, airtable, openAi, slack. Webhook trigger; 27 nodes.

HTTP Request, Airtable, OpenAI +1
AI & RAG

This workflow automatically monitors Facebook Group posts, analyzes them using AI, detects policy violations, logs incidents, notifies moderators and automatically hides high-severity posts to keep th

OpenAI, Slack, Airtable +1
AI & RAG

Accelerate your real estate marketing by moving from "photo capture" to "published listing" in seconds. This workflow automates the entire listing process by hosting property photos via UploadToURL, u

N8N Nodes Uploadtourl, OpenAI, HTTP Request +2
AI & RAG

Automatically triages risky AWS misconfigurations and alerts your team.

Gmail, OpenAI, Airtable +1