Integrations

How to Verify, Enrich, and Run Campaigns Using MillionVerifier, Apollo.io, and Instantly.ai in N8N

Learn how you can verify emails in your N8N workflow with MillionVerifier Apollo.io, and Instantly.ai

Bernadett Schin image Written by Bernadett Schin
Back to articles Bernadett Schin image Written by Bernadett Schin

Summary

In this article, you can read about all the steps on how to create an n8n workflow that receives lead data automatically from an Apollo.io workflow, verifies the email address, enriches the lead profile, and pushes qualified leads into an Instantly.ai campaign.


Here you may find the JSON file including this workflow describe above. To get started download and copy paste it to your N8N canvas.


https://help.millionverifier.com/integrations/verify-emails-in-your-n8n-workflow-with-millionverifier-apollo-io-and-instantly-ai-json


For a step by step video guidance please visit the following page:




What you need to start

To build this workflow, you will need active accounts and API access to the following services:

  • n8n (Cloud or self-hosted)

  • MillionVerifier (for email verification)

  • Apollo.io (for workflow triggers and data enrichment)

  • Instantly.ai (for email outreach)


1. Set up the n8n Webhook Trigger

The workflow begins by listening for an incoming webhook from Apollo.

  1. In n8n, add a Webhook node to your canvas.

  2. Set the HTTP Method to POST.

  3. Copy the Production URL. (You must use the Production URL, not the Test URL, for Apollo to send data reliably in an active workflow).

  4. Publish your n8n workflow to activate the production webhook.


2. Configure the Apollo.io Workflow

Next, configure Apollo to send a webhook to n8n whenever a specific event occurs (e.g., a contact is added to a list).

  1. Create a List in Apollo: Go to Search > People, select some contacts, and add them to a new list (e.g., "n8n Export").

  2. Create an Apollo Workflow: Go to Workflows in Apollo and click Create workflow > Start from scratch.

  3. Set the Trigger:

    • Select Based on a trigger event.

    • Event: Contact added to list.

    • Contact lists: Select the list you created in step 1.

    • (Optional) Add filters, such as Email Status = Verified.

  4. Add the Webhook Action:

    • Add a new step to the workflow and select Send webhook.

    • Method: POST.

    • Webhook URL: Paste the n8n Production Webhook URL you copied in Step 1.

    • Body: Construct the JSON payload to send the necessary contact data to n8n. Use Apollo's dynamic variables:

{
  "first_name": "{{contact.first_name}}",
  "last_name": "{{contact.last_name}}",
  "email": "{{contact.email}}",
  "email_status": "{{contact.email_status}}"
}
  1. Click Launch workflow in Apollo.


3. Test and Capture Webhook Data

Before proceeding in n8n, you need to capture sample data to map fields in subsequent nodes.

  1. In Apollo, manually add a test contact to the list associated with your workflow to trigger the webhook.

  2. In n8n, go to the Executions tab. You should see a successful execution triggered by the webhook.

  3. Open the execution, hover over the Webhook node, and click Copy to editor.

  4. Back in your workflow editor canvas, right-click the Webhook node and select Pin. This saves the test data for mapping.


4. Verify Email Address with MillionVerifier

  1. Add an HTTP Request node connected to the Webhook node.

  2. Set the Method to GET.

  3. Set the URL to: https://api.millionverifier.com/api/v3

  4. Configure Authentication:

    • Authentication Type: Generic Credential Type

    • Generic Auth Type: Query Auth

    • Create or select your MillionVerifier API credential (Name: api, Value: your API key).

  5. Under Send Query Parameters, add a parameter:

    • Name: email

    • Value: Map this to the email output from your Webhook node ({{ $json.body.email }}).

  6. Execute the step and pin the node.


5. Filter for Good Emails

  1. Add an If node.

  2. Add a Condition:

    • Value 1: Map the quality result from the MillionVerifier node ({{ $json.quality }}).

    • Operator: Is equal to

    • Value 2: Type the string good.

  3. Continue building on the True branch.


6. Enrich Lead Data with Apollo

Use Apollo's API to fetch more details about the valid leads.

  1. Add an HTTP Request node to the "True" output of the If node.

  2. Set the Method to GET.

  3. Set the URL to: https://api.apollo.io/api/v1/people/match

  4. Configure Authentication:

    • Authentication Type: Generic Credential Type

    • Generic Auth Type: Header Auth

    • Create or select your Apollo API credential (Name: X-Api-Key, Value: your API key). Ensure the key has people/match permissions.

  5. Under Send Query Parameters, add parameters mapped from your initial Webhook node:

    • first_name: Map to $('Webhook').json.body.first_name

    • last_name: Map to $('Webhook').json.body.last_name

    • email: Map to $('Webhook').json.body.email

  6. Execute the step to retrieve the enriched JSON payload. Pin the node.


7. Add Lead to Campaign in Instantly

  1. Add a final HTTP Request node.

  2. Set the Method to POST.

  3. Set the URL to: https://api.instantly.ai/api/v2/leads

  4. Configure Authentication:

    • Authentication Type: Generic Credential Type

    • Generic Auth Type: Bearer Auth

    • Create or select your Instantly API credential containing your API token.

  5. Set Send Body to enabled.

  6. Set Body Content Type to JSON.

  7. Select Specify Body: Using JSON. Construct your payload by mapping the basic info from the Webhook node and the enriched info from the Apollo node.

JSON Body Example:Note: Replace the static campaign ID with your specific Instantly campaign ID.

{
  "campaign": "YOUR-INSTANTLY-CAMPAIGN-ID",
  "email": "{{ $('Webhook').json.body.email }}",
  "first_name": "{{ $('Webhook').json.body.first_name }}",
  "last_name": "{{ $('Webhook').json.body.last_name }}",
  "company_name": "{{ $('Enrich Lead - Apollo').json.person.organization.name }}",
  "job_title": "{{ $('Enrich Lead - Apollo').json.person.title }}",
  "website": "{{ $('Enrich Lead - Apollo').json.person.organization.primary_domain }}",
  "skip_if_in_workspace": true,
  "skip_if_in_campaign": true,
  "custom_variables": {
    "apollo_id": "{{ $('Enrich Lead - Apollo').json.person.id }}",
    "industry": "{{ $('Enrich Lead - Apollo').json.person.organization.industry }}",
    "employee_count": "{{ $('Enrich Lead - Apollo').json.person.organization.estimated_num_employees }}",
    "linkedin_url": "{{ $('Enrich Lead - Apollo').json.person.linkedin_url }}"
  }
}
  1. Execute the node to test the connection.

  2. Once testing is successful, unpin all nodes and ensure your n8n workflow is Active.

Going forward, anytime a contact is added to the specified list in Apollo, it will trigger this workflow, verify the email, enrich the data, and push the lead into your Instantly campaign automatically.

Did this answer your question?

Sad smiley Neutral smiley Happy smiley
AI-Powered Knowledge Base by

MillionVerifier