— June, 24 2019

Building a lead generation machine

Checkout how you can build a complex automated lead generation machine workflow with our platform.

Building a lead generation machine

Today, we’ll dive into a complex automated lead generation machine workflow.

This use case harnesses the power of our platform, Captain Data.

We’ll go over every step of the process so that you fully understand how it works under the hood.

Complete Process

It’s incredible to see how far we can go regarding automation and data enrichment.

Bottom line: There’s simply no limit 😅

Before diving into the full process, a bit of context about our client:

The idea here is to complete/enhance their outbound strategy (in addition to Google Ads), building a qualified leads database that is constantly up to date and enriched.

Due to how they initially built their CRM, they absolutely needed the company’s SIRET (the official company ID in France). And that does not help the process!

Let’s dive into all the steps.

Lead Generation Machine Process

Yeah, it's complicated.

Search companies on LinkedIn Sales Navigator (1)

It’s important to understand why you would start by searching for companies (“Accounts”).

Our client is using an account-based marketing approach due to how they segmented the market and organized sales: by region and company size.

This means sales representatives have a clear understanding of who and how they target leads.

There are also other factors, such as industry, that impact how they approach each company.

All-in-all, they identified specific account targets which they then filter according to a few personas (i.e. the “office manager”).

The first job is to manually fine-tune the search on Sales Navigator. This is one of many examples:

Sales Navigator Accounts Search

Here, we’re specifically looking at small Internet companies that are growing rapidly.

That’s also why we recommend that our clients use Sales Navigator: although the tool can be a pain to use, LinkedIn still has the best B2B database, and with Sales Nav you get a better search experience.

Extract each company profile (3)

Pretty straight forward: you don’t want to stick with the search data, which is pretty limited, so here we gather the complete company’s profile.

A complete company profile in your CRM always helps sales to close faster and better.

Context helps you build better relationships. And sales is all about building relationships 😀.

Enrich with SIRET (4)

This step is specific to our client; here we enrich each company with their official French company ID. This specific requirement forces us to implement an API that interfaces with the Sirene database.

We can then search using the company name and postal code to flag whether the company we find in the Sirene database is the one we actually extracted on LinkedIn.

If we do not find a match, we perform a Google Search (step 5 to 7): here we search for the following: “site:societe.com/societe company name”.

This website (societe.com) allows us to find the SIRET and additional useful data, such as the company’s headquarters.

That’s what is so great about Captain Data: you get the flexibility to do exactly what you want, using existing building blocks. Add a bit of setup and you’re good to go.

When we first met our client, he told us what he needed and asked if we could build something.

Although we knew where to find the data, we were like “Yeah, sure. But the process is going to be hard to implement!

It was hard indeed, and still today, as we see a complete run, we’re thinking “Wow, it actually works 😂”

Aggregate data on companies (8)

In this step, we fetch the previously saved companies at step 4, and the result of step 7, which is the societe.com extraction.

Here we flag companies and select only valid ones, meaning we’re sure the company we found with the Sirene database and societe.com actually matches the one we extracted on LinkedIn.

At the end of this step, we setup a webhook that pings our client on one of its internal APIs: the goal is to save every company (valid or not) to perform quality checks and keep track of everything we extract.

For every valid company (roughly 70 to 80% of the entire batch), we continue the recipe.

The other ones will be validated manually and used in a later run.

Search employees on LinkedIn (9)

We now have a nice companies database: Let’s extract some quality leads!

The idea is to filter for our client’s personas: you don’t want to target EVERY person in the company, but rather those who will be using, or better, buying your product.

It leads to a complex set of keywords, such as this one: (DRH OR HR OR Human resources OR Office Manager OR RH OR RRH) AND (NOT assistant) AND (NOT assistante) AND (NOT consultant) AND (NOT consultante).

One good practice here is to test different sets of keywords.

You better enlarge your target a little bit because in the end you rarely get an email address for every lead. In general, you will get ~50% of emails.

Again, we extract each person’s profile to gather a complete picture of our lead.

Such data help personalize the outreach campaign at scale: we call this process “surgical hits at scale”.

Aggregate everything and find emails (12)

The last step can begin. We’ve got everything we need, companies and people, so we “just” have to aggregate it all together.

Fortunately, we’ve been passing additional data between each step, we call them “meta”(data).

That means we tagged every lead with LinkedIn’s company ID.

And so it becomes really easy to find the corresponding company and associate it with the profile.

How do we do that? Well, technically speaking, this single line of code does the job:

const refCompany = companies.filter(company => company.id === people.linkedin_company_id);

Here we look for the id of a company that matches the linkedin_company_id of the lead we’re working on.

Now that we’ve associated each lead to the correct company, we can use third-party services to find emails.

Again, you don’t have to do anything, just provide your API keys and we handle the integration for you, finding the emails and validating them.


Wow, that’s actually 12 automated steps we’re running.

Can you imagine how you would have done that manually? No? Well, that’s the point!

We’re also thinking about adding steps to find phone numbers, and to add a new recipe that will begin by searching “people” instead of “accounts”.

Anyway, the outcome is being able to run multiple qualified email campaigns with highly qualified data.

We could also use additional bots later on, such as automatically connecting the leads on LinkedIn if they don’t reply to our email sequence.

If you’re looking for something more “packaged”, we created recipes that work straight out of the box, for example our LinkedIn Sales Navigator People Recipe.

Are you ready to build your lead generation machine? Get in touch.