Precision Prospecting Agent for LinkedIn Leads - n8n Workflow

Automate targeted B2B lead generation using an expert AI Prospector Agent. This n8n workflow uses Bright Data and OpenAI to search, scrape, and summarize LinkedIn profiles based on user queries.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Marketing and Sales teams needing automated lead lists.
Growth Hackers utilizing custom AI tools.
Users looking for advanced examples of n8n templates utilizing the LangChain agent n8n node.
Businesses requiring reliable, large-scale web scraping capabilities via Bright Data integration in an n8n workflow.

Overview

The Precision Prospecting Agent is a sophisticated n8n workflow designed to streamline B2B lead generation. Instead of manually searching Google and then visiting LinkedIn profiles, this solution leverages an expert AI Agent. The agent interprets natural language queries (like "CMO at Bright Data") and orchestrates the necessary steps: constructing a highly specific Google search query (site:linkedin.com/in...), executing the search using the Bright Data n8n node (Web Unlocker), filtering the resulting links, and finally using another Bright Data n8n node (Web Scraper) to pull structured data from the identified LinkedIn profile. This fully automated n8n workflow ensures high efficiency and accurate targeting, making it a powerful addition to any modern sales stack.

How it Works

This robust n8n workflow operates in two main phases: the AI Orchestration phase and the Sub-Workflow Execution phase.


  1. Trigger & Agent Initialization: The process starts via the When chat message received n8n trigger or manual execution. The input is passed to the AI Prospector Agent.

  2. Query Interpretation: The AI Prospector Agent (using the OpenAI Chat Model and Simple Memory for context) analyzes the user's request (e.g., searching by company/first name or company/position).

  3. Tool Selection: Based on the system prompt, the agent decides whether it needs to perform a Google search (if the input is criteria like company/position) or scrape a direct LinkedIn URI (if the user provided a link).

  4. Google Search Tool Call: If a search is needed, the agent calls the internal n8n tool Search LinkedIn URI, passing the generated, targeted Google query.

  5. Sub-Workflow Execution (Google Search): The When Executed by Another Workflow n8n trigger starts. It uses the Get 1 Google Result Bright Data n8n node (Web Unlocker) to perform the search safely and reliably.

  6. Link Extraction & Filtering: The resulting HTML is processed by the Get Links from Body n8n node, and links are extracted. The Filter only LinkedIn Profiles n8n node ensures that only legitimate https://linkedin.com/in/ URLs are retained, followed by a Limit n8n node to select the first relevant result.

  7. Data Scraping Tool Call: The found LinkedIn URI is returned to the main Agent. The Agent then calls the Get LinkedIn Profile Data n8n tool.

  8. Final Scraping: This n8n node, leveraging Bright Data's Web Scrapper, extracts structured profile information from the LinkedIn URL.

  9. Summary: The Agent summarizes the returned profile data, completing the automated prospecting cycle within the n8n workflow.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON data and paste it into your n8n instance using the "New" -> "Import from JSON" function. This establishes the full n8n workflow structure.

  2. Set up Credentials:

OpenAI: Set up or connect your OpenAI API key credential to the OpenAI Chat Model n8n node.
Bright Data: Set up or connect your Bright Data API key credential to both the Get 1 Google Result and Get LinkedIn Profile Data n8n nodes.

  1. Configure Sub-Workflow ID: The Search LinkedIn URI n8n node is configured as a workflow tool. After importing, you must update its Workflow ID parameter to match the ID of the current newly imported n8n workflow. This is crucial for the internal tool execution structure.

  2. Activation: Save the n8n workflow and activate the When chat message received n8n trigger to start utilizing your AI Prospector Agent.

Node Details

When chat message received (n8n trigger): Starts the main execution flow, receiving input messages which contain the prospecting request.
AI Prospector Agent (n8n node): The core intelligence. It uses a detailed systemMessage to guide its behavior, ensuring it correctly constructs targeted Google searches and selects the appropriate Bright Data scraping tool. It relies on the OpenAI Chat Model n8n node for processing.
OpenAI Chat Model (n8n node): The large language model (GPT-4o Mini) that powers the agent's decision-making and summarization capabilities.
Search LinkedIn URI (n8n node - Tool Workflow): An internal tool definition used by the agent to find the relevant LinkedIn URL via a sub-workflow call. Users must ensure the correct workflow ID is configured for this n8n node.
Get 1 Google Result (Bright Data n8n node): Executes the Google search query constructed by the AI Agent using Bright Data's Web Unlocker. Key configuration uses the input query: ={{ $json.query }}&num=1 to limit the results.
Get Links from Body (HTML n8n node): Parses the HTML response from the Google search result to extract all potential links (a tags).
Filter only LinkedIn Profiles (Filter n8n node): Ensures data quality by verifying that the extracted URL contains linkedin.com/ and is securely formatted (https://), refining the lead data within the n8n workflow.
Get LinkedIn Profile Data (Bright Data n8n node - Tool): Scrapes the final, validated LinkedIn URL using a dedicated Bright Data Web Scraper dataset, retrieving structured prospect details. This is a critical final step in the n8n workflow.

Related n8n Workflows

Free

Nodes: 13 Nodes
Updated: December 26 2025
View all
Created by

As a passionate developer and AI agent creator, I’ve been at the forefront of automation, pioneering workflows and training AI to handle complex tasks seamlessly. I’m an early adopter and expert of n8n, having worked with its powerful capabilities to create automation solutions for diverse industries. I founded n8nhackers, the first AI-powered agency focused on n8n, where we help businesses transform their workflows with cutting-edge automation.

Featured*