Automate LinkedIn Lead Generation with HDW and OpenAI in n8n

Discover how to automate LinkedIn lead generation using n8n, HDW LinkedIn API, and OpenAI. This workflow transforms ICPs into LinkedIn searches, enriches lead data, scores leads, and manages outreach efficiently.
lmChatOpenAi
googleSheets
hdw.hdwLinkedin
+15
Learn how to Build this Workflow with AI:
Workflow Identifier: 1316
NODES in Use: chatTrigger, lmChatOpenAi, memoryBufferWindow, outputParserStructured, googleSheets, splitInBatches, stickyNote, hdw.hdwLinkedin, openAi, agent, manualTrigger, code, wait, if, sort, limit, hdw.hdwLinkedinManagement, scheduleTrigger

Press CTRL+F5 if the workflow didn't load.

Visit through Desktop for Best experience

1. Opening Problem Statement

Meet Julia, a sales manager at a boutique consultancy, determined to grow her client base in the hospitality sector but overwhelmed by the tedious, repetitive tasks of identifying, researching, and prioritizing LinkedIn leads manually. Julia wastes hours each day filtering LinkedIn Sales Navigator results, trying to find companies and decision-makers who might truly be interested in her services. She often misses key opportunities due to limited insights on their posts, company news, or website content, leading to ineffective outreach and lost revenue.

This is the exact problem the “HDW Lead Geländewagen” workflow solves. It automates the entire lead sourcing and qualifying process for LinkedIn sales efforts, saving Julia hundreds of laborious hours and helping her focus only on high-potential leads.

2. What This Automation Does

When this n8n workflow triggers (manually or scheduled), it:

  • Converts an Ideal Customer Profile (ICP) description into LinkedIn Sales Navigator search filters using an AI agent.
  • Searches LinkedIn via the HDW LinkedIn API with those filters to find relevant leads and companies.
  • Saves leads into Google Sheets, capturing detailed company and personal profile data including job titles, industries, locations, and premium status.
  • Enriches data by gathering company websites and scraping their sitemaps and content to understand business and products via HDW web parsing tools and OpenAI summarization models.
  • Analyzes LinkedIn posts and company news for lead intent signals by summarizing content through OpenAI language models.
  • Scores leads intelligently based on the analysis of posts, news, and company details, prioritizing them for outreach.
  • Automates LinkedIn outreach, sending connection requests and follow-up messages to the most promising leads with pacing control to respect limits.

The result is a highly efficient, data-enriched lead generation pipeline that would otherwise take days or weeks to replicate manually.

3. Prerequisites ⚙️

  • n8n account with workflow execution access.
  • HDW LinkedIn API account for LinkedIn lead data and management.
  • OpenAI API key for AI-powered text generation and summarization.
  • Google Sheets account (OAuth2 credentials) with access to the spreadsheet used for leads.

Optional: Self-hosting n8n for maximum control using providers like Hostinger.

4. Step-by-Step Guide

Step 1: Transform ICP into LinkedIn Search Filters with AI Agent

Navigate to the AI Agent: ICP -> LinkedIn search filters node. It uses a Langchain agent to receive a textual Ideal Customer Profile and output structured LinkedIn Sales Navigator parameters as JSON. The node uses a complex system message guiding filtering rules and supported industries.

Tip: Modify the system message to tailor filters to your market.

Step 2: Trigger Search on LinkedIn via HDW LinkedIn Node

Search queries from the ICP parser feed into the HDW LinkedIn SN node, which calls the HDW API to retrieve leads matching those filters.

The node exports detailed lead profiles, including URLs, job titles, company info, and premium membership indicators.

Step 3: Save Leads to Google Sheets

The leads are fed to the Google Sheets nodes, configured to append or update rows matching lead URNs (unique identifiers) with structured fields such as name, headline, company, and location.

Be sure to authorize the Google Sheets OAuth2 credentials for smooth updates.

Step 4: Enrich Lead Data with Company Website

The workflow verifies if company names exist in the lead data and that the company website field is empty. For these records, it triggers the HDW Get Company Website node, performing a Google search via HDW API to find the official company website.

Results feed back into the Google Sheet for later enrichment stages.

Step 5: Scrape and Summarize Company Website Content

Using the HDW Site-map and HDW Parser nodes, the workflow scrapes the company website sitemap and content pages.

Then, summaries of the content about business and products are generated by an OpenAI agent node (Summarise company website) to distill useful sales insights.

Step 6: Analyze Lead and Company LinkedIn Posts

The HDW Get User Posts node extracts LinkedIn posts by the lead, aggregated and summarized with OpenAI model nodes (Summarise user posts).

Similarly, HDW Get Company Posts and summarization nodes analyze company-related posts, while HDW Get Company News fetches public news via Google search to identify intent signals.

Step 7: Score Leads to Prioritize Outreach

The Company Score Analysis node uses an OpenAI chat model to rate lead potential from 1 to 10 based on post summaries, website insights, and news articles.

This helps Julia focus only on the highest potential leads, improving conversion efficiency.

Step 8: Manage LinkedIn Connections and Send Messages

The workflow retrieves Julia’s current LinkedIn connections using the HDW Get LinkedIn Profile Connections node, splitting them for processing and updating their status in Google Sheets.

It automatically sends connection requests (HDW Send LinkedIn Connection) to scored leads who haven’t received requests, then sends a brief intro message (HDW LinkedIn Send Message) after connections are confirmed, pacing tasks via Wait nodes and batch loops to avoid rate limits.

