Recipe prompt
What you’ll build
A job that fills gaps on a CRM contact. It starts with the contact’s personal email address (the reverse lookup is documented for personal emails, not work emails), resolves it to a Forager person, and then asks for a personal email and a phone number for that person.Steps
1
Resolve the email to a person
Send a Example response (illustrative values, trimmed)
POST to Person detail lookup by email with email. The response is a person record. Keep its id.2
Look up the personal email and phone number
Call Personal emails lookup and Phone numbers lookup with Personal email results are objects with
person_id.email, email_type and validation_status (valid, risky, invalid or unknown). Phone results have phone_number.3
Write back to the CRM
Store only addresses you want to keep. For example, skip a personal email whose
validation_status is invalid. Save the Forager id on the contact so you never resolve the same email twice.Handle the edge cases
- Not found. If the reverse lookup finds no person, stop and mark the contact “no match”.
- Empty contact lists. The personal emails lookup returns
200with an empty body when nothing is left after filtering, which is why the code checks for an empty body. It returns only free webmail addresses, not company domains. - Matching. The reverse lookup’s
emailis documented as the person’s personal email address. - 403. The key is missing or invalid. Fix the credentials; do not retry.
- 429. Back off and retry. See errors and rate limits.
- Credits. Reverse lookup by email costs 5 credits. Personal email lookup costs 5, and is not charged when no address is returned. Phone number lookup costs 15 credits per lookup. See credit pricing.
Related
Enrich a contact
Reverse lookups and the full person record.
Find phone numbers
Phone lookup details.
Personal emails lookup
Request and response reference.