Clean a customer CSV in Make Free before importing it
Create a make free csv cleaning activity with 5 fake rows. Clean up the start and end spaces on name, email, segment values. Drop empty email rows. Preview the new csv text. (Note this does not import actual customer records).

Customer exports may include extra space in names, inconsistent segment names, and rows without email. Here's a Make Free workflow that will clean them up for you and recreate CSV text you can review before import.
Before you start
You'll need to use the Free plan of Make and a browser. Get your Free Make account to create this cleanup workflow (opens in a new tab). Or log into your own account if you already have one. You'll create a four-column CSV using fictional contacts. No CRM integrations. No messages sent.
We did it ourselves on Free account. Use it if you have same cleanup rules on all exports. If it's just one file, it could be easier to copy and edit it in spreadsheet. Keep the export and practice on following fictional data. Don't use cloud for customer's info until you practice it.
1. Parse five fictional contacts
- Select Create scenario Give the name: Customer CSV cleanup practice Inactive schedule
- Add CSV > Parse CSV. Set CSV contains headers to Yes. Enter CSV headers with the first line from the example (from contact_id to segment).
- In CSV > Parse CSV module set Delimiter to Other and Delimiter character to a comma. (The full example is below in the separate code that you can copy out. It's a single header row followed by 5 rows of (fictional) contacts.) Then paste (the full example, header + all 5 rows) in the CSV field and click the Save for the module.
contact_id,display_name,email,segment
001," Ada "," ADA@example.com "," VIP "
002," Bob, Jr. ",bob@example.com," regular "
003," Casey ",,"VIP"
004," Ada "," ADA@example.com ","VIP"
005," Taylor ",not-an-email," NEW "
The quoted name of 'Bob, Jr.' has a comma in a field. Let the quotes be there. The third field empty in row '003' is intentional. Make sure that leading zeros are present for 001 and 002 ids.
2. Clean the fields for each row
- Click on the + after parser, then add Tools > Set variables.
- Use Add variable for these 3 names. Just put the name in Variable name. In Variable value just put the expression after the =.
clean_name = {{trim(1.col2)}}
clean_email = {{trim(1.col3)}}
clean_segment = {{lower(trim(1.col4))}}
1 is the id of parser's module. If you have a different id then you need to choose corresponding fields from the mapping panel. display_name, email, segment should appear as colored field tokens in editor. not as raw formula text. You need to save the module. Remember to hit Save in module.
Make's text functions (opens in a new tab) say trim means remove leading and trailing spaces and lower means convert text to lower case. We are trimming the email without lowering the case. We only lower the case for our controlled segments labels - so "VIP " would be "vip".
Tools > Set variables has these three variables for each source row.
3. Exclude rows with a blank email
- After Tools, put in the CSV > Create CSV (advanced). Then, close the config drawer of that (the X) to get to the connection line. We will set up its output next.
- Click on the join line in-between Tools and the last CSV module. It'll take you to Set up a filter. Label it as Email is not blank.
- In the filter called Email is not blank put {{length(2.clean_email)}} in the first condition field. In the operator box, select Numeric operators: Greater than. In the second condition field, put in 0. Click Save. If your Tools module ID is different, change the 2 in the expression above to reflect that.
This condition passes through the row if the trimmed email has at least one character. So a rejected row will stop at this path (see Make's filter documentation (opens in a new tab)). It will fail if email has only spaces (in the row).
Watch out
Just because there is a nonblank email doesn't mean it's a good contact. Notice this recipe keeps the double Ada email and 'not-an-email'. Make sure to check for duplicates, good email address, missing fields and OK to contact folks before importing. Save original file for reviewing rows that are skipped.
4. Rebuild one CSV with named columns
- Open Create CSV (advanced), in Source Module select CSV - Parse CSV [1] to get all accepted rows in one run of parser.
- Next to Data structure click "Add". Give it a name: Customer export text columns. Now use "Add item" to add contact_id display_name email and segment (in that order). Make sure you set all Type's to Text. Save your structure.
- Map contact_id in your map to contact_id in the parser. Map the other three fields to clean_name, clean_email, clean_segment in tools.
- Set "Include headers in first row" to "Yes". Use comma delimiter. Newline should be LF.
- Open Show advanced settings Enter nothing in Group by and tick Stop processing after an empty aggregation Save module and then click on the scenario toolbar Save If you get a warning from Make about not using the final module's data, then click Save anyway.
Text columns keeps the example ID. If there are no rows that pass the filter then empty aggregation setting (opens in a new tab) is important.
5. Check the result before using it
- Press the Run once button. The last module will generate CSV text for you to examine. If Make alerts you that the last module data is not being used, select Run anyway.
- In the bubble above the last CSV module (result), look at the text in Bundle 1 (under the Output).
- Please verify the result. There are 5 rows in input, and 4 rows (plus header) in data.
"contact_id","display_name","email","segment"
"001","Ada","ADA@example.com","vip"
"002","Bob, Jr.","bob@example.com","regular"
"004","Ada","ADA@example.com","vip"
"005","Taylor","not-an-email","new"
No 003 in there. The comma is still in Bob's name in quotes. Still two Ada's. Still invalid address in Taylor.
Just copy text part of it to a plain text file. Save it as UTF-8 and give it .csv extension. Before you go further make sure header names, fields to be filled and import preview is as expected at your destination. This tutorial is not about importing contacts or appending. This tutorial is not about testing some CRM.
Excel can drop the leading zero if you import a CSV, even if Make is sending out 001. First open the original CSV in a text editor. If you want to import it into Excel, go by Microsoft's guide to importing text (opens in a new tab) and import contact_id as Text before opening the sheet. You can't just change the format after they're gone; you have to re-import the original CSV.
For larger files you're going to have more row processing credits. On Make's Free plan (opens in a new tab) they give you 1,000 credits / month. Check your balance before rerunning. Rules on credits (opens in a new tab) to understand how your use of module operations factors in. Keep this practice scenario in a non-active state, run manually.
If your output differs
If you're getting Number of columns on line 2 does not match header from Make, check the delimiter and number of fields in row 2.
If you've an empty email in each row and Stop processing after an empty aggregation is turned on, you won't get any csv text. Go check the inspection results of the current run. Review its inputs and see the actual results of the existing filter (rows that did pass through that filter). If your formulas are represented as a text or you have blank fields, re-select those relevant fields from the mapping panel and review the module ids. Save the module and scenario before the next run. You can try practising cleaning those 5 fictional rows (without even going to customer data). Start with Make Free (opens in a new tab). That'll create CSV text for inspection. It won't import any contacts and won't append any records. Take a look at the output and remaining credits. Keep the practice scenario's scheduling Inactive.
Sources: Make's CSV module reference (opens in a new tab), with the function, filter, aggregator, plan and credit documentation linked beside the relevant instructions.
Share this post
From holdmytwist.com/blog/make-customer-csv-cleanup/


