How do I get my Gmail Takeout MBOX file (14 GB) into a usable format for HubSpot CRM?

Last month, our team decided to move all customer conversations into HubSpot CRM. Before shutting down my old Gmail account, I exported everything through Google Takeout, thinking the hard part was over.

What I got was a single 14 GB MBOX file. I can’t open it in any email client without it freezing, and I can’t find a way to bring its contents into HubSpot. The file holds years of client emails: pricing discussions, approvals, and project history that my team still needs when they open a contact record. Right now it sits on my desktop as a file nobody can read. I don’t want to lose that history, and I don’t want to copy and paste hundreds of threads by hand.

Has anyone dealt with a large MBOX file from Google Takeout? How did you convert it into a format you could use with HubSpot, or otherwise make those old emails accessible alongside your contact records?

Hi @Logancarter,

There is not a direct way to import the MBOX file into HubSpot. You’ll have to parse the data first, see the below AI generated high-level steps:

Parsing: Don’t try to open the MBOX in a mail client. Instead, use a short Python script with the built-in mailbox module, which reads the file message by message without loading 14 GB into memory. For each message, pull out the date, sender, recipients, subject, and plain-text body, then keep only those where a participant matches a client email already in HubSpot (export your contact list first). That filtering usually shrinks the data dramatically, since newsletters, internal mail, and attachments make up most of the bulk. Write the results to a CSV with a column for the contact’s email, mark each message as incoming or outgoing based on whether you were the sender, and test with a small batch first. If you’d rather skip the API, HubSpot’s import tool accepts emails as an activity type, as long as each one is associated with a record, so that CSV can be uploaded directly.
hubspot

HubSpot API: If you want more control, such as grouping messages by thread or associating emails with deals and companies as well as contacts, you can create email records programmatically through HubSpot’s CRM API. You’d create a private app to get an access token, then loop through your parsed messages and post each one as an email object with its timestamp, direction, subject, and body, plus an association to the matching contact. Check HubSpot’s current API docs for the exact property names and batch limits before you start. This route takes more developer effort than the CSV import, but it handles large volumes and complex associations more reliably. Either way, save attachments like signed approvals or pricing PDFs to a shared drive and link to them, since neither method carries files over.

Best regards!

Hi @Logancarter, did you get the archive working after Karsten’s suggestions?

If you’re still stuck, I’d be interested in helping with the conversion as a paid project. I’d start by reviewing a small anonymized sample and clarifying what needs to appear alongside each contact, including attachments. From there, I could give you a scope and price.

Let me know if you’d want help with that, and we can arrange a private way to review the sample.

Thanks,
Corey