AI-Powered B2B Prospect Qualification and Scoring using Web RAG - n8n Workflow

Use this advanced n8n workflow to automatically qualify B2B prospects, extract key insights using Web RAG, and score them using GPT-4. Perfect for sales automation n8n templates.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales Operations Managers: Seeking to qualify inbound leads instantly without manual research. Marketing Technologists: Building complex automation flows that require rich data augmentation. n8n Automation Specialists: Looking for robust n8n templates integrating external data services (ProspectPro, Bedrijfsdata RAG) with AI models. Data Engineers: Needing to classify and enrich prospect records based on real-time website and search engine content.

Overview

Manual prospect qualification is slow, error-prone, and doesn't scale. This specialized n8n workflow solves this by providing a robust, AI-driven pipeline that ingests a prospect's domain and retrieves comprehensive information from their website and search engine results using RAG capabilities. This rich, structured data is then fed into an advanced language model (GPT-4) which performs a complex classification (e.g., determining if the company is B2B, SaaS, or CRM-focused) based on custom business logic defined in the n8n node settings. The final step updates the prospect record with qualification labels and segmented tags, ensuring your CRM data is clean and actionable. This complex n8n template streamlines the entire sales qualification process, freeing up sales agents for closing deals.

How it Works

This high-level n8n workflow is designed to run either on a scheduled n8n trigger (like the ProspectPro Trigger Example polling for new prospects) or as a sub-workflow executed by another process (using the When Executed by Another Workflow starting n8n node).


  1. Trigger & Pre-Check: The process starts by retrieving the full prospect details. A critical step is the Not Processed Before? check, which prevents reprocessing records already tagged 'AutoQualified' or 'ManualQualification'. If the prospect is new, the workflow checks if a domain is available.

  2. RAG Data Gathering: If a domain exists, the flow utilizes dedicated n8n node configurations (Get RAG domain and Get RAG search) to extract key website content (About Us summaries, metadata) and relevant search engine snippets.

  3. Data Preparation: The Process live web content n8n node consolidates the prospect's basic information (name, location, industry) with the retrieved RAG content, ensuring the payload sent to the AI is complete and properly formatted.

  4. Content Validation: The Content available to proceed? check verifies that sufficient RAG data was successfully retrieved before proceeding to the expensive AI step. If content is missing, the prospect is routed for manual review.

  5. AI Classification: The consolidated data is fed into the Basic LLM Chain, which uses the OpenAI Chat Model and a Structured Output Parser. This ensures the LLM output strictly adheres to a predefined JSON schema, classifying the prospect based on criteria like isb2b, issaas, and iscrmexpert.

  6. Scoring & Segmentation: The Qualify & Tag Prospect n8n node applies the core business logic. Based on the LLM's classification, it assigns a qualification label (1 for qualified, 0 for disqualified) and adds segmentation tags (e.g., 'Potential API', 'Potential ProspectPro'). It also applies the 'AutoQualified' tag.

  7. Final Update: The Update Prospect in ProspectPro n8n node commits the new label and tags to the ProspectPro database.

  8. Output: The n8n workflow concludes by returning a boolean result to the calling workflow, indicating if the prospect was qualified.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' menu, using the 'New' button, and selecting 'Import from JSON'.

  2. Credential Setup: This n8n workflow requires credentials for external services. Set up the following connections:

OpenAI: Configure credentials for the OpenAI Chat Model n8n node, ensuring you have access to a relevant GPT model (like gpt-4.1-mini).
Bedrijfsdata Developers account (main): Needed for the RAG n8n node operations (Get RAG domain and Get RAG search).
* ProspectPro API: Needed for the initial data retrieval and the final Update Prospect in ProspectPro n8n node.

  1. Customize Business Logic: Review the Qualify & Tag Prospect n8n node (Code node) and the Structured Output Parser schema. Modify the B2B qualification and segmentation logic to match your Ideal Customer Profile (ICP).

  2. Activate: Save the n8n workflow and activate the desired n8n trigger (or ensure it is callable by a parent workflow).

Node Details

The core intelligence of this n8n template relies on a combination of custom data nodes and specialized AI n8n node types.

When Executed by Another Workflow (n8n trigger): The primary execution method, accepting a prospect id as input.
Get Prospect (ProspectPro n8n node): Retrieves the full dataset for the prospect ID passed to the n8n workflow.
Get RAG domain / Get RAG search (Bedrijfsdata n8n node): Specialized external data nodes that perform real-time web content retrieval and search engine scraping (RAG) based on the prospect's domain.
Process live web content (Code n8n node): Cleans, structures, and aggregates data from the ProspectPro data and RAG results, creating a clean prompt input for the LLM.
Content available to proceed? (If n8n node): Essential flow control. Ensures the downstream AI process only runs if sufficient website or search engine content was successfully gathered.
Basic LLM Chain (LangChain n8n node): Orchestrates the AI process. It injects the collected data and system instructions (including the requirement to output in Dutch) to the chosen model.
Structured Output Parser (LangChain n8n node): Enforces a strict JSON output schema, ensuring the LLM returns reliable boolean flags (e.g., isb2b, issaas) required for the subsequent scoring logic in the n8n workflow.
Qualify & Tag Prospect (Code n8n node): The core logic execution n8n node, translating the AI's classification into actionable labels and segmentation tags based on pre-defined criteria, such as competitor analysis or SaaS status.


  • Update Prospect in ProspectPro (ProspectPro n8n node): The final action that persists the qualification label and tags back into the target database.

Related n8n Workflows

Free

Nodes: 10 Nodes
Updated: December 26 2025
View all
Created by
Olivier
Olivier

Featured*