Email finder
`ultron-enrich-email` finds a work email for a person from their LinkedIn profile. It works out the person's current company, resolves the company's domain, then tries the company website, Hunter's published pattern, Gravatar and eight address patterns, checking candidates over SMTP through a separate verifier. Ultron runs it on CRM leads that have a LinkedIn URL and no email.
A Python actor (apify/) with its source in apify-actors/. Ultron reaches it two ways: ultron scrape run --tool email_finder, through the fundraising Worker, which writes found emails onto the leads; and the enrich phase of the outreach pipeline. Both need a LinkedIn li_at cookie: the user's, or for the pipeline a system fallback. Each result says whether an email was found, which step found it (verification_method), how confident it is (confidence) and whether SMTP or Gravatar confirmed it (verified).
Overview
- Actor
ultron-enrich-email- Runtime
- Python 3.13, Apify SDK, httpx over HTTP/2, browserforge, dnspython, BeautifulSoup
- Source
apify-actors/email-finder/ - Started by
ultron scrape run --tool email_finder; the outreach pipeline's enrich phase- Needs
- the user's
li_atcookie (without one the actor falls back to public sources) - Verifier
smtp_verify_url+/, with anverify x-worker-secretheader- Mode from Ultron
professional
It only works on leads with a LinkedIn profile URL: the actor drops input leads without profileUrl, and the fundraising Worker only sends leads that have linkedin_url and no email. Leads from the Maps scraper do not qualify.
Input
The schema has two more fields, used only to load a Gmail cookie pool for the personal track. Leads are deduplicated by profileUrl. The actor pauses 1.5 to 3.5 seconds between leads and refreshes its LinkedIn session every 50 leads. When APIFY_PROXY_PASSWORD is set, its requests go through one Apify residential proxy session.
Finding the company
The domain lookup needs a company, so the actor first works out where the person works.
- 1
LinkedIn profile
With a session, LinkedIn's Voyager profile API returns the person's positions; the current one wins, else the first listed. A company found here comes with LinkedIn's company URN or universal name.
- 2
Headline
Otherwise it parses the input
headline, such asPartner at Acme. - 3
Public fallbacks
If LinkedIn refused the profile (HTTP 401), it tries you.com (the profile page's title, then a search by name), LinkedIn's public badge API, then a Brave search for the profile, in that order.
- 4
Input
Last, the lead's own
companyfield.
A company that did not come from the profile must pass is_confident_company (src/): role words such as founder, investor or consultant disqualify it, suffixes such as Capital, Labs or GmbH qualify it, and strings made mostly of filler words fail. A lead that fails ends with Company not confident: <company>.
Domain resolution
resolve_domain_cascade in src/ has two paths:
The validator fetches the candidate's home page and compares the company name with the page title, og:site_name and meta description: at least half of the name's words must appear, or half must be close matches (a Levenshtein ratio of 0.75 or more). A one-word name must appear in the title or in og:site_name.
Finding the address
Once there is a domain, the actor stops at the first step that produces an email.
The eight candidates, in order: first.last, first, flast, firstlast, f.last, last, first_last and last.first, each at the domain, with names lowercased and stripped to letters.
SMTP verification
The actor's comments note that Apify blocks SMTP ports, so checks go to a separate service at smtp_verify_url:
The repository holds one such service, smtp-verify-worker/, a Cloudflare Worker that finds the MX host over DNS-over-HTTPS, probes RCPT TO on ports 587, 465 and 25 in turn, and tests a nonsense address to detect catch-all domains. Its answers:
Which service production's SMTP_VERIFY_URL points at is a secret, so the code cannot say. The actor's schema calls the target a verification VM, and the personal track accepts methods (google_people_pa, ms365_verified) that this Worker never returns.
Personal email track
In personal or both mode the actor also tries Gmail, Outlook and Hotmail addresses (first.last, firstlast, flast and first at each), sending them to the verifier one at a time, 0.3 seconds apart. A valid answer with method google_people_pa or smtp_verified is kept as a verified personal email; one with ms365_verified is kept as low confidence, at 70 percent of its confidence. In personal mode the professional steps are skipped.
Ultron never asks for it: the fundraising Worker passes professional, and the outreach pipeline passes no mode. The actor loads a Gmail cookie pool for these modes (src/), but the current lead flow never calls it.
Output shape
One row per lead.
How Ultron uses it
- 1
From the agent
ultron scrape run --tool email_finder, with optionallead_ids; no ids means every lead with a LinkedIn URL and no email. The verb refuses without a savedli_atcookie. The fundraising Worker's/creates the job and starts the actor with the verifier andenrich-emails email_mode: professional. - 2
Written back
The Worker's webhook writes each found email onto the matching lead, only if the lead still has no email, with
enrichment_data.email_verifiedandemail_verification_method. It also stores LinkedIn's company identity (voyager_companyName,voyager_companyUrn,voyager_universalName,voyager_companyDomain) and fills an emptycompanyorcompany_domain. Its wake reportsVerified <found>/, where found includes hits SMTP did not confirm.<total> emails - 3
From the outreach pipeline
phaseEnrichinsrc/runs the actor synchronously on up to 10 filtered pipeline leads that have a LinkedIn URL, with the user's cookie or thelib/ outreach/ pipeline.ts LINKEDIN_LI_ATfallback, and writes a found email tocontact_email. It sends no verifier, so every SMTP check there comes backunknown.
File map
- apify-actors/email-finder
- .actor/actor.jsoninput schema
- Dockerfileapify/actor-python:3.13
- requirements.txt
- src
- __main__.pyinput, session, proxy, the per-lead loop
- email_finder.pycompany, website, Hunter, Gravatar, patterns, SMTP batch
- domain_resolver.pythe domain cascade and its validator
- company_filters.pyis_confident_company
- personal_track.pyGmail, Outlook and Hotmail candidates
- vm_client.pysingle-address verifier call
- gmail_pool.pyGmail cookie pool, loaded but not called
- smtp-verify-worker
- index.jsSMTP verifier Worker: MX lookup, recipient probe, catch-all test
- fundraising-worker/src
- index.ts/enrich-emails and its webhook
- actors.tsstartEmailFinderRun
- db.tsgetLeadsForEnrichment, updateLeadEmail, updateLeadIdentity
- src/lib
- fundraising-tools.tsthe email_finder tool
- outreach/pipeline.tsphaseEnrich