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
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.

Learn how to Build this Workflow with AI:

Visit through Desktop for Best experience

What This Workflow Does

This workflow finds and scores LinkedIn leads automatically. It changes a customer profile description into LinkedIn search filters. Then it searches LinkedIn for matching companies and people. The results go into Google Sheets. It reads company websites and LinkedIn posts to learn more. It scores leads by how well they fit. Finally, it sends connection requests and messages on LinkedIn to top leads.

This process lets sales workers save many hours of manual work. It helps them focus on the best leads and talk to them more often.


Who Should Use This Workflow

This workflow fits sales managers or marketers using LinkedIn to find new clients. It works best when searching for specific types of companies and job titles. It helps anyone tired of doing slow manual lead research. It works well for those using Google Sheets to manage leads and using OpenAI for text summaries.


Tools and Services Used

  • n8n: Automates the whole process and runs the workflow.
  • HDW LinkedIn API: Searches LinkedIn and manages connections.
  • OpenAI API: Summarizes text and scores leads using AI models.
  • Google Sheets: Saves and updates lead data in spreadsheets.
  • HDW Web Parsing Tools: Scrapes company website content and sitemaps.

Optional: Use self-host n8n for full control on your own server.


How the Workflow Works: Inputs, Steps, and Outputs

Inputs

Processing Steps

  • Convert ICP to Search Filters: An AI agent transforms the ICP description into structured LinkedIn Sales Navigator filters as JSON.
  • Search LinkedIn: The HDW LinkedIn API node runs searches with filters to find matching leads and companies.
  • Save Leads: Linked lead details like names, titles, companies, and locations save in Google Sheets for tracking.
  • Find Company Websites: For leads missing websites, the workflow uses a Google search via HDW API to add company URLs.
  • Scrape Website Content: It downloads sitemap pages and extracts site text, then uses OpenAI to summarize company info and key products.
  • Analyze LinkedIn Posts: Retrieves and summarizes posts from leads and their companies to read intent signals.
  • Fetch Company News: Uses Google search to find news articles about the company and summarizes them.
  • Score Leads: An AI model rates each lead from 1 to 10 based on collected text summaries and details.
  • Manage Connections: Retrieves current connections to avoid duplicate requests and updates their status.
  • Send LinkedIn Requests and Messages: Sends connection invites and follow-up messages to leads with high scores, pacing actions to avoid limits.

Outputs

  • Google Sheet filled with enriched and scored lead data.
  • Connection requests and messages sent to top leads on LinkedIn.
  • Summary info for each lead and company aiding sales outreach decisions.


Beginner Step-by-Step: How to Use This Workflow in n8n

Step 1: Import the Workflow

  1. Download the workflow file using the Download button on this page.
  2. Go inside the n8n editor where you want to use the workflow.
  3. Click on “Import from File” and select the downloaded workflow.

Step 2: Configure API Credentials and Settings

  1. Add your HDW LinkedIn API credentials in the n8n credentials manager.
  2. Add your OpenAI API key for text summarization and scoring.
  3. Set up Google Sheets OAuth2 credentials to allow writing lead data.
  4. Check sheet names and columns in Google Sheets nodes to match your spreadsheet.
  5. Update any specific IDs, emails, or table names inside nodes if needed.

Step 3: Test the Workflow

  1. Run the workflow manually using a small ICP text to test lead retrieval and saving.
  2. Look for errors in the execution logs and fix any issues with credentials or sheet access.

Step 4: Activate for Production

  1. Enable the workflow trigger to run automatically on schedule or use a manual start.
  2. Adjust batch sizes and wait times if you need slower or faster pacing for LinkedIn API.
  3. Monitor the workflow’s runs regularly to check for API limits or failures.

Customization Ideas

  • Edit the ICP to LinkedIn filters converter node’s prompt to focus on different industries or roles.
  • Change the AI lead scoring prompt to include special keywords or pain points relevant to your sales.
  • Personalize LinkedIn outreach messages by editing the text in the send message node.
  • Adjust limit nodes to control how many connection requests go out per day or week.
  • Add more columns in Google Sheets to store extra fields from the HDW API responses.
  • Use self-host n8n if needing more privacy or control over workflow execution.


Common Problems and Fixes

Problem: Too Many API Errors or Timeouts

Cause: Making too many calls at once or network issues.

Fix: Use retry options on API nodes, reduce batch sizes, and add wait steps between requests.

Problem: Google Sheets Not Updating or Overwriting Incorrectly

Cause: Wrong column mapping or missing unique IDs like URN.

Fix: Check Google Sheets column names and ensure URN is unique and matched in node settings.

Problem: AI Text Summaries Are Wrong or Cut Off

Cause: Text input too large or badly formatted JSON.

Fix: Split long texts before summarizing and verify JSON input structure for AI nodes.


Summary of Results

✓ Automatically turns customer profiles into LinkedIn searches.

✓ Saves leads with deep info in Google Sheets.

✓ Uses AI to summarize company sites and posts.

✓ Scores leads so users can focus on best contacts.

✓ Sends controlled LinkedIn connection requests and messages.

→ Saves hundreds of work hours.

→ Improves sales chances with better lead research and follow-up.

Frequently Asked Questions

The workflow depends on HDW LinkedIn API for leads. To use other networks, user must replace or add similar API nodes for those platforms.
OpenAI usage depends on how much text is summarized and how often the workflow runs. Users should limit batch sizes or cache results to reduce costs.
Check Google Sheets column mappings. Make sure a unique identifier like URN is mapped correctly and the sheet structure matches the node configuration.
Data only moves between trusted APIs and Google Sheets. Users must keep their API Keys private and restrict workflow access.

Promoted by BULDRR AI

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 Workflows in n8n

A complete beginner guide to building an AI 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