Any-Format-to-CRM Import Agent (LLM-Driven Lead Ingestion)
Overview
An LLM-driven import agent that turns almost any input, CSV, Excel, JSON, PDF, copy-pasted text, or other CRM exports, into clean, structured leads inside an internal CRM. The agent reads messy source files, maps fields, validates, and pushes records through the CRM API.
Why It Exists
Getting contacts into a CRM is a perennial pain: every source has a different shape, headers are inconsistent, and exports from other tools rarely match the target schema. This agent removes that friction by handling “anything” the user provides and normalizing it to the CRM’s expected lead format.
What We Built
A Node.js agent with a documented operating contract: CLAUDE.md defines the agent’s mission and workflow, CSV-FORMAT.md specifies columns, validation rules, and field mappings, API-DOC.md describes the CRM endpoints and authentication, and EXAMPLES.md captures input-handling and conversation patterns. The toolchain parses spreadsheets (xlsx), PDFs (pdf-parse), and JSON; csvtemplate.js plus Nunjucks templates (crm_import.njk, example_with_notes.njk) generate the normalized CSV; and download.js / import.js handle fetching and pushing leads (with duplicate search to avoid re-imports). A read-api-key.js manages credentials.
Technologies & Approach
A Claude-driven agent steered by structured Markdown specs, with Node parsing libraries (xlsx, pdf-parse) for ingestion and Nunjucks templating for deterministic CSV output. The split between the agent’s natural-language reasoning and the deterministic import/validation scripts keeps the pipeline both flexible and reliable.
Outcome / Impact
Demonstrated that a single LLM agent can absorb arbitrary contact data formats and reliably normalize them into CRM-ready leads with deduplication, validating an “import anything” ingestion pattern for sales/CRM operations.
Capabilities Demonstrated
- LLM agent that ingests and normalizes arbitrary data formats
- Multi-format parsing: CSV, Excel, PDF, JSON, free text
- Template-driven, validated CSV generation (Nunjucks)
- CRM API integration with duplicate detection