Create Association

hubspot.create_association
ActionCRM & salesconnection required

Calls the HubSpot API with the connection's credentials.

Associate two records with the v4 association API. With no `association_type_id` this is the default, unlabelled association (PUT /crm/v4/objects/{from}/{id}/associations/default/{to}/{id}); with one it is the labelled form.

Connection

Required
Yes — the node will not save without one
Auth type
Bearer token
Providers
HubSpot
Secret shape
the HubSpot private-app token, or {"token": "…"}
Resolved by
config.connection_id, else node.connection_id

Configuration

6 fields, 4 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.

FieldTypeRequiredDefaultConstraintsExample
from_object_type
Object type of the record the association starts from — contact, company, deal, ticket, note, or a custom object's type id.
stringYes——contact
from_object_id
The HubSpot record id of the record the association starts from.
stringYes——101
to_object_type
Object type of the record being associated to.
stringYes——company
to_object_id
The HubSpot record id of the record being associated to.
stringYes——202
association_type_id
Numeric id of the association label. Leave blank for the default, unlabelled association; read the ids with hubspot.list_association_labels.
numberNo—≥ 1—
association_category
Which catalogue the label comes from: HUBSPOT_DEFINED for a built-in label, USER_DEFINED for one created in the portal. The category is part of the label's identity — read it from hubspot.list_association_labels alongside the type id rather than guessing.
stringConditionalHUBSPOT_DEFINEDone of "HUBSPOT_DEFINED", "USER_DEFINED", "INTEGRATOR_DEFINED", "WORK"; only with association_type_id—

Example configuration

Every value below is the contract’s own example or default — nothing invented.

{
  "association_category": "HUBSPOT_DEFINED",
  "from_object_id": "101",
  "from_object_type": "contact",
  "to_object_id": "202",
  "to_object_type": "company"
}

Output

One shape.

result

FieldTypeExample
ok
True once HubSpot accepted the association.
boolean—
fromObjectId
Id of the record the association starts from.
string—
toObjectId
Id of the record it points to.
string—
labels
The association labels now on the pair.
array—
{
  "fromObjectId": "",
  "labels": [],
  "ok": false,
  "toObjectId": ""
}

Notes

  • Associations are v4, not v3: the path and the body differ from the object endpoints, and the labelled body is a JSON array, not an object.

See Create Association run in a workflow.

In a technical demo we add the HubSpot connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.