Back to HubSpot in Excel
SheetXAI logo
HubSpot logo
HubSpot · Excel Guide

Bulk-Associate HubSpot Contacts With Companies From an Excel Workbook

The Scenario

You are a CRM admin. A data import last month created 200 contact records without company associations. The contacts are in HubSpot but they are floating, unlinked, which means account-based views are wrong and the sales team cannot filter by company.

You have an Excel workbook with the contact ID / company ID pairs in the Associations tab: column A is the HubSpot contact ID, column B is the HubSpot company ID.

The sales team needs the associations fixed before their Friday QBR.

The bad version:

  • You open the first contact in HubSpot, click the company association section, search for the company, and link it
  • You move to the next contact and repeat
  • Two hundred contacts at four minutes each is over thirteen hours
  • Friday arrives and 80 contacts are still unlinked.

The fast version is one prompt.

The Easy Way: One Prompt in SheetXAI

SheetXAI reads the Associations tab and creates every contact-to-company link in HubSpot without you opening a single contact record.

Open the SheetXAI sidebar and type:

For each row in the Associations tab, create a HubSpot association between the contact ID in column A and the company ID in column B using the standard contact-to-company association type. Write "ASSOCIATED" to column C for success, or the error message for any row that fails.

SheetXAI reads all 200 rows, calls HubSpot's associations API for each pair, and writes the result to column C.

What You Get

A workbook with column C populated in the Associations tab and 200 HubSpot contacts linked to their companies:

  • "ASSOCIATED" — for every pair that linked successfully
  • Error message — inline, for any pair where the association failed
  • Accurate account views — the sales team can filter contacts by company

The inline status makes the batch auditable. If 12 of 200 fail because a company ID is wrong, column C shows you exactly which rows need a second look.

What If the Data Is Not Quite Ready

Relationship mapping workbooks from imports are often incomplete or misaligned.

When some IDs are wrong or the records have been deleted

A few rows reference IDs that no longer exist in HubSpot.

For each row in the Associations tab, verify that both the contact ID in column A and company ID in column B exist in HubSpot before creating the association. If either is missing, write "SKIPPED — ID NOT FOUND" to column C.

When you need to associate deals with companies in the same pass

The import also left deal records unlinked. Column D has deal IDs.

For each row in the Associations tab, create a contact-to-company association between column A and column B. If column D is not blank, also create a deal-to-company association between column D and column B. Write status to column C and deal association status to column E.

When you also need to set the primary company for each contact

You want the linked company marked as the contact's primary company, not just associated.

For each row in the Associations tab, create a HubSpot association between the contact ID in column A and the company ID in column B, and mark the company as the contact's primary company. Write status to column C.

When the mapping needs to be derived from email domains

You do not have company IDs. You have contact emails in column A and company domains in column B.

For each row in the Associations tab, find the HubSpot contact matching the email in column A. Find the HubSpot company matching the domain in column B. Create a contact-to-company association. If the company does not exist, create it using the domain as the company name. Write contact ID, company ID, and status to columns C, D, and E.

The pattern: the mapping workbook drives the operation. SheetXAI creates every association in one pass and the status column tells you what worked.

Try It

Get the 7-day free trial of SheetXAI and open any Excel workbook of HubSpot contact ID / company ID pairs, then ask it to create the associations. The HubSpot integration is included in every SheetXAI plan. For related workflows, see how to bulk-create HubSpot companies from an account list in Excel or the HubSpot in Excel overview.

Stop memorizing formulas.
Tell your spreadsheet what to do.

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

Learn more