> For the complete documentation index, see [llms.txt](https://docs.spara.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.spara.com/guides/integration-guides/connecting-hubspot.md).

# Connecting HubSpot

How to connect Spara to HubSpot and configure lead syncing.

This guide walks you through connecting Spara to HubSpot so that lead conversations and field data sync automatically to your CRM.

For a full feature reference, see [Hubspot (CRM)](https://docs.spara.com/integrations/crm-integrations/hubspot-crm).

## What Syncs

Once connected, Spara can:

* Write conversation data and field values to matching HubSpot Contacts (Push)
* Create new HubSpot Contacts when no match is found
* Import existing HubSpot Contacts into Spara as Leads (Import)

{% stepper %}
{% step %}

#### Navigate to Integrations

Go to [**Settings > Integrations**](https://app.spara.co/settings/integrations) and find the HubSpot card. Click **Authorize**.

{% hint style="info" %}
You need Manager or Integrator permissions to connect integrations. See [User Management](https://docs.spara.com/platform/settings/user-management) for role details.
{% endhint %}
{% endstep %}

{% step %}

#### Authorize with HubSpot

You'll be redirected to HubSpot to grant Spara access. Log in with an account that has admin or integration permissions. The connection is established automatically; no additional configuration is required in HubSpot.
{% endstep %}

{% step %}

#### Turn on sync

On the **Contacts** tab:

* **Sync Contacts** (top of the tab): turn on to sync linked HubSpot Contacts both ways according to your write rules; turn off to stop all Contact sync
* **Create & update** or **Update only** (under **Writing to HubSpot Contacts**): choose whether Spara creates a Contact when no existing one matches by email address, or only updates existing Contacts
  {% endstep %}

{% step %}

#### Map fields

Under **Fields synced to/from CRM**, set up field mappings between Spara Lead fields and HubSpot Contact properties. For each mapping:

1. Choose a **Spara Lead Field** (e.g., First name, Company, or any custom field)
2. Choose the corresponding **HubSpot Contact Field**
3. Set the **Write rule**: overwrite existing values, or only write when the field is empty

For a full list of available Spara fields, click **View your Data Model** within the HubSpot settings page, or go to [**Data Model**](https://app.spara.co/data-model).
{% endstep %}

{% step %}

#### Save and verify

Click **Save** to activate the connection. New lead activity will begin syncing to HubSpot immediately.

To verify, have a test lead interact with your Spara agent and check that a corresponding Contact appears or is updated in HubSpot.
{% endstep %}
{% endstepper %}

## Troubleshooting

### Reconnection required

If the HubSpot card shows "Reconnection required," Spara's access token has expired. Go to [**Settings > Integrations > HubSpot**](https://app.spara.co/settings/integrations/hubspot/manage), click **Deauthorize**, then authorize again.

### Disconnecting

To disconnect HubSpot, go to [**Settings > Integrations > HubSpot**](https://app.spara.co/settings/integrations/hubspot/manage) and click **Deauthorize**. Your field mappings are preserved if you reconnect later.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.spara.com/guides/integration-guides/connecting-hubspot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `build a script that syncs our docs to a CMS` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
