# HubSpot: update subscription

The **HubSpot: update subscription** Point template writes the push subscription state and the journey step onto an existing HubSpot contact, so sales and email marketing see what the person already gets from the app.

This point authenticates with its own HubSpot private app token — it doesn't use any account-level HubSpot integration configured elsewhere in Settings.

## Configure the point

1. Drag **HubSpot: update subscription** from the **Integrations** section onto the canvas.
2. Double-click the point and enter a **Step Name**.
3. In **Private app token**, enter a HubSpot private app token with the `crm.objects.contacts.write` scope. It's stored masked, like a webhook secret header.

<img src="/journey-elements-hubspot-update-subscription-1.webp" alt="HubSpot update subscription drawer with Step Name and Private app token fields"/>

4. In **Look the contact up by**, enter the internal name of the HubSpot property that holds the identifier — `email` by default, or a property of your own that carries the Pushwoosh User ID. HubSpot only looks a contact up by a property whose values it keeps unique.

<img src="/journey-elements-hubspot-update-subscription-2.webp" alt="Look the contact up by field in the HubSpot update subscription drawer"/>

5. In **Identifier value**, enter the value to look up, for example `{{device:user_id}}` or a tag of the traveler.

<img src="/journey-elements-hubspot-update-subscription-3.webp" alt="Identifier value field in the HubSpot update subscription drawer"/>

6. In **Properties to write**, add a row per HubSpot property's internal name mapped to what to write into it. Names must be non-empty and unique. See [key/value fields](/product/customer-journey/journey-elements/integrations/#configuring-list-and-keyvalue-fields). Besides tags, the value can use `{{device:push_subscribed}}` for the push subscription state, `{{now}}` for the moment the traveler passed here, or `{{journey:name}}` / `{{point:name}}` for where. A cell holding a single macro keeps that macro's own type. For example, `{{device:push_subscribed}}` alone arrives as a boolean, not the string `"true"`.

<img src="/journey-elements-hubspot-update-subscription-4.webp" alt="Properties to write field in the HubSpot update subscription drawer"/>

7. Click **Save**.

<Aside type="note">
Each property in **Properties to write** has to already exist on the HubSpot contact object. This point doesn't create new properties. Set them up in HubSpot first. If one doesn't exist, HubSpot rejects the whole request. None of the properties in this step get written, and the traveler drops from the journey the same way as any other failed request.
</Aside>

## Connect the branches

After you save, the point shows two branches on the canvas. Connect a next step to each:

* **Updated:** the identifier matched an existing HubSpot contact and HubSpot returned the updated contact. For example, continue with the rest of the journey.
* **Not found:** HubSpot answered with a 404 (no matching contact). The traveler is not dropped. The point does not retry or wait out a failed-request cooldown the way a real failed request does. For example, send a different path or create the contact first.

**Not found** is not a failed request. A real failed request drops the traveler instead. See [Errors and failed requests](/product/customer-journey/journey-elements/integrations/#errors-and-failed-requests).

## Response

On **Updated**, later steps can use the HubSpot contact's ID as **`hubspot_contact_id`**. Use it the same way as a [Webhook response attribute](/product/customer-journey/journey-elements/channels/webhook/#map-webhook-response-data-to-variables). For example, set a Tag with [Update user profile](/product/customer-journey/journey-elements/flow-controls/update-user-profile/#use-a-value-from-a-webhook-response).

On **Not found**, that attribute is not available.

## Example scenario: Syncing push subscription status to HubSpot after opt-in

A team wants sales and email marketing to see, right on the HubSpot contact, whether a person has opted into push.

1. Add a [Trigger-based entry](/product/customer-journey/journey-elements/entry-elements/trigger-based-entry/) element and set it to fire on a `PushOptedIn` event.
2. Add **HubSpot: update subscription** right after it. Leave **Look the contact up by** at `email` and set **Identifier value** to `{{tag:Email}}`. In **Properties to write**, set `push_subscribed` to `{{device:push_subscribed}}`.
3. Click **Save**, then connect **Updated** to the rest of the journey and **Not found** to a step that creates the contact first, for example [HubSpot: create or update contact](/product/customer-journey/journey-elements/integrations/hubspot-create-or-update-contact/).

Once this runs, the HubSpot contact shows the traveler's current push subscription state, so sales and email marketing don't have to guess.