App-Sync Blog

How to Backfill Email History into Salesforce After a CRM Migration

Written by JKA | Jul 15, 2026 9:00:00 AM

TL;DR

When teams migrate to Salesforce, contacts and accounts transfer cleanly. Email history from Gmail, Microsoft 365, or IMAP mailboxes does not. Salesforce's native tools capture new email going forward, not historical conversations. A platform-level backfill reads the mailbox directly, matches each email to the right contact and account, and writes native EmailMessage records to the Activity Timeline, as if the history had always been there.

Why Email History Doesn't Survive a Salesforce Migration

A Salesforce migration moves structured data: contacts, accounts, opportunities, and notes from the source system. Email history is not structured data in a CRM export. It lives in mailboxes.

Whether the team is moving from HubSpot, Dynamics, Zoho, or a spreadsheet-based setup, the migration tooling imports what the source CRM exported. Gmail and Outlook didn't export those conversations. They stayed in the inbox.

Salesforce's Activity Timeline starts capturing email from the moment a user connects Einstein Activity Capture or installs a Gmail/Outlook connector. The years of email threads that predated the migration date are invisible to it.

The Native Salesforce Options and Their Limits

Salesforce does have a process for importing EmailMessage records in bulk via the Data Loader, which Salesforce's own documentation covers for migrating emails related to Cases. In practice, this approach has real constraints:

  • It requires Enhanced Email to be enabled in the org (available on Enterprise Edition and above)
  • It handles Cases well, but the manual field mapping for Contact and Account associations is error-prone at scale
  • It requires exporting emails from the mailbox as structured data first, which means a separate extract step before any import
  • Deduplication is manual: without message ID tracking, re-running an import creates duplicates
  • Inline images in email bodies don't render correctly without extra handling

What a Proper Backfill Looks Like

A platform-level backfill skips the export-from-mailbox step. It connects directly to Gmail, Microsoft 365, or an IMAP mailbox, reads the conversation history, matches each email to the right contact and account in Salesforce, and writes it as a native EmailMessage record on the Activity Timeline.

  1. Message ID deduplication. Each email carries a unique source message ID. Tracking these makes it safe to re-run the import without creating duplicates.
  2. Automatic contact and account association. Contacts get created if they don't exist yet. The account gets associated from the contact's company email domain.
  3. Dry runs. Previewing the import before any write reaches Salesforce catches bad associations and noisy senders before they create data quality problems.

Step-by-Step: Backfilling with Historic Email Importer for Salesforce

Historic Email Importer for Salesforce runs a four-step process from mailbox connection to restored Activity Timeline.

Step 1: Connect the mailboxes

Connect Gmail or Microsoft 365 with OAuth (read-only scopes). Or connect any IMAP mailbox with an app password. Up to 10 inboxes per provider connect at once, 30 in total.

Step 2: Choose the scope

Set which inboxes to include, the date range, the contact set, and the import limit. Both the inbox and the Sent folder are covered.

Step 3: Preview the import

Dry runs are always free and show exactly what would land in Salesforce before any write happens. Built-in block categories filter no-reply addresses, marketing and newsletters, notifications, bounces, and postmaster traffic.

Step 4: Run the backfill

The importer writes native EmailMessage records to the correct contact and account Activity Timelines. Inline images are stored as Salesforce Files and linked to the email so they render correctly inside the email body. For large multi-year backfills, auto-continue chains runs automatically until completion.

Credits never expire. Dry runs are always free.

What Gets Imported

  • Email activities on the contact Activity Timeline as native EmailMessage records
  • Contact and account associations, auto-created where they don't exist yet
  • Duplicate prevention via source message IDs
  • Inline images preserved: stored as Salesforce Files and linked to the email body
  • Sender rules: no-reply, system, marketing, bounce, and postmaster addresses blocked by default

Who This Is For

  • Teams migrating to Salesforce from HubSpot, Zoho, Dynamics, or any other CRM
  • Teams building a new Salesforce org for an acquired company or new business unit
  • Teams who already migrated but realized reps are working blind because the history didn't come across

If you're running ConnectWise PSA alongside Salesforce and need recurring revenue (MRR, ARR, TCV) synced natively onto your Opportunities, that's a separate problem addressed by App-Sync PSA Bridge for Salesforce.

A Salesforce org without email history is a new org that forgot why customers stayed. The fix is a scoped, one-time backfill that restores the full picture before the first sales call in the new system.

Start a free trial of Historic Email Importer for Salesforce. Dry runs are always free.