> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getsales.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Set up the HubSpot integration

> Connect a HubSpot account to GetSales, choose what syncs, send people from your tables, read HubSpot segments, and disconnect or uninstall the app.

The HubSpot integration keeps a HubSpot account and your GetSales workspace in step:

* **Segments become table sources.** A HubSpot segment fills a table with its contacts, keeps them in sync on a schedule, and brings the contact properties you choose as columns of their own.
* **People and companies go to HubSpot.** A Send to CRM column creates or updates a HubSpot contact or company for every row, with the fields you map.
* **Outreach lands on the contact's timeline.** LinkedIn messages and connection requests, emails and AI SDR hand-offs are logged on the contact as they happen, with their words and the sender profile that sent them.
* **A status moves with the conversation.** A contact property of yours, such as Lead Status, moves forward as a request is sent, accepted, a message goes out or the lead replies, and the AI SDR's class of a reply can land on a property too.

Everything is set up from GetSales. Nothing is installed in HubSpot by hand.

## Before you start

* A GetSales workspace, and a role that can manage integrations in it.
* A HubSpot account where you are a super admin, or where your admin lets users install apps.
* For segments: HubSpot's lists access (asked for when you connect). For emails on the timeline: HubSpot's email access, which the account's admin allows first (see [Allow optional access](#allow-optional-access)).

## Connect a HubSpot account

