Imported from crustdata/skills (
skills/email-enrichment/SKILL.md) via skills.sh. Install upstream withnpx skills add crustdata/skills --skill email-enrichment. Copyright stays with the author.
Email Enrichment
Two directions:
- Email to person: email addresses in, name, title, company and profile URL out.
- Person to email: names (with company) or profile URLs in, business emails, personal emails or phone numbers out.
Pick the direction from the input. Mixed input: run both.
Crustdata MCP rules
Server: https://mcp.crustdata.com/mcp. Tools take arguments in one params object (crustdata_credit_costs and crustdata_credits_check take none). Examples below show the params contents.
- Pass
user_query(the user's request, verbatim) on every call that accepts it. - Run independent calls in parallel (batches of 25, separate lookups); keep identify → verify and search → enrich sequential.
fieldsoncrustdata_people_enrich_v2andcrustdata_people_search_db_v2takes dot-paths; request only the paths listed in each step. Enrich always addsbasic_profileandsocial_handles.- Use
format: "json"oncrustdata_people_search_db_v2. - Name filters:
[.](exact phrase). Never(.)on names. - Zero search results: read
remarks, which names the condition that emptied it. - Gated fields: a 403 naming a field means drop only that field, re-run, continue, tell the user what was unavailable, and don't request it again this session. Filtering and returning are gated separately.
crustdata_account_endpoints_v2(free) lists access. - Errors: 403 on a whole endpoint → it isn't on this account (say so, use the fallback below). 402 → out of credits: stop, save progress, tell the user. 429 → wait, retry once. 5xx → retry once, then mark those rows
errorand continue.
Costs. Call crustdata_credit_costs once per run for this account's rates; never quote prices from memory. Before spending, estimate the run from the rate card and the input size, and confirm with the user if it is above ~25 credits. Track spend by summing each response's spent_this_call (the footer balance lags).
- Identify and contact enrichment bill only matched identifiers; unmatched rows are free. A wrong-person identify match is still billed. Empty search results are free.
- People search bills premium groups per profile, once for filtering and again for returning: an employer condition and any returned
experience.*path each billexperience. Name-only searches that return onlybasic_profile.*and the profile URL bill the base rate.
Step 0: Parse the input
- Accept CSV, spreadsheet or pasted text. Extract emails (or people), lowercase emails, dedupe.
- Over 100 rows: write progress to
email-enrichment-progress.jsonin the working directory after each step ({step_done, companies, results, unmatched}); on start, if it exists, resume from it. - Classify each email:
- personal: domain in
gmail.com, googlemail.com, yahoo.com, ymail.com, hotmail.com, outlook.com, live.com, msn.com, aol.com, icloud.com, me.com, mac.com, protonmail.com, proton.me, pm.me, fastmail.com, hey.com, zoho.com, gmx.com, comcast.net, att.net, verizon.net - edu: domain ends in
.eduor.ac.<cc>(.ac.uk,.ac.in, ...) - work: everything else
- role: local part is a shared inbox (
info,hello,team,sales,support,contact,admin,hr,jobs,careers,press,billing,noreply). Don't look these up; report them asrole address.
- personal: domain in
- Name parts: split the local part on
.,_,-; remove digits from each part; drop parts shorter than 2 characters.daniel_k_lee→[daniel, lee],rkoning→[rkoning],jsmith1987→[jsmith].
Email to person
1. Access and estimate (free)
In parallel: crustdata_credit_costs, crustdata_account_endpoints_v2 with path: "/person/identify" and with path: "/batch/person/identify". If neither is enabled, skip step 3 and run step 5 for every email. Estimate: one identify per email + one enrich per work/edu match + fallbacks (a search or a web search) for the misses. Confirm if above ~25 credits.
2. Companies behind work/edu domains
crustdata_company_identify_v2, unique work/edu domains (skip role addresses), 25 per call, in parallel with step 3:
{"domains": ["openai.com", "hbs.edu"], "fields": ["basic_info.name", "basic_info.primary_domain", "basic_info.all_domains"]}
Per domain keep the top match's crustdata_company_id, basic_info.name, basic_info.all_domains. matches: [] means unknown (vanity or personal-brand domains); those emails can still match in steps 3 and 5.
3. Identify every email
Up to 100 emails: crustdata_person_identify, 25 per call, in parallel. More: crustdata_batch_person_identify, 300 per job; on a timeout it returns a batch_id: fetch with crustdata_get_batch, never resubmit.
{"emails": ["kayla@openai.com", "talling@lamppostgroup.com", "jashojit@gmail.com"]}
Rows come back in request order: matched_on, match_status (matched / not_found / redacted), matches[0].confidence_score, matches[0].person_data with crustdata_person_id, basic_profile.name, first_name, last_name, headline, current_title, social_handles.professional_network_identifier.profile_url. redacted: report as redacted, never look up again. Every match goes through step 4.
4. Verify
Name check (every match). Compare name parts with the profile's first_name / last_name tokens (lowercase, quotes and nicknames removed):
- 2+ parts: the first part appears in the first name or full name, and the last part appears in the last name.
bert.zacharinpasses "Albert Zacharin", fails "Zach Zacharin". - 1 part: passes if it equals a name token, or is first name + last initial (
kaylaw), or first initial + last name (rkoning→ r + koning,talling→ t + alling), or first name + last name run together. Fails otherwise (tallingvs "Santosh Sankar").
Employer check (work/edu matches that passed the name check). One crustdata_people_enrich_v2 per 25 profile URLs:
{
"professional_network_profile_urls": ["https://www.linkedin.com/in/kaylakooyman"],
"fields": [
"experience.employment_details.current.name",
"experience.employment_details.current.company_website_domain",
"experience.employment_details.past.name",
"experience.employment_details.past.company_website_domain"
]
}
Pass when the email domain, or any of the step 2 company's all_domains, equals (or is a parent of) a current or past company_website_domain, or the step 2 company's name matches an employer name. The output company is the employer entry that passed, with "(former)" if it is a past entry; never just the first current entry.
Unknown domain (step 2 found no company) whose name contains the person's last name (carole@carolewainaina.com): mark name-verified and skip step 5.
Personal emails: the name check is the only gate; mark them name-verified. A personal email whose only name part is an initial plus a surname (jsmith): mark it unverified. Failing either check → step 5.
5. Fallbacks for misses and rejects
Run in order, stopping at the first accepted match.
Uniqueness requires exhausting search pages: follow next_cursor via cursor with unchanged filters/fields. Two distinct people pass → ambiguous, stop. Budget cap → unverified; failed paging → error. Never accept an incomplete search through another fallback. This applies to a-c below.
a. Name + employer search (work/edu with a known company). crustdata_people_search_db_v2:
{
"filters": {"op": "and", "conditions": [
{"op": "or", "conditions": [
{"field": "basic_profile.name", "type": "[.]", "value": "talling"},
{"field": "basic_profile.name", "type": "[.]", "value": "alling"}
]},
{"op": "or", "conditions": [
{"field": "experience.employment_details.company_id", "type": "=", "value": 968065},
{"field": "experience.employment_details.company_website_domain", "type": "in", "value": ["lamppostgroup.com"]}
]}
]},
"fields": [
"basic_profile.name", "basic_profile.headline",
"experience.employment_details.current.name",
"experience.employment_details.current.company_website",
"experience.employment_details.past.name",
"experience.employment_details.past.company_website",
"social_handles.professional_network_identifier.profile_url"
],
"format": "json",
"limit": 5
}
Name condition: 2+ parts → one [.] on "First Last"; 1 part → [.] on the part, or'd with [.] on the part minus its first letter (4+ characters). The employer or covers current and past jobs; put every domain from the company's all_domains in the in list. Accept only if exactly one result passes the name check; the employer filter already confirms the employer, so status is verified and company follows the step 4 rule (company_website is a URL: compare its host).
b. Name-only search (personal emails with 2+ name parts). Same tool, one [.] condition on "First Last", fields: basic_profile.name, basic_profile.headline, profile URL; limit: 5. Accept only if exactly one result passes the name check; 2+ → ambiguous, list the candidates.
c. AI web lookup (anything still unmatched). crustdata_web_search_v2:
{"query": "who is talling@lamppostgroup.com", "sources": ["ai"]}
Read results[].content (an AI overview, e.g. "belongs to Ted Alling, a co-founder and partner at Lamp Post Group"). If it names a person, run search a (work/edu) or b with that full name, adding experience.employment_details.current.name or past.name [.] the named company when given. Accept a single result whose name the overview gave and whose name passes the name check against the email; its status follows step 4 (verified if a work/edu employer check passes, else name-verified). A named person with no profile found: report the name with method: web_ai, no profile URL, unverified. Don't use sources: ["web"] to find profile URLs.
Nothing accepted → unmatched.
6. Output
Write email-enrichment-results.csv next to the input (or in the working directory) and show a table in chat (all rows up to 50; above that, the first 50 and say so):
| column | value |
|---|---|
email |
input address |
category |
work / edu / personal / role |
status |
verified (name + employer) / name-verified / unverified / ambiguous / unmatched / redacted / role address / error |
person_name, title, company, profile_url |
from the accepted match (title: current_title, else headline; company: the verified employer, else blank) |
method |
identify / name_company_search / name_search / web_ai |
note |
why rejected, candidates if ambiguous |
Then a summary: counts per category and status, matches per method, credits spent this run.
7. Next steps (offer, run only on the user's yes)
Price each from crustdata_credit_costs (or the watch preview):
- Contact info for the matched people (e.g. business emails for people found from personal addresses): run Person to email step 2 onward with the matched profile URLs.
- Job-change alerts on the matched people: see Watch below.
Person to email
1. Access (free)
In parallel: crustdata_credit_costs, crustdata_account_endpoints_v2 with path: "/person/contact/enrich" and with path: "/batch/person/contact/enrich". If neither is enabled, stop and tell the user contact enrichment isn't on their plan. Don't use any other tool for contact data.
Ask which types they need if the prompt doesn't say: business email (default), personal email, phone. Each type bills separately per matched person. Estimate and confirm above ~25 credits.
2. Resolve profile URLs
Rows with a profile URL: use it (add https://www. if missing). Rows with name + company: crustdata_people_search_db_v2, all in parallel:
{
"filters": {"op": "and", "conditions": [
{"field": "basic_profile.name", "type": "[.]", "value": "Michael Ma"},
{"field": "experience.employment_details.current.name", "type": "[.]", "value": "Liquid 2"}
]},
"fields": [
"basic_profile.name",
"experience.employment_details.current.name",
"experience.employment_details.current.title",
"social_handles.professional_network_identifier.profile_url"
],
"format": "json",
"limit": 3
}
- Use the company's distinctive word(s): "Liquid 2", not "Ventures"; "Tofu", not "TofuHQ" (drop suffixes like HQ, Inc, Labs, AI).
- Zero results: read
remarks. If the employer condition emptied it and the name alone matches 1-3 people, run the name-only search and show those people with their current title and employer for the user to pick. Otherwise retry withexperience.employment_details.past.name, then with a common variant of the first name (Will/William, Bob/Robert). - One or several results: keep the one whose current title matches what the user gave; if none or several do, list them and ask.
- Still nothing: mark
unresolvedand ask the user for the profile URL.
3. Contact enrichment
Batch endpoint enabled: crustdata_batch_person_contact_enrich, 300 URLs per job (split longer lists):
{"professional_network_profile_urls": ["https://www.linkedin.com/in/petekoomen"], "fields": ["business_email"]}
Fields: business_email, personal_contact_info.personal_emails, personal_contact_info.phone_numbers; request only the types asked for. Rows: professional_network_url, person_id, business_email[] and the personal/phone lists (each {email, status}), plus a fill_summary. It returns a batch_id on timeout: fetch with crustdata_get_batch, never resubmit. Its spent_this_call can read 0: count it as the rate card price times the people with each returned type.
Only the sync endpoint enabled: crustdata_people_contact_enrich, up to 100 URLs per call (chunks to 25 itself; rate limit ~15/min), fields: contact.business_emails, contact.personal_emails, contact.phone_numbers. Rows: matched_on, match_status, crustdata_person_id, business_emails[], personal_emails[] (each {email, status}), phone_numbers[], plus a fill_summary.
Either tool: verified: true keeps only deliverable business emails (costs extra); offer it when the user is about to send. Rows carry no name or company.
A 403 here: skip contact enrichment and tell the user it isn't on their plan.
4. Output
One row per person: name and company (from step 2 or the user's input; for rows given only as a URL, show the URL and don't enrich just to get a name), profile URL, then each requested type as returned (every address with its status), and not found for empty types. Show results exactly as returned: no filtering, reordering or guessing of addresses. List unresolved and not_found people with the reason. Write contacts.csv for more than 10 people. Report credits spent.
Then offer the job-change Watch on these people, quoting the per-change price from crustdata_credit_costs (watch run, person entity); run it only on yes.
Watch
Job-change alerts on known people. crustdata_watch_create with preview: true first (free; returns resolved, unresolved and credits.per_notification), then the same call without preview on the user's yes:
{
"entity_type": "person",
"mode": "entity",
"entities": {"professional_network_profile_urls": ["https://www.linkedin.com/in/kaylakooyman"]},
"track": {"op": "or", "conditions": [
{"field": "experience.employment_details.current", "type": "added"},
{"field": "basic_profile.current_title", "type": "changed"}
]},
"config": {"trigger": {"type": "interval", "every_hours": 24}},
"notifications": [],
"preview": true
}
Billed per changed person; the first run and no-change runs are free. Ask where to deliver: [{"type": "email", "to": ["..."]}], [{"type": "slack", "webhook_url": "https://hooks.slack.com/..."}], or [] for pull-only (read with crustdata_watch_runs). Report the watch id after creating.
Rules
- Never accept a match that fails the checks above, whatever its
confidence_score. - Never run contact enrichment or create a watch without the user's yes to that offer.
- Never write emails into a CRM or send anything; output is chat and CSV files.
- Output: no em dashes, no filler.
Tool dependencies
- Crustdata MCP server (
https://mcp.crustdata.com/mcp):crustdata_credit_costs,crustdata_account_endpoints_v2,crustdata_company_identify_v2,crustdata_person_identify,crustdata_batch_person_identify,crustdata_get_batch,crustdata_people_enrich_v2,crustdata_people_search_db_v2,crustdata_web_search_v2,crustdata_people_contact_enrich,crustdata_batch_person_contact_enrich,crustdata_watch_create,crustdata_watch_runs. - Person identify and contact enrichment aren't on every plan (checked first, with the fallbacks above).
