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
Automate LinkedIn leads with n8n and OpenAI

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

Learn how to Build this Workflow with AI:

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.

Automate LinkedIn leads with n8n and OpenAI

Visit through Desktop to Interact with the Workflow.

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 Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.