---
title: HubSpot
description: "Log the contact or company you're viewing to HubSpot CRM — create or update records, attach the page as a note, and list deals."
---

Add or update contacts and companies in HubSpot, search them, log notes from the page you are on, and list deals.

Pick a saved connection in the **Credential** field, or create one from there. It signs in with a Bearer Token.

## What it does

The HubSpot node works on four kinds of things (**Resource**):

* **Contact**: **Create or update** a contact, keyed by email; **Update** a contact by its id; or **Search** contacts.
* **Company**: **Create or update** a company, keyed by domain, or **Search** companies.
* **Note**: **Create** a note, optionally attached to a contact, company or deal.
* **Deal**: **List** deals with their name, stage, amount and pipeline.

**Create or update** first looks for a record with the same email (contacts) or domain (companies). If one exists, it is updated; otherwise a new record is created. The result says which happened. Fields you leave empty are not sent, so an update never blanks a value already in HubSpot.

A **Note** is your **Note** text, then the **Selection** in quotes, then `Source:` and the **Source URL**, each separated by a blank line. It is dated with the time the node runs.

## When to use it

* Log the profile or company page you are viewing as a HubSpot contact or company.
* Keep a lead up to date each time you visit their page, without creating duplicates.
* Save a quote or a page link as a note on the right contact, company or deal.
* Pull your deal list into a daily summary.

## Inputs and settings

Call the HubSpot API yourself with the HTTP Request node, and pick the same connection in its **Credential** field.

* **Domain** is the bare domain, for example `acme.com`, not a full URL.
* **Search** looks for **Query** in the record's main fields (name, email, domain and so on). **Search** and **Deal → List** return 10 results unless you set **Limit**.
* **Associated record ID** is the id of the contact, company or deal, for example `{{ $('HubSpot').id }}` after a **Create or update**. Set **Associate with** too, or the note is created without a link to any record.

## Outputs

* **Create or update** returns the record with its `id`, `properties` and `created`, which is `true` for a new record and `false` for an update. Branch on it with [IF](/nodes/builtin/flow/if/).
* **Update** and **Note → Create** return the record with its `id` and `properties`.
* **Search** and **Deal → List** return the matches in `results`. Contacts come with `email`, `firstname`, `lastname` and `company`; companies with `name`, `domain` and `city`; deals with `dealname`, `dealstage`, `amount` and `pipeline`.

## Dependencies and credentials

* **Credential** (connection, Bearer Token): required. See [Connect HubSpot](/app/connections/hubspot/).

Use a HubSpot **private app token**. In HubSpot, open **Settings → Integrations → Private Apps**, create an app, and give it only the scopes you need: `crm.objects.contacts.read` and `crm.objects.contacts.write`, `crm.objects.companies.read` and `crm.objects.companies.write`, and `crm.objects.deals.read`. Copy its access token and save it as a Bearer Token credential: see [Create a credential](/app/connections/create/). Keep it secret: it opens your CRM within those scopes.

## Example workflow

1. A [Context Menu](/nodes/builtin/trigger/contextmenu/) trigger runs when you right-click a profile page.
2. [Get All Text](/nodes/extension/getalltext/) reads the page.
3. [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/) pulls out `email`, `firstName`, `lastName` and `company`.
4. HubSpot, **Contact → Create or update**, **Email** `{{ $input.email }}`, **First name** `{{ $input.firstName }}`, and so on.
5. HubSpot, **Note → Create**, **Note** `Seen on the web`, **Source URL** `{{ $('Context Menu').pageUrl }}`, **Associate with** `Contact`, **Associated record ID** `{{ $input.id }}`.

## Common issues

* **"HubSpot API Error: 403 Forbidden — the private app token is missing a required scope".** Add the scope this operation needs to the private app in HubSpot, then run again.
* **"HubSpot API Error: 401 Unauthorized".** The token is wrong or was rotated. Copy the current token from the private app and update the credential.
* **A duplicate contact was created.** Two **Create or update** steps for the same email ran back to back, before HubSpot could find the first one. Space them out, or run them one at a time.
* **The run is blocked in the web app.** HubSpot runs through the browser extension. Install the extension and allow HubSpot for this workflow when asked, or run the workflow from the extension.

## Related nodes

* [Information Extractor](/nodes/builtin/ai/aiagents/informationextractornode/): turn page text into contact fields.
* [Attio](/nodes/builtin/integration/attio/) and [Pipedrive](/nodes/builtin/integration/pipedrive/): other CRMs.
* [Http Request](/nodes/builtin/core/http-request/): call HubSpot API endpoints this node does not cover.