# HubSpot CRM

Use explicit object types, preserve paging and batch errors, and verify inbound events with their original request.

Canonical URL: https://opennodeflow.dev/wiki/integration-hubspot/
JSON reference: https://opennodeflow.dev/wiki/integration-hubspot/index.json
Source snapshot: 2026-10-23

The HubSpot family provides shared record operations for contacts, companies and deals, typed mutation builders, directional associations and signed event verification. Set `objectType` deliberately: one operation name does not mean every CRM object or custom API is supported.

## Connect and prepare

Store an authorized bearer token as `HUBSPOT_ACCESS_TOKEN` or the configured access-token secret name. The nodes consume the grant; consent, OAuth refresh/rotation and webhook registration remain external. Request the matching object read/write scopes and target account access.

Build standard Contact/Company/Deal Fields and an optional custom Property Map, then pass them to the corresponding Mutation builder. Standard/custom collisions fail rather than overwriting. Provider stage, pipeline, owner and custom-property values are internal identifiers, not display labels. Try this pure path with synthetic records before adding a provider action.

## Read and collect

List/search return items, after, complete, pages and selected provider metadata. The implementation follows a returned cursor on its fixed host instead of trusting an arbitrary next URL. Search enforces filter/request bounds, the implemented 10,000-result ceiling and 210 ms page spacing. This per-call spacing does not remove account-wide limits across concurrent workflows.

A complete HTTP response can still contain item failures. Batch results retain item errors and numErrors; inspect them before committing a domain checkpoint. Unique-property upsert can identify an existing record but does not provide universal exactly-once execution.

## Associations and writes

Read directional association-label definitions for the actual from/to object types before supplying IDs. Association list is a page with cursor data. Removing associations removes the selected pair's associations, not merely one label. Review that scope carefully.

Effectful operations use `confirmWrites:true`, runtime `$retries:0` and no automatic repeat. Reconcile remote state after an uncertain response. The source uses its recorded provider route version; updating that version is an integration change requiring current provider documentation and fixtures.

## Signed events

Verification consumes an envelope retaining method, public URI, exact raw UTF-8 body, signature and timestamp from a suitable relay. Store the signing client secret by name; never copy its value into graph inputs. The v3 verifier applies its normalization/HMAC/time-window checks and rejects unsupported legacy signatures. A pure Event Batch decoder only parses trusted/synthetic JSON and does not authenticate a request.

The verifier does not register subscriptions. Deduplicate with full account/subscription/object/time identity in durable storage; eventId alone is not a globally unique business identity. Save the provider request envelope only under an appropriate retention/redaction policy.

## Operations

- [HubSpot Get Record](/wiki/reference-hubspot-records-get/): Read-only CRM operation for contacts/companies/deals selected by objectType. Uses dated 2026-09 endpoints, secret bearer token and bounded read retries; 401/403 are never retried. Scope must include crm.objects.<objectType>.read. Get one re
- [HubSpot List Records](/wiki/reference-hubspot-records-list/): Read-only CRM operation for contacts/companies/deals selected by objectType. Uses dated 2026-09 endpoints, secret bearer token and bounded read retries; 401/403 are never retried. Scope must include crm.objects.<objectType>.read. Collect se
- [HubSpot Search Records](/wiki/reference-hubspot-records-search/): Read-only CRM operation for contacts/companies/deals selected by objectType. Uses dated 2026-09 endpoints, secret bearer token and bounded read retries; 401/403 are never retried. Scope must include crm.objects.<objectType>.read. Search use
- [HubSpot Create Record](/wiki/reference-hubspot-records-create/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Update Record](/wiki/reference-hubspot-records-update/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Archive Record](/wiki/reference-hubspot-records-archive/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Batch Read Records](/wiki/reference-hubspot-records-batch-read/): Read-only CRM operation for contacts/companies/deals selected by objectType. Uses dated 2026-09 endpoints, secret bearer token and bounded read retries; 401/403 are never retried. Scope must include crm.objects.<objectType>.read. Read at mo
- [HubSpot Upsert Records](/wiki/reference-hubspot-records-upsert/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Build Contact Mutation](/wiki/reference-hubspot-contact-mutation-build/): Build a provider-specific standard/custom property mutation; no external call.
- [HubSpot Build Company Mutation](/wiki/reference-hubspot-company-mutation-build/): Build a provider-specific standard/custom property mutation; no external call.
- [HubSpot Build Deal Mutation](/wiki/reference-hubspot-deal-mutation-build/): Build a provider-specific standard/custom property mutation; no external call.
- [HubSpot List Associations](/wiki/reference-hubspot-associations-list/): Read one association page; decode paging.next.after and feed it to the next request for explicit bounded collection. Direction matters for type IDs.
- [HubSpot Read Association Labels](/wiki/reference-hubspot-associations-labels/): Resolve provider-owned directional association type IDs before applying labels.
- [HubSpot Associate Records](/wiki/reference-hubspot-associations-set/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Remove Associations](/wiki/reference-hubspot-associations-remove/): Deliberate CRM action for selected objectType; requires matching write scope and confirmWrites=true with $retries=0. Provider validation rules remain authoritative. No generic idempotency header is invented; reconcile uncertain network comp
- [HubSpot Verify Signed Webhook](/wiki/reference-hubspot-webhook-verify/): Verify v3 HMAC and timestamp, then decode typed CRM events. Expects a trusted ingress relay to retain raw body/public URI and forward ONF keyed JSON. Validating this envelope does not authenticate ONF transport itself; ONF remains trusted L
- [HubSpot Receive Signed Webhook](/wiki/reference-hubspot-webhook-receive/): Webhook branch validates a relay-supplied v3 signed request from context.input. Configure this entry as webhook; existing ONF endpoint requires its key. Public provider requests need an ingress relay and configured subscriptions; this trigg
- [HubSpot Decode Event Batch](/wiki/reference-hubspot-webhook-decode/): Pure fixture/trusted payload decoder. No signature verification; use Verify Signed Webhook on external ingress.

Fixture tests establish request construction, limits, signatures and contract behavior. They do not establish live CRM permissions or successful business writes.

---

## Documentation provenance

- `../OpenNodeFlow-Library/work/teams-hubspot/SETUP.md`
- `../OpenNodeFlow-Library/docs/INTEGRATIONS.md`
- `docs/INTEGRATIONS-TEAMS-HUBSPOT.md`

This page describes maintained source, not a live inventory or an authorization to perform actions.
