From your CRM to your Mailchimp database.
March 14, 2026
Let's say you have the following task. Extract from your CRM your new prospective clients and enter the email addresses in your Mailchimp database. Manually you have to sort the table, remove fake accounts and separate by country and import in Mailchimp.
That's tedious. And when you do it every week, the cost in time adds up fast.
So I built a small internal tool to automate the whole thing, and this is how it works.
Our CRM exports contacts as a CSV file. Each row contains a name, email, company, and country. The challenge is that Mailchimp doesn't just want a flat list. It wants contacts organized by audience segment, tagged by region, and deduplicated against what's already there.
On top of that, we manage multiple types of contacts, each going into different Mailchimp tags. Doing this by hand meant opening Excel, filtering, cleaning, exporting partial lists, and importing them one by one into Mailchimp's UI. Easy to get wrong. Slow to repeat.
The tool is a single-page web application built in Python using Gradio for the interface and the official Mailchimp Marketing API client for the sync.
Here's the full flow:
1. Upload your CSV exportThe app accepts the raw file from your CRM. It automatically cleans it on load: renames columns to match what Mailchimp expects, strips out obviously fake email addresses, and fills in any missing fields.
2. Choose the contact typeThe app supports multiple contact categories. You select which type applies to the current batch, and this determines how contacts are tagged inside Mailchimp.
3. Preview the data splitBefore anything is sent to Mailchimp, the app segments the contacts automatically based on rules defined for your workflow. You get a summary of how many contacts fall into each group, so you can verify the data looks right before committing.
4. Select which groups to uploadYou don't have to upload everything at once. You can choose which segments to sync in a given run, which is useful when you only need to update a specific subset of your audience.
5. Start the uploadOne click triggers the sync. For each contact, the app checks whether that email already exists in Mailchimp. If it does, it updates the record. If not, it adds a new subscriber. Either way, the correct tags are applied.
A real-time progress bar tracks the job, and a results log shows you exactly how many contacts were added, updated, or had errors.
The stack is intentionally minimal:
The development environment runs entirely inside a VS Code Dev Container, which means the app starts automatically when you open the project. No setup steps, no environment drift between machines.
The entire project was written inside VS Code using Claude Code, Anthropic's AI coding assistant that runs directly in the terminal. Rather than searching documentation, debugging alone, or writing boilerplate by hand, Claude Code handled the heavy lifting: scaffolding the initial structure, wiring up the Mailchimp API calls, and iterating on the logic as requirements became clearer. The code was written through a conversation, not from scratch.
Secrets and API credentials are stored in a local config file that is excluded from version control. The app reads them at runtime, so nothing sensitive ever ends up in the codebase.
The goal was not to build something impressive. It was to eliminate a repetitive task that was eating 20 to 30 minutes every week and occasionally producing errors when done by hand.
Gradio was the right choice here because it turns a Python script into a usable UI in very few lines. There is no React, no REST endpoints, no deployment pipeline. You run it locally, use it, done.
The Mailchimp API handles deduplication gracefully. A PUT-style upsert means you can re-run the same file without creating duplicate subscribers. That alone was worth the integration effort.
Using Claude Code meant the whole thing was built in a single focused session. Describe the problem, review the output, refine. No Stack Overflow rabbit holes, no copy-pasting from outdated tutorials.
Before this tool, the process looked like this:
Now it's: export CSV, upload, click start. The whole thing runs in under two minutes for a few hundred contacts.
Small tools built for specific workflows often deliver more value than large platforms. This one cost a few hours to build and saves time every single week. And with Claude Code inside VS Code, those few hours were spent describing the problem rather than fighting the code.