1. Open [https://app.getsales.io/settings/integrations](https://app.getsales.io/settings/integrations) and pick **HubSpot**.
2. Click **Connect portal** (or **Connect another portal** when one is already connected).
3. HubSpot asks which account to connect. Choose it and click **Choose Account**.
4. Review the access GetSales asks for (listed below), keep the optional items you want, and click **Connect app**. If HubSpot asks you to confirm that you trust the app, follow its prompt.
5. HubSpot sends you back to GetSales, and the account appears under **Portals** with the status **On**.

Connect within 15 minutes of clicking Connect portal. A link that waited longer is refused, and you start again from step 2.

Connecting the same HubSpot account again from the same workspace updates its connection instead of adding a second one.

### What GetSales can access

| Access | Why GetSales asks for it |
| - | - |
| `oauth` | Tells GetSales which HubSpot account it is connected to. |
| `crm.objects.contacts.read`, `crm.objects.contacts.write` | Finds the contact for a lead, creates or updates it, and logs messages, requests, emails and notes on it. |
| `crm.objects.companies.read`, `crm.objects.companies.write` | Finds and writes the company of a row sent from a company table. |
| `crm.schemas.contacts.read`, `crm.schemas.companies.read` | Reads your contact and company properties, so you can map fields and statuses to them. |
| `crm.lists.read` (optional) | Reads your segments and their members, for the CRM segment source. |
| `sales-email-read` (optional) | Logs emails sent and received on the contact's timeline. |

### Allow optional access

HubSpot offers an optional access item only after the account's admin has allowed it for the app. Until then its box on the consent screen is locked, and the connection works without it:

1. In HubSpot, open **Settings**, then **Integrations**, then **Connected apps**, and open **GetSales.io**.
2. Open **Data Permissions** and turn on the optional items you need: contact lists for segments, one-to-one emails for emails on the timeline. Click **Save changes**.
3. Connect the account again from GetSales (steps 2 to 5 above) and keep the items ticked.

## Choose what syncs

### Activity on the timeline

Under **Activity sync** on the HubSpot card in Settings, each switch starts logging from the moment it is turned on. Nothing that happened before is written.

* **Log messages to the timeline**: LinkedIn messages your sender profiles send and receive, with their words.
* **Log emails to the timeline**: emails sent and received, each with its subject and words. GetSales turns this on only when HubSpot has given it email access. If it has not, the switch says what to allow and stays off.
* **Log connection requests**: a connection request sent, with its note, and its accept.
* **Log AI SDR hand-offs**: a hand-off from the AI SDR lands as a note on the contact, when GetSales already knows the lead's HubSpot contact from an earlier message or request, a Send to CRM column or a segment. A hand-off of a lead with no known contact is skipped.

A lead is matched to a contact the same way as in Send to CRM below. An event of a lead who matches no contact is not written, and it shows under **Recent failures**.

### Status and dates

Click **Set up** next to **Status and dates** on the HubSpot card (the button reads **Edit** once something is mapped):

* **Status property**: the contact property that follows the conversation, such as Lead Status. For each event (connection request sent, connection accepted, message sent, replied) pick the value it sets, or leave it as is.
* The status only moves forward, in the order of the events. A value someone set by hand that is not one of the mapped values stays. **Also replace** lists the values GetSales may replace, such as New.
* **Date goes to**: a date property that takes the moment of each event.
* **Reply class property**: a property that takes the AI SDR's class of a lead's reply (interested, meeting request, not now and the others), each class mapped to a value of yours.
* **LinkedIn link**: the property where your account keeps a contact's LinkedIn profile, so a lead can be found by it.

### Send people and companies to HubSpot

Add a **Send to CRM** column to a table and pick the HubSpot account under **Send to**:

* **Matching**: a person is found by the HubSpot contact id they already hold, then by their LinkedIn profile, then by their work email or personal email. When none of these finds a contact, a new one is created from the row's name or email. A company is matched by its domain.
* **Field mapping**: each HubSpot field you add gets its value from the row, written per row. Type `/` in a value to insert a column of the table. Only mapped fields are written.
* **Send new rows**: when on, every row that lands in the table is sent as it arrives. When another column of the row is still filling its name or email, such as an enrichment, the send waits for it.

Run the column on the rows you choose to send them at once. The cell shows the HubSpot record it wrote, or why HubSpot refused it.

### Read a HubSpot segment into a table

In a table, open **Data sources** and choose **CRM segment**:

1. Under **CRM account** pick the HubSpot account, then type under **Segment** to find the segment by name.
2. Under **Sync**, choose every hour, every day or every week. Contacts added to the segment are added to the table. Contacts removed from it leave the table's campaigns.
3. Under **Columns from HubSpot**, add up to 25 contact properties, each with a column name of your own. Name, email, company, title and LinkedIn profile always come. A mapped property's value wins over enrichment and follows HubSpot on every sync.

**Sync now** reads the segment at once.

## Use it

* **Automated:** rows are sent as they arrive when Send new rows is on, activity is logged as it happens, statuses and dates move with each event, and segments sync on their schedule.
* **Manual:** run a Send to CRM column on chosen rows, or click Sync now on a segment source.
* **See what happened:** a lead's card shows a **CRM** section with the HubSpot contact the lead was matched to, how it was found, a link to it, and the lead's recent HubSpot calls with each failure's reason. The HubSpot card in Settings lists the account's recent failures.

## Disconnect

On the HubSpot card in [https://app.getsales.io/settings/integrations](https://app.getsales.io/settings/integrations), open the account's actions and click **Delete**:

* Every sync of that account stops: no more rows sent, activity logged or segments read.
* GetSales deletes its copy of the access. HubSpot gives one access per HubSpot account to every GetSales workspace connected to it, so the app stays installed in the account; to remove it there too, uninstall it as described below.
* What is already written stays: contacts, companies, notes and timeline records in HubSpot, and people, rows and column values in GetSales.
* Connecting the same account again after a Delete makes a new connection with no settings: turn its switches on and set Status and dates again, pick it in each Send to CRM column, and create its sources again. A source of the deleted connection stops as Failed and keeps its people.

## Uninstall from HubSpot

To remove the app from the HubSpot account itself, follow HubSpot's guide at [https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot): **Settings**, **Integrations**, **Connected apps**, then **Uninstall** on GetSales.io.

After an uninstall GetSales can no longer read or write that account. The connection shows as needing attention in Settings, and segment sources of that account stop syncing. Records already written in HubSpot and data already in GetSales stay.

## Troubleshooting

* **"Not created: HubSpot needs a name or an email for a new contact."**: the row matched no contact and the column sends neither an email nor a name. HubSpot gets only the fields you map: map First name or Last name under **Field mapping**, or give the row an email, then run the cell again.
* **Segments say the account was connected before segments could be read**: allow lists access (see [Allow optional access](#allow-optional-access)) and connect again.
* **Log emails will not turn on**: allow email access for GetSales.io in HubSpot's Data Permissions, then connect the account again.
* **The account needs attention**: HubSpot refused its access, often after an uninstall or a removed user. Connect it again.

Questions: [support@getsales.io](mailto:support@getsales.io).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.