B2B Decision Maker Email Finder and Lead Database Builder - n8n Workflow

Automate B2B lead generation using this advanced n8n workflow. Combines NocoDB, Serper.dev, AnyMailFinder, and OpenAI to find company domains and targeted decision-maker emails (CEO, Sales, Marketing).

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Sales Development Representatives (SDRs) needing targeted lead lists.

  • Marketing teams focused on B2B outreach and data enrichment.

  • Growth hackers utilizing the power of an n8n workflow for scaling operations.

  • Anyone managing lead data in NocoDB and seeking robust data verification.

Overview

This comprehensive n8n workflow template addresses the critical B2B challenge of lead data quality and domain identification. It starts by pulling raw company data from a NocoDB database. The n8n node sequence uses Serper.dev for web scraping and an OpenAI n8n node to intelligently analyze search results, guaranteeing the correct official company domain is identified.

Once the domain is confirmed, the n8n workflow executes parallel searches via AnyMailFinder to locate key decision-maker emails (CEO, Sales, Marketing). This multi-stage n8n process ensures high accuracy, prevents duplicates, and systematically updates your NocoDB tables, providing a reliable, automated pipeline for building high-quality lead lists. Every stage of this n8n workflow is designed for maximum efficiency.

How it Works

This robust n8n workflow is initiated by an n8n trigger, either manually or via a schedule.


  1. Data Retrieval & Batching: The workflow fetches batches of company records from the specified NocoDB table (Get many rows). The Loop Over Items n8n node ensures stable processing of large lists by splitting records into manageable batches.

  2. Domain Identification (Serper & OpenAI): The Filter1 n8n node skips companies already processed. The serper search domains n8n node queries Serper.dev. The results are fed to an extract url & domain OpenAI n8n node, which uses a detailed system prompt to intelligently select and extract the official company domain and URL, filtering out generic platforms. This result is immediately recorded in NocoDB via the Update Companies Domains n8n node.

  3. Parallel Email Lookup: Using the verified domain, three parallel HTTP Request n8n node steps (Get CEO Email, Get Sales Decision Maker Email, Get Marketing Email) search for relevant decision-maker emails via AnyMailFinder.

  4. Contact Creation: All found contacts are merged, filtered to remove empty email results (Filter), deduplicated (Remove Duplicates), and finally stored as new contacts in a separate NocoDB table (Create Contacts).

  5. Status Review & Bulk Search: A Code n8n node analyzes if any valid email was found for the company. If only 'risky' or no emails were located, the flow continues through the If Only Risky Emails1 filter and triggers a follow-up action (Get All Company Emails) to search for all general company emails via AnyMailFinder's bulk endpoint, ensuring maximum data retrieval. The Update Company Status n8n node logs the final outcome back to the company table.

Installation Guide

To deploy this advanced lead generation n8n workflow:


  1. Import the provided n8n workflow JSON into your n8n instance.

  2. NocoDB Credentials: Set up your NocoDB credentials. This n8n workflow requires access to two distinct tables: one for the main company list and another for the extracted contacts/leads. Configure the NocoDB API Token credential.

  3. Serper.dev Credentials: Configure the HTTP Header Authentication credentials for Serper.dev API access.

  4. AnyMailFinder Credentials: Set up the HTTP Header Authentication credentials for the AnyMailFinder service.

  5. OpenAI Credentials: Ensure your OpenAI API key is configured for the extract url & domain n8n node, as it relies on the GPT model for intelligent result parsing.

  6. Configuration: Verify the table IDs within the NocoDB n8n node settings to match your target database structure. The When clicking ‘Execute workflow’ n8n trigger allows for manual testing, but you can also configure the Schedule Trigger2 n8n trigger for recurring execution.

Node Details

When clicking ‘Execute workflow’ (n8n trigger): Initiates the flow manually for testing purposes.
Get many rows (NocoDB n8n node): Retrieves company data to be processed from your source table, often pulling all available records.
Loop Over Items (Split In Batches n8n node): Crucial for handling large datasets by processing companies in batches (size 500) to maintain stability for the downstream API calls in the overall n8n workflow.
serper search domains (HTTP Request n8n node): Performs web search queries using Serper.dev based on company name and location to find potential websites.
extract url & domain (OpenAI n8n node): This highly configured n8n node uses a detailed system prompt and the GPT-4 model to accurately analyze search snippets and determine the official company domain, ensuring high data quality.
Update Companies Domains (NocoDB n8n node): Updates the company table with the newly verified domain and url extracted by the AI, marking the record as 'domain found'.
Get CEO/Sales/Marketing Email (HTTP Request n8n node): Three separate branches utilizing the AnyMailFinder API to search for specific high-value decision-maker roles.
Create Contacts (NocoDB n8n node): Logs all validated, non-duplicate contact leads into the dedicated contacts table defined in this n8n workflow.


  • Determine Email Status by Company (Code n8n node): Custom JavaScript logic that groups results by company and determines the collective contact status (e.g., 'valid' if at least one contact is valid, or 'risky' if all contacts found were risky). This flow control logic is vital for the follow-up steps in this powerful n8n template.

Related n8n Workflows

Free

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

I'm an AI automation consultant with over a decade of experience in web development. I help businesses streamline their marketing and operations by building custom n8n workflows that save time and boost results. Ready to see what automation can do for your business? Use my link to book your initial consultation.

Featured*