Find B2B decision maker emails & build lead database with Serper.dev & AnyMailFinder
Companies Email Finder & Lead Generation Automation
Short Description
Automatically find company domains, extract decision maker emails (CEO, Sales, Marketing), validate email quality, and build a comprehensive prospect database using AI-powered search and professional email finding APIs.
Detailed Description
This comprehensive lead generation workflow transforms a simple list of company names into a complete prospect database with verified decision maker contacts. The system automatically discovers official company websites, finds key decision makers' email addresses, validates email quality, and organizes everything in a structured database for immediate outreach.
Perfect for sales teams, marketing agencies, business developers, and anyone who needs to build high-quality prospect lists efficiently and cost-effectively.
Key Features
- Intelligent Domain Discovery: Uses Serper.dev and AI to find official company websites from search results
- Multi-Role Email Finding: Automatically extracts emails for:
- CEOs and C-level executives
- Sales decision makers
- Marketing decision makers
- Email Quality Validation: Classifies emails as "valid" or "risky" for better deliverability
- Smart Fallback System: Searches for additional company emails when decision makers aren't found
- Duplicate Prevention: Removes duplicate contacts automatically
- Batch Processing: Handles large company lists efficiently with intelligent batching
- Database Integration: Stores all data in NocoDB with proper organization and status tracking
- Rate Limiting: Includes delays and error handling to respect API limits
Who This Workflow Is For
- Sales Teams: Building targeted prospect lists for outbound campaigns
- Marketing Agencies: Creating lead databases for client campaigns
- Business Development: Finding decision makers for partnership opportunities
- Recruiters: Locating hiring managers and HR contacts
- Entrepreneurs: Building contact lists for product launches or fundraising
- Lead Generation Services: Automating prospect research for clients
Problems This Workflow Solves
- Manual Research Time: Eliminates hours of manual company and contact research
- Incomplete Contact Data: Ensures you have decision makers, not just generic emails
- Email Deliverability Issues: Validates email quality before outreach campaigns
- Data Organization: Maintains clean, structured prospect databases
- Scaling Bottlenecks: Processes hundreds of companies automatically
- High Lead Generation Costs: Reduces dependency on expensive lead generation services
Setup Requirements
Required API Credentials
- Serper.dev API Key: For company domain search and discovery
- OpenAI API Key: For intelligent domain extraction from search results
- AnyMailFinder API Key: For decision maker email discovery and validation
- NocoDB API Token: For database storage and management
Database Structure
Companies Table:
Id(Number): Unique company identifiercompany_name(Text): Company name to searchlocation(Text): Company location for better search resultsurl(URL): Discovered company websitedomain(Text): Extracted domain namestatus(Select): Processing status trackingemails(Text): All discovered company emailscompany_emails_status(Text): Email validation status
Contacts Table:
companies_id(Number): Link to parent companyname(Text): Contact full nameposition(Text): Job title/roleemail(Email): Contact email addressemail_status(Text): Email validation statuslinkedin_url(URL): LinkedIn profile (when available)
System Requirements
- Active n8n instance (self-hosted or cloud)
- NocoDB database instance
- Active API subscriptions for Serper.dev, OpenAI, and AnyMailFinder
How It Works
Phase 1: Domain Discovery
- Company Processing: Retrieves companies from database in batches
- Domain Search: Uses Serper.dev to search for official company websites
- AI Domain Extraction: OpenAI analyzes search results to identify official domains
- Database Updates: Stores discovered domains and URLs
Phase 2: Decision Maker Discovery
- Multi-Role Search: Finds emails for CEO, Sales, and Marketing decision makers using AnyMailFinder
- Email Validation: Validates email deliverability and flags risky addresses
- Contact Creation: Stores validated contacts with full details
- Status Tracking: Updates company status based on email discovery success
Phase 3: Company Email Backup
- Gap Analysis: Identifies companies with no valid decision maker emails
- Bulk Email Search: Finds up to 20 additional company emails using AnyMailFinder
- Final Updates: Stores all discovered emails for comprehensive coverage
Customization Options
Search Parameters
- Modify search queries for better domain discovery using Serper.dev
- Adjust location-based search parameters
- Customize AI prompts for domain extraction
Decision Maker Roles
- Add new decision maker categories (HR, Finance, Operations, etc.)
- Modify existing role search parameters in AnyMailFinder
- Customize email validation criteria
Data Processing
- Adjust batch sizes for different processing speeds
- Modify rate limiting delays
- Customize error handling and retry logic
Database Schema
- Add custom fields for industry, company size, etc.
- Integrate with different database systems
- Customize data validation rules
API Costs and Credits
- AnyMailFinder: 2 credits per valid email found, 1 credit per bulk company search
- Serper.dev: ~$1 per 1000 searches
- OpenAI: Minimal costs for domain extraction prompts
- Estimated Cost: about $0.03 per company processed (depending on email discovery success)
Benefits
- Save 20+ Hours Weekly: Automate prospect research that takes hours manually
- Higher Quality Leads: Get decision makers, not generic contact@ emails
- Better Deliverability: Email validation reduces bounce rates
- Scalable Process: Handle thousands of companies automatically
- Cost Effective: Much cheaper than traditional lead generation services
- Complete Database: Build comprehensive prospect databases with all contact details
Use Cases
- Outbound Sales Campaigns: Build targeted prospect lists for cold outreach
- Partnership Development: Find decision makers at potential partner companies
- Market Research: Understand company structures and contact hierarchies
- Recruitment: Locate hiring managers and HR contacts
- Investor Relations: Find contacts at potential investor companies
- Vendor Outreach: Identify procurement and operations contacts
Installation Instructions
- Import the workflow JSON into your n8n instance
- Set up NocoDB database with required table structures
- Configure all API credentials in the credential manager (including Serper.dev and AnyMailFinder)
- Update NocoDB connection settings with your database details
- Test with a small batch of companies before full deployment
- Monitor API usage and adjust batch sizes as needed
Best Practices
- Start with high-quality company names and locations
- Monitor AnyMailFinder credit usage to manage costs
- Use Serper.dev efficiently with targeted search queries
- Regularly clean and validate your prospect database
- Respect email deliverability best practices
- Follow GDPR and data privacy regulations
- Use rate limiting to avoid API restrictions
Error Handling
- Built-in retry mechanisms for API failures
- Continues processing even if individual companies fail
- Create an Error Workflow
n8n Workflow: Find B2B Decision Maker Emails & Build Lead Database
This n8n workflow automates the process of finding B2B decision-maker emails and building a lead database. It leverages external services to search for company information, identify potential decision-makers, and then find their professional email addresses, ultimately storing the enriched data in a NocoDB database.
What it does
This workflow performs the following steps:
- Triggers Manually or on Schedule: The workflow can be initiated manually or set to run on a predefined schedule.
- Loads Companies from NocoDB: It fetches a list of companies from a specified NocoDB table.
- Splits into Batches: The retrieved company data is split into batches to manage API request limits and processing efficiency.
- Enriches Company Data (Serper.dev): For each company, it uses an HTTP Request node (likely configured for Serper.dev or a similar search API) to find relevant company information, such as their website.
- Extracts Domain: A Code node processes the search results to extract the company's website domain.
- Finds Decision Makers (Serper.dev): It makes another HTTP Request (likely to Serper.dev) to search for "decision makers" or "key personnel" within the company's domain.
- Extracts Potential Names: A Code node parses these search results to identify potential names of decision-makers.
- Removes Duplicates: It deduplicates the identified names to ensure unique entries.
- Filters Valid Names: An If node checks if valid names were found for a company.
- Finds Emails (Anymailfinder.com):
- If names are found: For each identified decision-maker, it uses another HTTP Request (likely configured for Anymailfinder.com or a similar email finder service) to find their professional email address using their name and the company domain.
- If no names are found: It attempts to find generic emails for the company domain using an HTTP Request (likely configured for Anymailfinder.com).
- Processes Email Finder Results: A Code node processes the results from the email finder service to extract valid email addresses.
- Filters Valid Emails: An If node checks if any valid emails were found.
- Generates OpenAI Prompt: If emails are found, an OpenAI node is used to generate a prompt or further process the lead data (e.g., categorize the decision maker, suggest outreach messages).
- Prepares Data for NocoDB: An "Edit Fields (Set)" node structures the collected data (company, decision-maker name, email, etc.) into a format suitable for NocoDB.
- Merges Data: The data from both branches (with and without specific decision-maker names) is merged.
- Updates NocoDB: The enriched lead data, including decision-maker names and emails, is then written back to the NocoDB database.
- Adds Delay: A "Wait" node introduces a delay between batches to respect API rate limits.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance.
- NocoDB Account/Instance: Access to a NocoDB instance with a table structured to store company and lead information.
- Serper.dev API Key: An API key for Serper.dev (or a similar search engine API) to find company websites and decision-maker names.
- Anymailfinder.com API Key: An API key for Anymailfinder.com (or a similar email verification/finder service) to discover email addresses.
- OpenAI API Key: An API key for OpenAI to leverage AI capabilities for lead enrichment or categorization.
- Credentials: Appropriate n8n credentials configured for NocoDB, Serper.dev, Anymailfinder.com, and OpenAI.
Setup/Usage
- Import the workflow: Download the JSON provided and import it into your n8n instance.
- Configure Credentials:
- Set up your NocoDB credential with the necessary API token and base URL.
- Configure HTTP Request nodes (19, 56, 68) with your Serper.dev and Anymailfinder.com API keys. These are likely passed in headers or query parameters.
- Set up your OpenAI credential with your API key.
- Update NocoDB Node: In the "NocoDB" node (510), select your NocoDB credential, specify the correct base and table where your company data is stored and where the enriched data should be written. Ensure the fields match your NocoDB table structure.
- Review Code Nodes: Inspect the "Code" nodes (38, 57, 69) to understand how data is being parsed and transformed. Adjust if your API responses differ or if you need different data extraction logic.
- Adjust API Calls: Review the HTTP Request nodes (19, 56, 68) to ensure the URLs, headers, and body parameters are correctly configured for your chosen API services (Serper.dev, Anymailfinder.com).
- Configure OpenAI Node: Adjust the prompt or model in the "OpenAI" node (1250) based on your specific lead enrichment needs.
- Set Batch Size and Delay: Adjust the "Loop Over Items (Split in Batches)" node (39) and the "Wait" node (514) to optimize for API rate limits and workflow performance.
- Activate the workflow: Once configured, activate the workflow. You can then trigger it manually using the "Manual Trigger" node (838) or enable the "Schedule Trigger" node (839) for automated runs.
Related Templates
Auto-create TikTok videos with VEED.io AI avatars, ElevenLabs & GPT-4
π₯ Viral TikTok Video Machine: Auto-Create Videos with Your AI Avatar --- π― Who is this for? This workflow is for content creators, marketers, and agencies who want to use Veed.ioβs AI avatar technology to produce short, engaging TikTok videos automatically. Itβs ideal for creators who want to appear on camera without recording themselves, and for teams managing multiple brands who need to generate videos at scale. --- βοΈ What problem this workflow solves Manually creating videos for TikTok can take hours β finding trends, writing scripts, recording, and editing. By combining Veed.io, ElevenLabs, and GPT-4, this workflow transforms a simple Telegram input into a ready-to-post TikTok video featuring your AI avatar powered by Veed.io β speaking naturally with your cloned voice. --- π What this workflow does This automation links Veed.ioβs video-generation API with multiple AI tools: Analyzes TikTok trends via Perplexity AI Writes a 10-second viral script using GPT-4 Generates your voiceover via ElevenLabs Uses Veed.io (Fabric 1.0 via FAL.ai) to animate your avatar and sync the lips to the voice Creates an engaging caption + hashtags for TikTok virality Publishes the video automatically via Blotato TikTok API Logs all results to Google Sheets for tracking --- π§© Setup Telegram Bot Create your bot via @BotFather Configure it as the trigger for sending your photo and theme Connect Veed.io Create an account on Veed.io Get your FAL.ai API key (Veed Fabric 1.0 model) Use HTTPS image/audio URLs compatible with Veed Fabric Other APIs Add Perplexity, ElevenLabs, and Blotato TikTok keys Connect your Google Sheet for logging results --- π οΈ How to customize this workflow Change your Avatar: Upload a new image through Telegram, and Veed.io will generate a new talking version automatically. Modify the Script Style: Adjust the GPT prompt for tone (educational, funny, storytelling). Adjust Voice Tone: Tweak ElevenLabs stability and similarity settings. Expand Platforms: Add Instagram, YouTube Shorts, or X (Twitter) posting nodes. Track Performance: Customize your Google Sheet to measure your most successful Veed.io-based videos. --- π§ Expected Outcome In just a few seconds after sending your photo and theme, this workflow β powered by Veed.io β creates a fully automated TikTok video featuring your AI avatar with natural lip-sync and voice. The result is a continuous stream of viral short videos, made without cameras, editing, or effort. --- β Import the JSON file in n8n, add your API keys (including Veed.io via FAL.ai), and start generating viral TikTok videos starring your AI avatar today! π₯ Watch This Tutorial --- π Documentation: Notion Guide Need help customizing? Contact me for consulting and support : Linkedin / Youtube
Two-way property repair management system with Google Sheets & Drive
This workflow automates the repair request process between tenants and building managers, keeping all updates organized in a single spreadsheet. It is composed of two coordinated workflows, as two separate triggers are required β one for new repair submissions and another for repair updates. A Unique Unit ID that corresponds to individual units is attributed to each request, and timestamps are used to coordinate repair updates with specific requests. General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trigger workflow design in n8n. --- βοΈ How It Works Workflow 1 β New Repair Requests Behind the Scenes: A tenant fills out a Google Form (βRepair Request Formβ), which automatically adds a new row to a linked Google Sheet. Steps: Trigger: Google Sheets rowAdded β runs when a new form entry appears. Extract & Format: Collects all relevant form data (address, unit, urgency, contacts). Generate Unit ID: Creates a standardized identifier (e.g., BUILDING-UNIT) for tracking. Email Notification: Sends the building manager a formatted email summarizing the repair details and including a link to a Repair Update Form (which activates Workflow 2). --- Workflow 2 β Repair Updates Behind the Scenes:\ Triggered when the building manager submits a follow-up form (βRepair Update Formβ). Steps: Lookup by UUID: Uses the Unit ID from Workflow 1 to find the existing row in the Google Sheet. Conditional Logic: If photos are uploaded: Saves each image to a Google Drive folder, renames files consistently, and adds URLs to the sheet. If no photos: Skips the upload step and processes textual updates only. Merge & Update: Combines new data with existing repair info in the same spreadsheet row β enabling a full repair history in one place. --- π§© Requirements Google Account (for Forms, Sheets, and Drive) Gmail/email node connected for sending notifications n8n credentials configured for Google API access --- β‘ Setup Instructions (see more detail in workflow) Import both workflows into n8n, then copy one into a second workflow. Change manual trigger in workflow 2 to a n8n Form node. Connect Google credentials to all nodes. Update spreadsheet and folder IDs in the corresponding nodes. Customize email text, sender name, and form links for your organization. Test each workflow with a sample repair request and a repair update submission. --- π οΈ Customization Ideas Add Slack or Telegram notifications for urgent repairs. Auto-create folders per building or unit for photo uploads. Generate monthly repair summaries using Google Sheets triggers. Add an AI node to create summaries/extract relevant repair data from repair request that include long submissions.
Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation
PDF Invoice Extractor (AI) End-to-end pipeline: Watch Drive β Download PDF β OCR text β AI normalize to JSON β Upsert Buyer (Account) β Create Opportunity β Map Products β Create OLI via Composite API β Archive to OneDrive. --- Node by node (what it does & key setup) 1) Google Drive Trigger Purpose: Fire when a new file appears in a specific Google Drive folder. Key settings: Event: fileCreated Folder ID: google drive folder id Polling: everyMinute Creds: googleDriveOAuth2Api Output: Metadata { id, name, ... } for the new file. --- 2) Download File From Google Purpose: Get the file binary for processing and archiving. Key settings: Operation: download File ID: ={{ $json.id }} Creds: googleDriveOAuth2Api Output: Binary (default key: data) and original metadata. --- 3) Extract from File Purpose: Extract text from PDF (OCR as needed) for AI parsing. Key settings: Operation: pdf OCR: enable for scanned PDFs (in options) Output: JSON with OCR text at {{ $json.text }}. --- 4) Message a model (AI JSON Extractor) Purpose: Convert OCR text into strict normalized JSON array (invoice schema). Key settings: Node: @n8n/n8n-nodes-langchain.openAi Model: gpt-4.1 (or gpt-4.1-mini) Message role: system (the strict prompt; references {{ $json.text }}) jsonOutput: true Creds: openAiApi Output (per item): $.message.content β the parsed JSON (ensure itβs an array). --- 5) Create or update an account (Salesforce) Purpose: Upsert Buyer as Account using an external ID. Key settings: Resource: account Operation: upsert External Id Field: taxid_c External Id Value: ={{ $json.message.content.buyer.tax_id }} Name: ={{ $json.message.content.buyer.name }} Creds: salesforceOAuth2Api Output: Account record (captures Id) for downstream Opportunity. --- 6) Create an opportunity (Salesforce) Purpose: Create Opportunity linked to the Buyer (Account). Key settings: Resource: opportunity Name: ={{ $('Message a model').item.json.message.content.invoice.code }} Close Date: ={{ $('Message a model').item.json.message.content.invoice.issue_date }} Stage: Closed Won Amount: ={{ $('Message a model').item.json.message.content.summary.grand_total }} AccountId: ={{ $json.id }} (from Upsert Account output) Creds: salesforceOAuth2Api Output: Opportunity Id for OLI creation. --- 7) Build SOQL (Code / JS) Purpose: Collect unique product codes from AI JSON and build a SOQL query for PricebookEntry by Pricebook2Id. Key settings: pricebook2Id (hardcoded in script): e.g., 01sxxxxxxxxxxxxxxx Source lines: $('Message a model').first().json.message.content.products Output: { soql, codes } --- 8) Query PricebookEntries (Salesforce) Purpose: Fetch PricebookEntry.Id for each Product2.ProductCode. Key settings: Resource: search Query: ={{ $json.soql }} Creds: salesforceOAuth2Api Output: Items with Id, Product2.ProductCode (used for mapping). --- 9) Code in JavaScript (Build OLI payloads) Purpose: Join lines with PBE results and Opportunity Id β build OpportunityLineItem payloads. Inputs: OpportunityId: ={{ $('Create an opportunity').first().json.id }} Lines: ={{ $('Message a model').first().json.message.content.products }} PBE rows: from previous node items Output: { body: { allOrNone:false, records:[{ OpportunityLineItem... }] } } Notes: Converts discount_total β per-unit if needed (currently commented for standard pricing). Throws on missing PBE mapping or empty lines. --- 10) Create Opportunity Line Items (HTTP Request) Purpose: Bulk create OLIs via Salesforce Composite API. Key settings: Method: POST URL: https://<your-instance>.my.salesforce.com/services/data/v65.0/composite/sobjects Auth: salesforceOAuth2Api (predefined credential) Body (JSON): ={{ $json.body }} Output: Composite API results (per-record statuses). --- 11) Update File to One Drive Purpose: Archive the original PDF in OneDrive. Key settings: Operation: upload File Name: ={{ $json.name }} Parent Folder ID: onedrive folder id Binary Data: true (from the Download node) Creds: microsoftOneDriveOAuth2Api Output: Uploaded file metadata. --- Data flow (wiring) Google Drive Trigger β Download File From Google Download File From Google β Extract from File β Update File to One Drive Extract from File β Message a model Message a model β Create or update an account Create or update an account β Create an opportunity Create an opportunity β Build SOQL Build SOQL β Query PricebookEntries Query PricebookEntries β Code in JavaScript Code in JavaScript β Create Opportunity Line Items --- Quick setup checklist π Credentials: Connect Google Drive, OneDrive, Salesforce, OpenAI. π IDs: Drive Folder ID (watch) OneDrive Parent Folder ID (archive) Salesforce Pricebook2Id (in the JS SOQL builder) π§ AI Prompt: Use the strict system prompt; jsonOutput = true. π§Ύ Field mappings: Buyer tax id/name β Account upsert fields Invoice code/date/amount β Opportunity fields Product name must equal your Product2.ProductCode in SF. β Test: Drop a sample PDF β verify: AI returns array JSON only Account/Opportunity created OLI records created PDF archived to OneDrive --- Notes & best practices If PDFs are scans, enable OCR in Extract from File. If AI returns non-JSON, keep βReturn only a JSON arrayβ as the last line of the prompt and keep jsonOutput enabled. Consider adding validation on parsing.warnings to gate Salesforce writes. For discounts/taxes in OLI: Standard OLI fields donβt support per-line discount amounts directly; model them in UnitPrice or custom fields. Replace the Composite API URL with your orgβs domain or use the Salesforce nodeβs Bulk Upsert for simplicity.