Building ICP-based Prospect Lists Automatically with Surfe and n8n

If you’ve ever spent hours manually finding companies, searching for people, verifying contact info, and then adding everything into Salesforce, then this n8n automation is definitely going to be a time-saver.

TWe recently built an end-to-end automated prospecting workflow using n8n, Surfe APIs, and Salesforce, and it’s been a total time-saver.

In this post, we’ll walk you through:

  • In this post, we’ll walk you through:
  • How each part works under the hood
  • And how you can set it up in your own org in minutes

What Are We Actually Doing?

The goal is simple — build a list of potential leads (people) that match our Ideal Customer Profile (ICP) automatically.

Here’s the high-level flow:

  • We define what kind of companies we’re looking for (industry, size, revenue, country, etc.).
  • We fetch the companies matching our ICP.
  • Then we search for people working in those companies.
  • We enrich those people with verified email + phone using Surfe’s Enrichment API.
  • Once enrichment is done, we push those leads directly into Salesforce.
  • And finally, we send ourselves a Gmail notification saying “It’s done!”

For doing all these things Surfe has provided use clear API endpoint.

All of that happens inside one n8n workflow.

This is how the flow looks like we’ll explain each and every component.

n8n workflow

Node-by-Node Breakdown

Let’s go step by step through the actual workflow nodes.

1. Trigger

This is the simplest part.

When we click "Execute Workflow", the automation kicks off. Perfect for testing or running on demand and we can schedule it as well like fresh prospect list on every monday but here its manually for testing purpose.

Node: When clicking 'Execute workflow'

2. Search ICP Companies (Surfe API)

This node calls Surfe’s Company Search API. We define filters for our ICP — for example:

  • Industries: Software, Apps, SaaS
  • Employee count: 1–50
  • Country: IN (India)
  • Revenue: 1–100M

Here’s a simplified version of the request body:

Node: When clicking 'Execute workflow'

   
{
  "filters": {
    "industries": ["Software", "Apps", "SaaS"],
    "employeeCount": { "from": 1, "to": 50 },
    "countries": ["IN"],
    "revenues": ["1-100M"]
  },
  "limit": 10
}

   

This gives us a list of company domains that match our target ICP.

3. Prepare JSON Payload with Company Domains

A quick Code node. It takes those domains and packages them into the right format for the next API call.

   
const companies = $json.companyDomains || [];
return {
  "companies": { "domains": companies },
  "limit": 10
};

   

Basically: “Hey Surfe, find us 10 people across these companies.”

4. Search People in Companies

This node hits Surfe’s People Search API, passing in the domains from the previous step. It returns a list of people (employees) that match.

At this point, we’ve got names, job titles, and LinkedIn URLs — but no verified contact info yet.

5. Prepare JSON Payload for Enrichment

Now comes enrichment. This Code node prepares data for Surfe’s Bulk Enrichment API:

   
{
  include: { email: true, linkedInUrl: false, mobile: true },
  people: [
    {
      firstName,
      lastName,
      companyName,
      companyDomain,
      externalID: `${firstName}_${lastName}_${companyDomain}`
    }
  ]
}

   

We’re telling Surfe which fields we want (email, mobile) and giving each person a unique ID.

6. Surfe Bulk Enrichments API

This is where Surfe does the heavy lifting. It enriches our people data — adding verified emails, phone numbers, etc. We send a POST request to:


   https://api.surfe.com/v2/people/enrich

Surfe returns an enrichmentID that we’ll poll until it’s complete.

7. Check Enrichment Status (with Loop)

A neat little loop setup:

  • We call GET https://api.surfe.com/v2/people/enrich/{{enrichmentID}}
  • If status = “COMPLETED” → move on
  • Else → wait 3 seconds and check again

This ensures we don’t move forward until enrichment is ready.

8. Extract People from Response

Once enrichment is done, we extract the good stuff.

   
const people = $json.people || [];
return people.map(person => ({
  json: {
    firstName: person.firstName,
    lastName: person.lastName,
    email: person.emails?.[0]?.email,
    phone: person.mobilePhones?.[0]?.mobilePhone,
    jobTitle: person.jobTitle,
    companyName: person.companyName,
    companyWebsite: person.companyDomain
  }
}));

   

Now we’ve got a clean, structured list of enriched contacts.

9. Filter: Only Keep Contacts with Email & Phone

Simple Filter node — keeps only those entries where both email and phone are not empty.

No point syncing half-baked data.

10. Create or Update Contact in Salesforce

Here’s the magic CRM sync.

We use the Salesforce node in n8n to upsert a Contact based on Email.

  • If the contact exists → update
  • If not → create new

We map fields like:

  • First Name
  • Last Name
  • Email
  • Phone
  • Job Title

This ensures Salesforce always has the latest, enriched data.

11. Gmail Notification

A nice little cherry on top. Once everything’s done, we send an email notification like: “Your ICP prospecting enrichment is complete.” That’s our confirmation the automation finished successfully.

Setting It Up in Your Own Org

You can totally recreate this.

Prerequisites

  • n8n (Cloud or Self-hosted)
  • Surfe API key (get your api key here)
  • Salesforce OAuth credentials
  • Gmail account for notifications

How to build in your n8n workspace

  • Import the JSON file into your n8n editor. Click here to download
  • Go to Credentials and add:
    • Surfe API (HTTP Bearer Auth)
    • Salesforce OAuth2
    • Gmail OAuth2
  • Update filters in the Search ICP Companies node to match your target industries, countries, etc.
  • Edit your email in the Gmail node.
  • Click Execute Workflow or schedule it and see the magic how it builds your prospect list.

Wrap-Up

This was a fun build n8n really shines when chaining APIs together like this. Surfe’s enrichment APIs + Salesforce integration = a lightweight but powerful B2B growth engine.

If you want to adapt it:

  • Change ICP filters (industry, country, size)
  • Add extra CRMs (HubSpot, Pipedrive)
  • Or even push data into Google Sheets or Slack

Automation opens a lot of creative doors once you get the hang of it.

Have any questions? Feel free to drop an email to support@astreait.com or visit astreait.com to schedule a consultation.