n8n Tutorial: PhantomBuster + AI: LinkedIn Lead Extraction, Enrichment & Personalized Outreach Automation

Your sales team spends its mornings copy-pasting LinkedIn profiles into a spreadsheet, then guessing at email addresses, then writing "Hi {{firstName}}, I saw you work at {{company}}" messages that re

n8n Tutorial: PhantomBuster + AI: LinkedIn Lead Extraction, Enrichment & Personalized Outreach Automation

Your sales team spends its mornings copy-pasting LinkedIn profiles into a spreadsheet, then guessing at email addresses, then writing "Hi {{firstName}}, I saw you work at {{company}}" messages that read like every other cold pitch in the inbox. A rep burns 3-4 hours a day on this before a single conversation happens. The bottleneck isn't the outreach — it's everything that has to happen before the outreach: finding the right people, getting a valid email, understanding the company, and writing something that doesn't sound templated. That's four tools, four context switches, and four places for a lead to fall through the cracks.

The problem: manual prospecting doesn't scale, and buying data doesn't fix quality

There are two broken ways teams solve this. The first is manual — a human clicks through LinkedIn search, saves profiles, runs each name through an email finder, checks the company website, and hand-writes a message. It produces good leads at a rate of maybe 15-20 per day per rep. The second is buying a bulk list from a data broker — thousands of stale rows, 30% bounce rates, and no personalization signal, which means your domain reputation tanks and your reply rate sits under 1%.

What you actually want is the quality of manual research at the volume of automation: real profiles pulled from a targeted search, verified emails, enriched company context, and a genuinely personalized opening line — for every single lead, without a human touching the pipeline until it's time to hit send. That's exactly what chaining PhantomBuster, Hunter, Apollo, and GPT-4o inside n8n gives you.

The solution: a four-stage enrichment pipeline in n8n

The workflow orchestrates four services in sequence, with n8n acting as the glue that passes data cleanly between them:

  • PhantomBuster runs a LinkedIn Search Export or Sales Navigator Phantom and returns raw profiles — name, title, company, profile URL, location.
  • Hunter takes the first name, last name, and company domain and returns a verified professional email with a confidence score.
  • Apollo enriches the company — headcount, industry, funding stage, tech stack, recent signals — so your message has something specific to reference.
  • GPT-4o reads the full enriched record and writes a personalized connection request or first-touch email, grounded in the actual company data rather than a generic mail-merge field.

The output is a table of ready-to-send leads, each with a valid email and a message written for that specific person. n8n runs it on a schedule, so you wake up to a filled pipeline instead of an empty spreadsheet.

Step-by-step: building the workflow in n8n

1. Trigger and PhantomBuster launch. Start with a Schedule Trigger node (e.g. daily at 07:00) or a Manual Trigger while testing. Add an HTTP Request node pointed at PhantomBuster's /api/v2/agents/launch endpoint. Set the method to POST, add your X-Phantombuster-Key header, and pass the agent id in the JSON body. PhantomBuster runs async, so it returns a container ID, not results.

2. Wait and fetch results. Add a Wait node (3-5 minutes for a search export) or better, a polling loop: an HTTP Request hitting /api/v2/agents/fetch-output inside an If node that checks whether the container status is finished, looping back through a Wait node until it is. Once done, a final HTTP Request pulls the result JSON (or the S3 CSV URL) with the extracted profiles.

3. Split into individual leads. Pipe the array into a Split Out node (or an Item Lists node in older versions) so each profile becomes its own item. Everything downstream now runs per-lead automatically — n8n's item-based execution means you don't write a single loop.

4. Find the email with Hunter. Add an HTTP Request node to Hunter's Email Finder: GET https://api.hunter.io/v2/email-finder with query params domain, first_name, last_name, and api_key. Extract the company domain from the LinkedIn data (or resolve it from company name). Follow with an If node that filters out results where data.score is below 70 — sending to low-confidence emails is what kills your sender reputation.