5. Customizations ✏️

  • Adjust ICP Filtering: Edit the prompt in the AI Agent: ICP -> LinkedIn search filters node’s system message to specify your target industry, titles, or company sizes more narrowly.
  • Change Lead Scoring Criteria: Update the Company Score Analysis OpenAI prompt to emphasize your product-relevant keywords or pain points, influencing the lead scoring output.
  • Modify Outreach Message: Customize the text in HDW LinkedIn Send Message node to personalize the initial contact message with your brand voice.
  • Control Connection Request Volume: Adjust the Limit node’s max items count to control weekly request caps in line with LinkedIn’s limits.
  • Extend Data Fields: Add more columns or enrich data in Google Sheets nodes by mapping additional lead or company fields from HDW API responses.

6. Troubleshooting 🔧

Problem: HDW API Rate Limits or Timeouts

Cause: Excessive simultaneous API calls or network delays.

Solution: Use the built-in retry and wait options on HDW nodes, reduce batch sizes, and add wait nodes between calls.

Problem: Google Sheets Update Fails or Overwrites

Cause: Mismatched column mappings or missing key columns like URN.

Solution: Double-check the sheets column schema in Google Sheets nodes and ensure ‘URN’ is correctly matched and unique.

Problem: AI Summaries Inaccurate or Partial

Cause: Input text too long or malformed JSON passed with incomplete content.

Solution: Break input text into smaller chunks, verify JSON schema inputs, or tweak prompt wording for clarity.

7. Pre-Production Checklist ✅

  • Validate API credentials for HDW LinkedIn and OpenAI in n8n credentials manager.
  • Confirm Google Sheets document has correct sheet and column structure aligned to node mappings.
  • Run the workflow manually with a small ICP description to test successful lead retrieval and data enrichment.
  • Verify lead data populates Google Sheets correctly, including website, posts summary, and lead scores.
  • Ensure proper pacing in connection requests to avoid LinkedIn flags.

8. Deployment Guide

Activate your workflow in n8n with either manual trigger or scheduled triggers set (e.g., daily at 7 AM) to run your lead updates routinely. Use the built-in n8n execution logs to monitor API call status and errors.

Adjust batch sizes and wait times in split and wait nodes to optimize throughput without hitting platform limits.

9. FAQs

Q: Can this workflow be adapted for other social networks?

A: The core logic relies on HDW LinkedIn API, but you can swap or add similar API nodes to target other platforms if they provide searchable lead data.

Q: Does it consume lots of OpenAI credits?

A: Summarization and scoring use OpenAI models, so costs depend on dataset sizes and invocation frequency. Optimize by caching results or limiting batch sizes.

Q: How secure is my lead data?

A: Data flows only between trusted APIs and your Google Sheets account. Respect API key security and avoid sharing workflow access publicly.

10. Conclusion

By building and running this n8n workflow, Julia now automatically turns her ICP into actionable LinkedIn Sales Navigator searches, enriches leads with deep company and social media insights, scores them for relevance, and manages outreach—all without lifting a finger.

This automation saves her countless hours on lead research and improves her sales pipeline with timely, personalized contact, significantly boosting her conversion rates.

Next steps? Extend this workflow with personalized follow-up messages, integrate CRM updates, or include LinkedIn advertising triggers to amplify lead engagement.

Ready to focus on selling, not searching? Let’s get your HDW LinkedIn lead automation running in n8n today.

Related Workflows

Automate Viral UGC Video Creation Using n8n + Degaus (Beginner-Friendly Guide)

Learn how to automate viral UGC video creation using n8n, AI prompts, and Degaus. This beginner-friendly guide shows how to import, configure, and run the workflow without technical complexity.
Form Trigger
Google Sheets
Gmail
+37
Free

AI SEO Blog Writer Automation in n8n (Beginner Guide)

A complete beginner guide to building an AI-powered SEO blog writer automation using n8n.
AI Agent
Google Sheets
httpRequest
+5
Free

Automate CrowdStrike Alerts with VirusTotal, Jira & Slack

This workflow automates processing of CrowdStrike detections by enriching threat data via VirusTotal, creating Jira tickets for incident tracking, and notifying teams on Slack for quick response. Save hours daily by transforming complex threat data into actionable alerts effortlessly.
scheduleTrigger
httpRequest
jira
+5
Free

Automate Telegram Invoices to Notion with AI Summaries & Reports

Save hours on financial tracking by automating invoice extraction from Telegram photos to Notion using Google Gemini AI. This workflow extracts data, records transactions, and generates detailed spending reports with charts sent on schedule via Telegram.
lmChatGoogleGemini
telegramTrigger
notion
+9
Free

Automate Email Replies with n8n and AI-Powered Summarization

Save hours managing your inbox with this n8n workflow that uses IMAP email triggers, AI summarization, and vector search to draft concise replies requiring minimal review. Automate business email processing efficiently with AI guidance and Gmail integration.
emailReadImap
vectorStoreQdrant
emailSend
+12
Free

Automate Email Campaigns Using n8n with Gmail & Google Sheets

This n8n workflow automates personalized email outreach campaigns by integrating Gmail and Google Sheets, saving hours of manual follow-up work and reducing errors in email sequences. It ensures timely follow-ups based on previous email interactions, optimizing communication efficiency.
googleSheets
gmail
code
+5
Free