Modern Code Consulting

Automation · 12 steps

Verified lead list automation: Sales Navigator search to an import-ready file

A saved people search goes in. A deduplicated, verified, import-ready lead file comes out, with every catch-all address held back.

Built by Matt Cruz, Modern Code Consulting

The problem

Most cold email lists go wrong before the first send. Scraped names come in messy, most rows have no email, the same person shows up twice and some of the people on the list are not buyers at all.

Load that straight into a sending tool and you pay for lookups on people you never should have emailed, and the bounces and catch-all addresses land on the domain you send from.

What I built

I built this to take a saved Sales Navigator people search and turn it into a file I would actually load into a campaign. It runs a small sample first, checks fit and cost per lead, and stops for the owner's go before any bulk credits get spent.

A Claude Code skill makes the fit calls row by row. Python scripts do the exact work, one per outside service: import and dedupe, fill the missing emails, verify every address and build the import file. Only addresses that verify ok make it into the file. Catch-alls stay on disk and never reach the sending tool.

How it works, step by step

A Claude Code skill runs the procedure and makes the fit calls. Five Python scripts do the exact work, one per outside service.

Stage 1 · Tune and sample

  1. Tune the search on page one

    Substituted

    Scores the first page of 25 results for two versions of the search and keeps the one with more real buyers on it, before any credit is spent.

    Sales Navigator, sales-nav-leads skill

  2. Run a 50-profile sample first

    Substituted

    Scrapes 50 profiles, then pushes them through the whole funnel: normalise and dedupe, find the missing emails, verify every address.

    vayne_sales_nav.py, anymailfinder_enrich.py, millionverifier_bulk.py

Stage 2 · Check, then ask

  1. Check fit and cost per lead

    Ran

    Reads the sample rows for fit, counts the email funnel by source and works out the cost of one sendable email, then checks all three against the skill's limits.

    sales-nav-leads skill

  2. Wait for the owner's go

    Not run

    Sends the sample numbers and the credit estimate for the full pull, then waits. Nothing bulk runs without an explicit go.

    The owner

Stage 3 · Pull and clean the list

  1. Scrape the full 60 profiles

    Substituted

    Runs the same search for the 60 profiles asked for and downloads the export.

    Vayne scraper

  2. Normalise, dedupe, exclude

    Ran

    Maps the export's columns to the lead layout, removes repeated profiles and drops anyone at a company that was already in an earlier campaign.

    vayne_sales_nav.py

  3. Screen every company for fit

    Ran

    Reads every row's title, company, size, location and company description, labels it on, border or off, and keeps one contact per company, so no lookup is paid for on a bad row.

    sales-nav-leads skill

Stage 4 · Find and verify emails

  1. Fill in the missing emails

    Substituted

    Looks up only the rows that have no email, keeps only finds the service marks valid, and writes the rest to a no-email file.

    anymailfinder_enrich.py, Anymailfinder

  2. Verify every address

    Substituted

    Sends every email, whichever tool found it, through the verifier and writes the result next to each row.

    millionverifier_bulk.py, MillionVerifier

  3. Hold catch-alls, ship only ok

    Ran

    Splits the verified list: only addresses marked ok go into the sendable file. Catch-all, unknown and invalid rows stay on disk and never reach the sending tool.

    millionverifier_bulk.py

Stage 5 · Build and load

  1. Build the campaign import file

    Ran

    Keeps rows that are verified ok and on-fit, reduces each first name to a clean given name, fills the campaign's two merge fields and writes the four-column import file.

    itmsp_import_ready.py

  2. Upload to the live campaign

    Not run

    Would add the 29 leads to the live sending campaign, skipping anyone already in the workspace. Sends would start at the next schedule window.

    instantly_campaign.py, Instantly

The recorded run

This is a real run of the automation on an invented business: a backup tool sold to IT service providers. Use the tabs inside it to move between the overview, how it's built, the step-by-step run and the result.

What ran for real: The sender, people, companies and domains are invented. The import, dedupe, exclusion, catch-all split and import-file scripts ran for real, offline, on that data, and the fit reads were done row by row. No search, scrape, email lookup or verification was bought: those four steps used invented exports and vendor answers and are marked substituted. The owner's go and the live upload were not run. File paths are shown in the pipeline's usual relative layout.

Open the run full screen(opens in a new tab)

The run is laid out for a desktop screen.

Want something like this running in your business?

Book a free 15-minute call. Tell me where the hours and the leads are leaking, and I'll tell you what I'd automate first and what it would cost.

Book a free automation audit