Notebook.ipynb
π§ How to Use the Lead Enrichment Script
This Python script automates the process of enriching lead data by using external APIs (Hunter.io and DropContact). It starts by enriching leads data, first with Hunter.io and then with DropContact if necessary. This helps you find email addresses for your leads and ensures they are correctly enriched.
Key Features:
- Waterfall Enrichment π: The script enriches lead data in a step-by-step process. It first attempts to find email addresses using Hunter.io, and if that doesnβt work, it proceeds with DropContact.
- API Integration π: The script integrates with both Hunter.io and DropContact APIs to find lead emails based on the lead's name and company.
- Error Handling β οΈ: The script checks for errors during API calls and logs them for easy tracking and troubleshooting.
- Logging π: Every enrichment attempt, along with any errors or missing emails, is logged in a file (
enrichment_log.txt
) for easy tracking and monitoring.
- Secure API Keys π: The API keys for both Hunter.io and DropContact are securely managed and not exposed in the code.
How It Works:
- CSV Input π: The script loads a CSV file (
leads.csv
) containing the lead information (name, company, etc.).
- Enrichment Process π: For each lead, the script first tries to find the email using Hunter.io's API. If no email is found, it moves on to DropContact to find it.
- Logging and Monitoring π§Ύ: All enrichment actions, including successful enrichments and any errors, are logged into the
enrichment_log.txt
file. This helps you keep track of which leads were successfully enriched and which failed.
This script is perfect for enriching leads' data without manually looking for email addresses. You can scale your lead enrichment process efficiently by relying on the cascade method with two powerful APIs: Hunter.io and DropContact.