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

# HubSpot

> Connect HubSpot to Julian and subscribe contacts to calls when the Agent Identifier changes.

Julian connects to HubSpot through Ampersand. It reads contact records, watches for changes to your chosen Agent
Identifier property, and can write call results back to HubSpot. This guide covers the HubSpot setup. For field mapping
and workflows in Julian, see the [CRM overview](https://docs.julian.11x.ai/crm-integrations.md).

## Before you start

Use a **HubSpot Super Admin** to connect the integration and create the private app for contact subscriptions. HubSpot
requires this role to install an app and access private apps. You do not need to assign a separate set of user
permissions for this setup.

Julian's HubSpot subscription watches **Contacts**. Ampersand lists a Sales Hub seat as an additional requirement only
when an integration accesses HubSpot **Leads**. That requirement does not apply to this contact subscription.

Create a contact property for the **Agent Identifier**. Julian uses its value to choose the agent and workflow for a
contact. The property also drives the HubSpot subscription that notifies Julian when its value changes.

**Select the same contact property in both places.** The mapping in Julian tells Julian where to read the Agent
Identifier. The subscription in HubSpot tells HubSpot which property change to send to Julian. Both settings must
refer to the same property for this trigger to work.

## Connect HubSpot in Julian

1. Open **Integrations** in Julian. Select **Connect** beside HubSpot.
2. Sign in to the correct HubSpot account as a Super Admin. Complete the authorization screen.
3. Open the connected HubSpot integration in Julian.
4. Under **Schedule**, map the HubSpot contact property that contains the Agent Identifier.
5. Under **Push**, enable writing if your workflows will update HubSpot records or log call results.

![Actual Julian HubSpot settings with Contacts mapped to an Agent Identifier property](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/julian-agent-identifier-mapping.jpg?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=fd9c8a401ec6140274f0fc978b1db24b)

The connection applies to your organization. Complete the subscription below if changes in HubSpot should start calls.

## Subscribe to contact changes

### Create the private app

1. In HubSpot, open **Settings → Integrations → Private Apps**. Select **Create a private app**.
2. Name the app for Julian. Under **Scopes**, select `crm.objects.contacts.read`.

![HubSpot Private apps page with Create a private app button](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/private-apps.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=2190496d6bad9740c95b10257399dc6b)

![Basic info for a Julian private app in HubSpot](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/private-app-details.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=60beec1f3bd1303062af703513275144)

![Select the contact read scope for the HubSpot private app](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/contact-read-scope-selection.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=50fc882e0e7d5747d3e74ab48f246440)

![The contact read scope listed in the private app](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/contact-read-scope.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=d1d656f3f720e5e32f8f7b876ae8ed34)

### Set the webhook target

1. In Julian, open the connected HubSpot integration. Copy the **Webhook URL** from **Configuring HubSpot Subscriptions**.
2. In the HubSpot private app, open **Webhooks**. Paste the URL into the **Target URL** field.

![Julian's HubSpot subscription panel showing the webhook URL field and Copy button, with the URL redacted](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/julian-subscription-panel.jpg?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=4998ad357141fecadf45dace79d8984e)

![The HubSpot private app Webhooks tab with its Target URL field](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/hubspot-webhook-target.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=e491022b4e8504cf4325aece0132c33e)

### Watch the Agent Identifier property

1. Create a **Contact property changed** subscription in the private app.
2. Select the same Agent Identifier contact property that you mapped under **Schedule** in Julian.
3. Save the private app and activate the subscription.

![Create a HubSpot subscription for changes to the mapped Agent Identifier property](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/contact-property-subscription.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=a6a318745cd56a0f45aae0e549308418)

![Active HubSpot contact property change subscription](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/active-subscription.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=c2483981da3b3a453855ef55f98206f2)

> [!NOTE]
>
> The contact-read scope belongs to the HubSpot private app that sends webhook events. It is separate from the Super
> Admin role used to connect and configure the integration. Do not paste a private app token into Julian.

When the Agent Identifier changes, HubSpot sends an event to Julian. Julian checks the contact and schedules a call
only when the agent's workflow rules allow it. This event-based setup avoids repeated requests to poll HubSpot.

## Check the connection

1. Use a test contact with a phone number. Set its Agent Identifier property to a value used by an agent's
   pre-sequence workflow.
2. Check **Integrations → Scheduling Request Logs** in Julian. Confirm that Julian received the contact event and
   review any rejection reason.
3. Check the private app's webhook event logs in HubSpot. Confirm that HubSpot sent the event to the URL from Julian.
4. Check the agent's workflow run history in Julian to confirm whether the contact entered a sequence.

![HubSpot webhook logs showing contact property change events](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/webhook-event-logs.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=c9401bbb90bf9dec92980d8d638c23d1)

![HubSpot subscription with errors and a paused status](https://mintcdn.com/11x-60396687/s83AKO-pVYVFiNEf/images/crm/hubspot/subscription-errors.png?fit=max\&auto=format\&n=s83AKO-pVYVFiNEf\&q=85\&s=e246ef0aa4a6a7f8cf66c9d49c7869b5)

If HubSpot shows a delivered event but Julian rejects the contact, compare the Agent Identifier value, phone mapping,
and workflow rules. If HubSpot shows no event, check the subscription's property and target URL. A paused subscription
or an error count in HubSpot needs attention before new events can reach Julian.


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