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

# HubSpot

Guide on Integrating Wonderchat with HubSpot

Connect Wonderchat with HubSpot to send the people your agent talks to into HubSpot as contacts. Each contact gets the conversation attached as a note.

You connect HubSpot once for your account, then choose for each agent what it syncs and where each field goes.

| Tool           | What it does                                                                        | Plan            |
| -------------- | ----------------------------------------------------------------------------------- | --------------- |
| Sync Contacts  | Creates a HubSpot contact for each lead or handover, with the conversation attached | Basic and above |
| Get Contact    | Lets the agent read a contact's details by email                                    | Enterprise      |
| Update Contact | Lets the agent update contacts, add tasks and files                                 | Enterprise      |

***

## Step 1: Connect your HubSpot account

1. In Wonderchat, go to **Settings** → **Integrations**. Search for **HubSpot** or find it under **CRM and marketing**.
2. Click **Connect**.

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-26d6be5b9335293ddd24d7ce135a2da271e29e14%2Fsettings-integrations.png?alt=media" alt="The Settings Integrations page with a search box, All and Connected filters and integrations grouped by type"><figcaption><p>Settings → Integrations</p></figcaption></figure>

3. Sign in to HubSpot.

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-0ca8b6b4c3162c0051f3c2bde319c73afa3c319a%2Fimage.png?alt=media" alt=""><figcaption><p>Sign in to your HubSpot account</p></figcaption></figure>

4. Choose the HubSpot account you want to connect.

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-572f5561915dc0770dbe3c39d28d11ef5dd17723%2Fimage.png?alt=media" alt=""><figcaption><p>Sample of HubSpot account selection page</p></figcaption></figure>

5. Click **Connect app** to allow access.

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-65f29a834e50a40428b573e4f640b2fcd741c0a5%2Fimage.png?alt=media" alt=""><figcaption><p>Click on "<strong>Connect App</strong>"</p></figcaption></figure>

HubSpot now shows as connected in **Settings** → **Integrations**. To disconnect later, click **Disconnect** on the same row.

## Step 2: Turn on contact sync for an agent

Connecting doesn't sync anything yet. Turn sync on for each agent that should send contacts:

1. Open your agent's settings and click the **Tools** tab.
2. Under **Add a tool**, click the **CRM** filter.
3. Find **Sync Contacts** (HubSpot) and click **Edit**, or turn on its switch.

<figure><img src="https://3760420285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0WUvfmkdMPXz3x7NXP8i%2Fuploads%2Fgit-blob-3055aba992409f96b328f46d3d05fc0a2dc8e905%2Fhubspot-sync-contacts.png?alt=media" alt="The Sync contacts to HubSpot window with Sync from tiles and the field mapping table"><figcaption><p>Sync contacts to HubSpot</p></figcaption></figure>

### Sync from

Pick where contacts come from. You can pick both.

* **Leads**: contact details the agent collects in chat.
* **Handover forms**: visitors who leave their email for your team.

### Field mapping

The mapping shows each field the agent collects and the **HubSpot property** it fills. It's grouped by **Lead form**, **Handover form** and **Visitor details**.

* Email, name and phone number always go to the matching HubSpot properties. A name splits at its first space: the first word goes to First name, the rest to Last name.
* For each custom field, pick a HubSpot property. Wonderchat suggests a matching property where it finds one.
* Fields without a matching property go to the **Message** property.
* Under **Visitor details**, you can send the visitor's country (from their IP address) to a property. It's off until you pick one, and it only fills new contacts.

Click **Save and turn on sync** (or **Save** if sync is already on).

When you add a new lead or handover field later, the Sync Contacts row shows **fields to review**. Open it, check the suggested property and save.

## Step 3: Test it

Open your agent, leave your details in the chat (or submit the handover form) and check that the contact appears in HubSpot with the conversation attached as a note.

***

## Additional Guidance: How to Sync HubSpot Contacts

{% content-ref url="/pages/9eNIr8z3sUq9JW6daTeA" %}
[Adding Wonderchat Tags to HubSpot](https://docs.wonderchat.io/integration-guides/hubspot/adding-wonderchat-tags-to-hubspot.md)
{% endcontent-ref %}

***

If you have any more questions, feel free to reach out to us at <mark style="color:purple;">**<support@wonderchat.io>**</mark>