5. Enrich with Apollo. Another HTTP Request to Apollo's /v1/organizations/enrich endpoint, passing the domain. Map the returned industry, estimated_num_employees, keywords, and any recent-news fields into your item. Use a Set (Edit Fields) node to keep only the fields you'll actually feed the model — clean input produces better output and cheaper tokens.

6. Generate the message with GPT-4o. Use the native OpenAI node (Chat model, gpt-4o) or an HTTP Request to the Chat Completions API. Build a system prompt that fixes the tone and length ("Write a 2-sentence LinkedIn connection request, under 300 characters, no exclamation marks, reference one specific thing about their company"). In the user message, interpolate the enriched fields: {{ $json.first_name }}, {{ $json.title }}, {{ $json.company }}, {{ $json.industry }}, {{ $json.recent_signal }}. Set temperature around 0.6 for varied but controlled output.

7. Write to your destination. Finish with a Google Sheets, Airtable, or CRM node (HubSpot, Pipedrive) that appends each finished lead — name, email, company, generated message, and Hunter confidence score — into a review table. Keep a human approval step before anything actually sends: a status column your rep flips to "approved" before a separate send workflow picks it up.

Why this beats both manual work and bought lists

The numbers are the argument. A rep doing this by hand produces ~20 researched, personalized leads a day. This pipeline produces 200-500 depending on your PhantomBuster plan limits, at a marginal cost of a few cents per lead in API calls. Because Hunter verifies every email and you filter on confidence score, your bounce rate stays under 3% instead of the 20-30% you get from broker lists — which directly protects your domain's ability to land in the inbox.

The personalization is the real multiplier. A generic cold message gets a 1-2% reply rate; a message that references the prospect's actual industry, role, and a real company signal gets 8-15%. GPT-4o grounded in Apollo data isn't guessing — it's writing from facts. And because it's a scheduled n8n workflow, the cost of running it tomorrow is zero human hours. You're trading four hours of rep time per day for a 5-minute morning review of pre-written messages.

Common pitfalls (and how to avoid them)

LinkedIn rate limits and account safety. PhantomBuster scrapes with your LinkedIn session cookie. Push it too hard and LinkedIn flags the account. Cap extraction at 80-100 profiles per day per Phantom, spread launches across the day, and never point two Phantoms at the same session cookie simultaneously.

Missing or wrong company domains. Hunter needs a domain, but LinkedIn gives you a company name. Build a fallback: if the domain field is empty, add a small enrichment step (Apollo's org search by name, or a Clearbit lookup) before hitting Hunter. Skipping this silently drops a chunk of your leads.

No error handling on async calls. PhantomBuster containers occasionally time out or return partial data. Wrap the fetch in n8n's error handling — set the node's Continue On Fail option and route failures to a separate branch that logs them, so one bad container doesn't halt the entire batch.

Token cost creep. Feeding the full Apollo response into GPT-4o for 500 leads adds up fast. Use the Set node to trim input to the 5-6 fields the prompt actually references. Cap max_tokens at ~150 for a connection request — you don't need the model to ramble.

Skipping the human gate. Never wire the generation node straight to an auto-sender on day one. Run the review step for at least a week, read what GPT-4o produces, and tighten the system prompt against the messages that read as robotic. Once the output is consistently good, you can shorten the review — but earn that trust first.

Build it once, and the workflow quietly refills your pipeline every morning with verified, enriched, personalized leads — while your team spends its time on the conversations instead of the spreadsheet.

PhantomBuster + AI: LinkedIn Lead Extraction, Enrichment & Personalized Outreach
PRONTO PARA USAR

Ja construimos isso pra voce

Nao comece do zero. O PhantomBuster + AI: LinkedIn Lead Extraction, Enrichment & Personalized Outreach e um workflow n8n pronto para instalar — conecta suas ferramentas em minutos, sem codigo.

Instalar por $79.0 →