Historic Email Importer for HubSpot documentation
These sections cover the full workflow, from connecting a mailbox to large, resumable multi-provider backfills.
Getting started
Historic Email Importer for HubSpot backfills past email into HubSpot as native email engagements, then creates and associates the contacts and companies that history implies. The whole flow is four steps: connect a mailbox, choose what to import, run a free dry run to preview, then start the real import.
Connect at least one mailbox on the Setup tab. Gmail and Microsoft / Outlook connect with a read-only OAuth sign-in. Any other provider, such as Yahoo, iCloud, Zoho, Fastmail, or cPanel hosting, connects over IMAP with an app password. You can connect several inboxes at once, including several accounts of the same provider; each shows as its own row on the Setup tab, and Connect another inbox adds the next one.
No mailbox you can connect? On the Imports tab, Mailbox file (MBOX) takes a file exported from Thunderbird, Apple Mail, or Google Takeout instead. See Importing an MBOX file below.
On the Imports tab, pick the inbox, set a date range and a per-run maximum, and choose whether to auto-create contacts and companies. Leave Dry run on and click Run to preview exactly what would be written to HubSpot. A dry run uses no credits.
When the preview looks right, turn Dry run off and run the real import. Turn on Auto-continue to let large multi-year backfills finish on their own. Your credit balance and every job's progress stay visible in the app.
Connecting Gmail
On the Setup tab, click Connect under Gmail. You are sent to Google's standard OAuth consent screen to sign in and approve access.
The app requests a single, read-only scope: gmail.readonly. It can read your mail in order to import it, and it cannot send, delete, or change anything in your mailbox.
After you approve, you return to HubSpot and the Gmail inbox shows as connected and healthy. You can then configure an import for it on the Imports tab.
To add another Gmail inbox, click Connect another inbox on the Gmail card. Google shows its account chooser so you can pick a different account, and the new inbox appears as its own row with its own health status.
To disconnect, use the Disconnect button in the app, or revoke access at any time from your Google Account under Security, in Third-party access. Disconnecting stops future imports. Email already imported into HubSpot stays in HubSpot.
Connecting Outlook and Microsoft
On the Setup tab, click Connect under Microsoft / Outlook. You are sent to Microsoft's OAuth sign-in for your Outlook.com or Microsoft 365 account.
The app requests read-only mail access (Mail.Read) plus offline_access, which lets it refresh its own session so a long backfill can keep running without you signing in again. It cannot send or change mail.
If your organization requires administrator approval for third-party apps, a Microsoft 365 admin may need to approve the connection before it completes. That requirement comes from your tenant's policy, not from the app.
After approval the inbox shows as connected. Disconnect from the app at any time, or revoke access from your Microsoft account settings under app permissions. Email already imported into HubSpot stays in HubSpot.
Connecting an IMAP mailbox
Any mailbox that is not Gmail or Microsoft connects over IMAP: Yahoo, iCloud, Zoho, Fastmail, cPanel hosting, and most corporate or self-hosted servers.
Click Connect under Other (IMAP) and fill in the host, port, username (usually your full email address), and an app password. Preset buttons autofill the common providers: Yahoo (imap.mail.yahoo.com), iCloud (imap.mail.me.com), Zoho (imap.zoho.com), and Fastmail (imap.fastmail.com), all on port 993 with TLS on.
Use an app password, not your normal login password. Most providers require one when two-factor authentication is on. Generate it in your mail provider's account-security settings (for example, Yahoo Account Security, Apple ID app-specific passwords, Zoho application passwords, or Fastmail app passwords), then paste it into the App password field. The eye button reveals what you pasted so you can check it.
Leave Use TLS/SSL on for port 993, which is the standard for every provider above. If a connection fails on that setting, the app retries automatically with TLS flipped and keeps whatever connects, so a wrong toggle is usually corrected for you. Your app password is encrypted at rest and is only ever used to read mail.
To import one folder instead of Inbox and Sent, choose A specific folder as the Mailbox on the Imports tab, then pick it from the list of your mailbox's real folders. Only that folder is imported.
Importing an MBOX file
Use an MBOX file when the mail can't be connected: an archive exported when someone left, a mailbox whose provider won't issue an app password, or an account nobody can sign in to any more. Thunderbird, Apple Mail (Export Mailbox), and Google Takeout all produce MBOX files. Thunderbird files often have no extension; that is fine.
On the Imports tab, scroll to Mailbox file (MBOX) and click Upload a file, then Open upload page. Choose the file and wait until the page says it is ready. Files up to 100 MB are accepted. Emails deleted in Thunderbird but still inside the file are left out automatically.
Back in HubSpot, the file shows as Ready with its email count and date range. Enter your own email address (up to five, separated by commas) and click Save email address. That is how the importer tells the emails you sent from the ones you received, so each one lands on the right contact.
Run a dry run first; it is free. Then click Import. Each run handles up to your Max emails per run, and Auto-continue keeps going until the whole file is done. Emails keep their original dates, are matched to contacts the same way as a connected inbox, and each imported email uses one credit. Uploading the same file again never imports an email twice.
The file is encrypted while it is stored, and deleted from our servers once the import has finished, when you delete it, or 7 days after upload at the latest.
Choosing scope and date range
Each import is scoped so you bring in only what you want and spend credits only on that.
Inbox: pick which connected mailbox to import from. The selector lists every connected account by provider and address, so two Gmail inboxes are two separate choices. If you have several connected, you run one import per inbox, and re-running never duplicates.
Date range: set a From and To date. There is no cap on how far back you can go; the range is limited only by what the mailbox still holds.
Max emails per run: caps how many messages a single run processes, up to 1,000. A run works through multiple pages of the mailbox until it hits this cap or an internal time limit, whichever comes first. For backfills larger than one run, turn on Auto-continue or simply run again. A saved resume point means the next run continues where the last one stopped rather than re-scanning.
Auto-create contacts and Auto-create and associate companies decide whether the import creates the people and companies an email implies, or only logs email onto records that already exist. Generic, promotional, and system senders, such as no-reply and mailer-daemon addresses, are skipped by default unless you allow them in the rules.
Dry run mode
A dry run previews an import without writing anything to HubSpot. Leave Dry run on before you click Run.
The preview shows what the real import would do: how many messages match your range, and which contacts and companies would be created or updated. Nothing is created, no email is logged, and no association is made.
Dry runs are always free and never count toward your credits, so you can run as many as you like to size a backfill before committing. When the preview looks right, turn Dry run off and run it for real.
Job history and recovery
Every import is tracked as a job with its status, counts, and date range on the Activity tab.
Re-running is safe. The app records the source message ID of everything it imports, so running the same range again skips messages that are already in HubSpot instead of creating duplicates.
Large backfills resume. Each provider keeps a resume point (Gmail and IMAP track their position in the mailbox, and Microsoft uses a delta cursor), so a run that stops at its per-run limit continues from where it left off rather than starting over. Turn on Auto-continue to chain those runs automatically until the range is done, your credits run out, or you cancel.
Cancelling stops the whole chain at once. Email already imported stays in HubSpot; only further importing stops.
Security and your data
Read-only by default. Gmail and Microsoft connect with read-only scopes (gmail.readonly, and Mail.Read with offline_access). IMAP connects with an app password used only to read mail. The app never sends, deletes, or changes anything in your mailbox.
What the app stores. It does not keep the content of your emails, with one exception: a mailbox file (MBOX) you upload to import is encrypted at rest and deleted once its import finishes, or 7 days after upload at the latest. On its own side it stores only what it needs to work: a record of which messages were imported (used to prevent duplicates), each import job and its resume point, your connection credentials, and your settings and sender rules. Your IMAP app password is encrypted at rest, and Gmail and Microsoft connections use OAuth tokens you can revoke at any time. Each connected HubSpot account's data is kept isolated.
Deleting your data. The Maintenance tab has a Delete all imported data control that wipes the app's stored data for your portal: the imported-message record, job history, resume cursors, connection tokens, settings, and any uploaded mailbox files. It does not touch HubSpot, so the email engagements, contacts, and companies already in your CRM stay there. Purchased credits are kept.
Uninstalling. Removing the app from HubSpot revokes its access immediately, and importing stops. If you also want the data the app stored on its side removed, run Delete all imported data before you uninstall.
For company-wide privacy, security, and AI details, see the Trust and Security page at app-sync.com/trust.
Troubleshooting
An import looks stuck or stopped early. A single run is bounded by your per-run maximum and an internal time limit, so it can stop before a large range is finished. That is expected. Run it again, or turn on Auto-continue, and it resumes from where it stopped.
Too many contacts or companies were created, or the wrong ones. Check the allow and block lists in the rules. By default the app skips generic, promotional, and system senders, but a noisy mailbox can still surface unexpected addresses. Turn off Auto-create contacts or Auto-create companies to log email only onto records that already exist.
You ran out of credits. Real imports stop when your balance reaches zero, while dry runs stay free. Buy a credit pack to continue; credits are additive and never expire, and a paused backfill resumes from its cursor once you have a balance.
An IMAP mailbox will not connect. Use an app password, not your account login password, and confirm the host and port (993 with TLS on for the presets above). If you pasted a full URL into the host field, use just the server name. The app retries the TLS setting automatically, so a wrong toggle is usually corrected for you.
Duplicates appeared after re-importing. For a normal re-run this should not happen, because imports are de-duplicated by source message ID. It can happen only if you deleted the app's data, which clears the record of what was already imported, and then re-imported the same range.
API reference (planned)
A public API for triggering imports programmatically is on the roadmap and is not available today. For now, every import is run from the app inside HubSpot.
If scheduled or programmatic imports would help your team, tell us through the contact form. It helps us prioritize what to build next.