How it works
- Fetch contacts sorted by
created_atdescending. - Check which ones were created since the last run (tracked via a timestamp file).
- For each new contact, search the web for their name + company.
- Extract title, LinkedIn URL, and company info from search results.
- Update the contact record in Supersonic.
Prerequisites
You need a Contacts object type with fields for enrichment data:The script
Setup
1
Install dependencies
2
Set environment variables
3
Test with a single run
4
Schedule with cron
Every 15 minutes:
Using a different search API
Thesearch_person function is the only part that depends on Tavily. Swap it out for any provider. Here’s the same function using SerpAPI:
This script processes up to 50 contacts per run. If you’re importing large batches, increase the
limit parameter or run more frequently. Each records.list and records.update call counts toward the 1,000 calls/min rate limit.