Domain and Email Contact Enrichment using Apollo API - n8n Workflow

Use this powerful n8n workflow to automate B2B lead enrichment. Extract emails and contact data from domains stored in Google Sheets using the Apollo API.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Sales Development Representatives (SDRs) seeking automated lead lists.
Growth marketers needing large-scale B2B contact data enrichment.
Data analysts looking for robust data extraction n8n templates.
Users who frequently utilize the Apollo platform for data harvesting.

Overview

This comprehensive n8n workflow solves the challenge of manually enriching large lists of domains. Leveraging the powerful Apollo API, this n8n automation takes a list of target company domains from a specified Google Sheet and returns detailed contact information, including emails, titles, and LinkedIn profiles, appending them to a designated 'Results' sheet. This particular n8n workflow demonstrates advanced external API usage combined with custom data manipulation via the Code n8n node, making it an essential n8n template for any serious lead generation operation requiring accurate and structured data output.

How it Works

The entire process is initiated by the manual n8n trigger, 'When clicking ‘Test workflow’'.


  1. Data Ingestion: The 'Pull Target Domains' Google Sheets n8n node retrieves the list of company domains marked for enrichment from the input spreadsheet.

  2. Domain Batching: The 'Loop Targets' n8n node ensures that each domain is processed sequentially to manage API rate limits and structured data flow.

  3. Initial Apollo Search: The 'Get People By Domain' HTTP Request n8n node queries the Apollo mixed_people/search endpoint using the domain name retrieved in the previous step. This requires supplying a valid Apollo API key in the headers.

  4. Data Structuring 1: The 'Clean Up Results' Code n8n node parses the often complex and nested JSON response from Apollo, extracting essential fields (names, primary emails, URLs, and company details) and preparing them for individual iteration.

  5. Contact Iteration: The 'Loop Over Results' n8n node iterates through every individual contact found for the initial domain.

  6. Detailed Contact Retrieval: The 'Get Person Info' HTTP Request n8n node performs a secondary, more focused Apollo API call (the people/match endpoint) using the contact's name and the original domain to retrieve refined or verified details. This showcases advanced data referencing between different n8n node steps.

  7. Data Structuring 2: The final 'Clean Up' Code n8n node processes this second API response, standardizing the final set of attributes like title, email, and LinkedIn URL.

  8. Output: The 'Results To Results Sheet' Google Sheets n8n node appends the final, enriched contact data (First Name, Last Name, Title, Email, LinkedIn) back into the specified 'Results' sheet within the target document. This completes the loop of the powerful n8n workflow.

Installation Guide


  1. Import: Copy the provided n8n workflow JSON and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Google Sheets Credentials: Update the 'Pull Target Domains' and 'Results To Results Sheet' n8n nodes with your Google Sheets OAuth2 credentials. Ensure the document ID and sheet names are correctly configured to point to your data source and results sheet.

  3. Apollo API Key: Open the 'Get People By Domain' and 'Get Person Info' HTTP Request n8n nodes. In the 'Header Parameters' section, replace the placeholder text 'Your API KEY' with your actual Apollo API key.

  4. Activation: Ensure the n8n workflow is set to 'Active' before testing.

  5. Execution: Execute the n8n workflow by clicking the 'Test workflow' button on the start n8n trigger node or by running a production execution.

Node Details

When clicking ‘Test workflow’ (n8n trigger): A manual trigger n8n node used for instant execution and testing of the n8n workflow logic.
Pull Target Domains (Google Sheets n8n node):
Function: Reads the input list of domains from the 'Target Domains' sheet.
Key Configuration: Operation set to Read. Filters potentially applied based on a 'Status' column (although the filter parameter is present, it is set to fetch all data based on the full JSON context).
Loop Targets (Split In Batches n8n node):
Function: Iterates over the domains retrieved from Google Sheets one by one.
Get People By Domain (HTTP Request n8n node):
Function: Primary call to Apollo's mixedpeople/search endpoint to retrieve contacts associated with the current domain.
Key Configuration: Uses an expression {{ $json['Domain To Enrich'] }} in the JSON body. Requires x-api-key header for authentication.
Clean Up Results (Code n8n node):
Function: Parses the initial comprehensive Apollo response, flattening the structure to extract core contact fields (email, name, company) into separate items for processing.
Get Person Info (HTTP Request n8n node):
Function: Performs a secondary, targeted API call using the people/match endpoint for detailed or verified information.
Key Configuration: The URL is highly dynamic, using expressions like first
name={{ $json.firstName }} and complex referencing $('Get People By Domain').item.json.breadcrumbs[0].value[0] to retrieve the original domain context.
Clean Up (Code n8n node):
Function: Final data normalization step, ensuring only required fields (email, title, organization name) are passed to the output sheet.
Results To Results Sheet (Google Sheets n8n node):
Function: Writes the final, enriched contact details into the 'Results' sheet.
* Key Configuration: Operation set to append, mapping the extracted JSON fields to specific sheet columns (Email, Title, Company, etc.).

Related n8n Workflows

Free

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

Hueston is a website design and marketing agency passionate about automation. We craft engaging digital experiences while implementing smart marketing strategies that deliver results. Our team specializes in leveraging automation tools to streamline workflows and boost efficiency for our clients. Let us help your business grow through technology-driven solutions.

Featured*