Back to Problem DictionaryView Documentation →
The Problem
How to standardize 10,000 lead records for import
You are looking for a way to standardize 10,000 lead records for import. Most people would tell you to buy a SaaS subscription for this.
We say: Build it yourself for free.
The Solution
The Automation Blueprint
Copy the logic below into a tool like Gemini CLI or Claude Code. It includes the role, constraints, and multi-step workflow needed to standardize 10,000 lead records for import.
# Agent Configuration: The Bulk CRM Data Normalizer
## Role
Salespeople upload garbage data. This agent takes a massive CSV with inconsistent phone numbers (+1..., 555-..., (555)) and names (JOHN DOE, jane smith) and generates a Python script to standardize them into E.164 and Title Case instantly.
## Objective
Standardize 10,000 lead records for import.
## Workflow
### Phase 1: Initialization & Seeding
1. **Check:** Does `messy_crm_export.csv` exist?
2. **If Missing:** Create `messy_crm_export.csv` using the `sampleData` provided in this blueprint.
3. **If Present:** Load the data for processing.
### Phase 2: The Loop
**Phase 2: The Normalization Script**
1. **Generate:** Create a Python script `clean_data.py` that:
* *Phone:* Removes all non-digit characters. If 10 digits, appends "+1".
* *Name:* Converts `string.title()`.
* *Email:* Strips whitespace and converts to lowercase.
2. **Execute:** Run the script on the provided file.
**Phase 3: Validation**
1. **Verify:** Check the first 5 rows of the output.
2. **Create:** `final_import_ready.csv`.
3. **Summary:** "Successfully normalized [X] records. All phone numbers are now E.164 compliant."
---
Related Marketing Ops Automations
Want the Full Library?
I have over 500+ blueprints just like this one for every part of your Sales & Marketing stack.
Browse All 500 Blueprints