Mailchimp audience cleanup

A Mailchimp audience export (Audience → All contacts → Export Audience) or a list you are about to import, with the default Email Address, First Name and Last Name fields.

Processed locally in your browser. File contents are not uploaded. No account needed.

Before and after

Made-up rows from the sample file, run through the same code Rote Workspace runs, when this page was built. Removed rows are struck through; changed cells are highlighted — point at one for its old value.

Data Workspacemailchimp-audience.csv5 rows · 8 columns · UTF-8 Processed locally

Original

Before: the sample file
RowEmail AddressFirst NameLast Name
2Ana@Example.com (has spaces at its edges)anasilva
3 (removed)ana@example.comAnaSilva
4 (removed)
5 (removed)ben.example.comBenCole
6cy@example.comCYDIAZ

Result

After: Mailchimp audience cleanup
RowEmail AddressFirst NameLast Name
2ana@example.com (changed)Ana (changed)Silva (changed)
6cy@example.comCy (changed)Diaz (changed)

2 rows × 8 columns after the fixes · was 5 × 8 · 6 cells changed

5 more columns are not shown; they pass through unchanged.

· marks a space at the start or end of a value. The dots are not in the data; they show spaces you would otherwise not see.

Why

Mailchimp rejects addresses with stray spaces or no valid form and counts duplicates as errors, so an import shows fewer contacts than the file has rows.

What it does

  1. Remove empty rowsOn the sample: 1 row removed
  2. Trim spaces in every columnOn the sample: 1 cell changed
  3. lower-case "Email Address"On the sample: 1 cell changed
  4. Title-case "First Name", "Last Name"On the sample: 4 cells changed
  5. Keep only the rows where "Email Address" contains "@"; the other rows are removedOn the sample: 1 row removed
  6. Remove duplicates: rows with the same "Email Address" (ignoring case, ignoring extra spaces, blank keys never match), keeping the first of each groupOn the sample: 1 row removed

Your file needs these columns, spelled exactly: Email Address, First Name, Last Name. If one is missing or renamed, the workflow tells you which step it breaks and does not run.

If your audience fields are renamed, rename them back in your file, or change the steps after you import the workflow.

How to use it

  1. Download the workflow

    A small .json file with the steps above — no data. Want to try it first? Use the sample file (made-up rows).

  2. Open your export

    In the Data Workspace, choose your file. It is processed in your browser, not uploaded.

  3. Import, review, run

    Workflow → Import, choose the file — or skip the download: under Workflow → Templates, press Check & open. Each step is checked against your columns; press Run on this file, then Download.