Back to HubSpot in Google Sheets
SheetXAI logo
HubSpot logo
HubSpot · Google Sheets Guide

Deduplicate HubSpot Contacts by Merging Pairs From a Google Sheet

2026-05-13
4 min read
See the Excel version →

The Scenario

You are a CRM admin. An enrichment tool just finished its run. The output is a Google Sheet with 90 rows, two contact IDs per row, column A is the primary contact to keep and column B is the duplicate to merge in.

Your database has been accumulating duplicates for two years. The sales team has complained about it every quarter. The head of sales has set a deadline:clean by end of this sprint.

The slow version:

  • You open HubSpot's merge contacts tool and search for the first contact ID
  • You paste in the secondary ID and confirm the merge
  • You move to the next row and repeat
  • At eight merges per hour, this takes eleven hours across two days
  • You finish two days after the sprint ends.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI reads your duplicate pairs sheet and merges every pair in HubSpot, with status written back per row.

Open the SheetXAI sidebar and type:

For each row in this sheet, merge the HubSpot contact in column B into the primary contact in column A. Write "MERGED" to column C if successful, or the error message if the merge fails.

SheetXAI reads all 90 rows, calls HubSpot's merge API for each pair, and writes the result back into column C. You can see the outcome for every pair without opening HubSpot once.

What You Get

A sheet with column C populated across all 90 rows:

  • "MERGED" — for every pair that combined successfully
  • Error message — inline, for any pair where the merge failed (usually because one ID no longer exists)
  • A clean CRM — 90 fewer duplicate records, with activity and notes consolidated on the primary

The inline status beats the alternative. If you had done this manually and a merge failed halfway through, you would not know which ones completed and which ones did not. Column C tells you the exact state of every pair.

What If the Data Is Not Quite Ready

Enrichment tool outputs are not always in the right format or completeness level for a bulk merge.

When some contact IDs in the sheet are no longer valid

The enrichment tool identified the duplicates two weeks ago and some contacts have been deleted since.

For each row, check whether both contact IDs in columns A and B still exist in HubSpot before merging. If either ID is missing, write "SKIPPED — ID NOT FOUND" to column C instead of attempting the merge.

When you want to review before merging

You want to see the contact details for each pair before committing to the merge.

For each row, fetch the name, email, create date, and last activity date for both contact IDs (column A and column B) and write them into columns D through K so I can review the pairs. Do not merge yet.

When you need to identify new duplicates in addition to merging the known ones

Beyond the 90 identified pairs, you want to flag additional potential duplicates by email domain.

Merge the pairs in columns A and B as instructed. Then search HubSpot for contacts with more than one record sharing the same email domain as each company in column D. Write the duplicate count and oldest contact ID to columns E and F for review.

When the full cleanup needs to happen in one operation

Merge the known pairs, flag the newly identified potential duplicates, and update the primary contacts' lifecycle stages to reflect the consolidated record.

For each row, merge the contact in column B into the primary in column A. After merging, update the primary contact's lifecycle stage to column C if the value is not blank. Write merge status to column D and lifecycle update status to column E.

The pattern: the enrichment output is the input. SheetXAI merges, flags, and updates in a single pass.

Try It

Get the 7-day free trial of SheetXAI and open any sheet of HubSpot duplicate contact pairs, then ask it to run the merges. The HubSpot integration is included in every SheetXAI plan. For related workflows, see how to bulk-update HubSpot contact properties or the HubSpot in Google Sheets overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

Join 4,000+ professionals saving hours every week with SheetXAI.

Learn more