How to combine HubSpot and Trello data into one CSV
If you keep your CRM in HubSpot and your client work in Trello, sooner or later someone asks for "one sheet with everything for this client." The two tools export very different files. This guide shows how to get both exports, give them a shared column layout and stack them into one CSV you can open in any spreadsheet.
Step 1: Export from HubSpot
HubSpot lets you export records from any list view (HubSpot's export guide):
1. Go to CRM > Contacts (or CRM > Deals). In some accounts you open More first.
2. Open the view you want. All contacts exports every record, and a saved view exports only its filtered records.
3. Click Export at the top right of the table, choose CSV, and pick whether to include all properties or only the columns in the view.
4. HubSpot emails you a download link.
You need export permissions in HubSpot to do this. Do contacts and deals as two separate exports, because they have different columns.
Tip: Choose "properties in view" and set up the view's columns first. An all-properties export can run to hundreds of columns, and most of them will be empty.
Step 2: Export from Trello
According to Atlassian's Trello export documentation, CSV export is only available for boards in Premium Workspaces. Every board member can export JSON.
- Premium: open the board menu and go to More > Print and Export > Export as CSV.
- Not Premium: export JSON from the same menu and convert it (see the script at the end).
Two details to know:
- The CSV leaves out comments.
- Since January 2024 the CSV includes only visible cards. Atlassian's article explains how to get archived cards back by changing the export URL.
Step 3: Decide on one column layout
This step decides whether the merge works. Write down a fixed set of columns before you open any file, for example:
| Column | From HubSpot contacts | From HubSpot deals | From Trello |
|---|---|---|---|
| source | "hubspot_contact" | "hubspot_deal" | "trello_card" |
| name | First + Last Name | Deal Name | Card Name |
| email | Email | (empty) | (empty) |
| stage | Lifecycle Stage | Deal Stage | List Name |
| amount | (empty) | Amount | (empty) |
| owner | Contact owner | Deal owner | Members |
| due_or_close | (empty) | Close Date | Due Date |
| updated | Last Modified Date | Last Modified Date | Last Activity Date |
The exact header text differs from account to account (custom properties, language settings, older exports), so check your real header row against the table.
Step 4: Map each file to the layout
In Google Sheets or Excel:
1. Make a sheet called combined and type in your fixed header row.
2. Paste each export into its own tab.
3. In combined, fill each column from the matching source column. You can reference it, for example =contacts!C2, or copy and paste whole columns in the right order.
4. Fill the source column for every row so you can always filter by origin.
5. Leave a cell empty when the source has no matching field. Don't make up a value.
If you'd rather script it, here is a minimal Python version:
`python
import csv
LAYOUT = ["source","name","email","stage","amount","owner","due_or_close","updated"]
MAPS = {
"hubspot_contact": {"email":"Email","stage":"Lifecycle Stage","updated":"Last Modified Date"},
"hubspot_deal": {"name":"Deal Name","stage":"Deal Stage","amount":"Amount","due_or_close":"Close Date"},
"trello_card": {"name":"Card Name","stage":"List Name","due_or_close":"Due Date"},
}
FILES = {"hubspot_contact":"contacts.csv","hubspot_deal":"deals.csv","trello_card":"trello.csv"}
with open("combined.csv","w",newline="",encoding="utf-8") as out:
w = csv.DictWriter(out, fieldnames=LAYOUT)
w.writeheader()
for src, path in FILES.items():
with open(path, newline="", encoding="utf-8-sig") as f:
for row in csv.DictReader(f):
rec = {c: "" for c in LAYOUT}
rec["source"] = src
for col, header in MAPS[src].items():
rec[col] = row.get(header, "")
w.writerow(rec)
`
Adjust the header names in MAPS to match your files. HubSpot contact exports usually split first and last name, so join them if you need a full name.
Common pitfalls
- Byte-order marks. Some exports begin with an invisible BOM, so the first header doesn't match. Opening the file with
utf-8-sig(as in the script) handles this. - Date formats. HubSpot and Trello may format dates differently. Pick one format, such as
YYYY-MM-DD, before you sort or filter. - Silent column drift. A renamed property or a new custom field changes the header row, and a copy-paste merge then fills the wrong column without any warning. Check the headers every time.
- Multi-value fields. Trello labels and members can hold several values in one cell. Leave them as one delimited cell rather than splitting them into rows.
- Per-client mixing. If you serve several clients, keep one combined file per client and put the client name in the filename.
A faster option
We make Sundayfile, which handles steps 3 and 4 for you. You drop in a HubSpot contacts CSV, a HubSpot deals CSV or a Trello board CSV, and it detects the type from the header row and maps common column names to one fixed set of columns. Unknown columns are dropped and missing ones stay empty. You get a preview, then a download named client-type-date.csv. It keeps a separate workspace for each client. You still run the exports yourself, because it doesn't connect to HubSpot or Trello.