StyloDocs
Workflow blocks

HubSpot

Work with HubSpot contacts, companies, deals, tickets, and users

View as Markdown

hubspot — Work with HubSpot contacts, companies, deals, tickets, and users.

Where it appears

The HubSpot block lives in the Integrations group of the Workflow Builder. Connect the Hubspot integration before adding it.

Fields

FieldTypeRequiredDefaultDescription
resourceselectYescontactWhich HubSpot resource to work with. Options: contact, company, deal, ticket, user.
operationselectYes—Which action to perform on the selected resource.
contactIdOrEmailtext (supports references)No—Optional HubSpot contact ID or email address to fetch a single contact. Leave empty to list contacts. Accepts literal text or <StepName.field>.
limitnumberNo100Maximum number of records to return when listing. Defaults to 100.
propertiesJsoncodeYes—JSON object of HubSpot contact properties to set on the new contact (e.g. email, firstname). Property keys must match your HubSpot schema.
contactIdtext (supports references)Yes—HubSpot contact ID to update. Use a literal ID or <StepName.field> to reference an ID from a previous step.
searchJsoncodeYes—HubSpot CRM Search API request body as JSON, using filterGroups with propertyName, operator, and value to filter contacts.
companyIdOrDomaintext (supports references)No—Optional HubSpot company ID or domain to fetch a single company. Leave empty to list companies. Accepts literal text or <StepName.field>.
companyIdtext (supports references)Yes—HubSpot company ID to update. Use a literal ID or <StepName.field> to reference an ID from a previous step.
ticketIdtext (supports references)Yes—HubSpot ticket ID to fetch. Use a literal ID or <StepName.field> to reference an ID from a previous step.
ownerIdtext (supports references)Yes—HubSpot owner ID to look up — typically a record's hubspot_owner_id property, referenced with <StepName.field>. Returns the owner's name and email; archived owners are included. If the ID is empty (unowned record) or unknown, owner is null.

Inputs and outputs

Inputs are the configurable fields above. The block produces these outputs:

Outputs

Reference an output downstream with <HubSpot.field>.

NameTypeDescription
successbooleanOperation succeeded
resultjsonContacts data
errorstringError message if failed
contactjsonCreated contact
resultsjsonSearch results
companyjsonCreated company
ticketjsonCreated ticket
ownersjsonList of HubSpot owners
ownerjsonThe owner (id, firstName, lastName, email, ...), or null if not found

Example

A minimal configuration for this block:

{
  "type": "hubspot",
  "config": {
    "resource": "contact",
    "operation": "...",
    "limit": 100,
    "propertiesJson": "...",
    "contactId": "<PreviousStep.field>",
    "searchJson": "...",
    "companyId": "<PreviousStep.field>",
    "ticketId": "<PreviousStep.field>",
    "ownerId": "<PreviousStep.field>"
  }
}

Limits and failure modes

  • Requires a connected Hubspot integration. Calls fail if that integration is disconnected or its authorization has expired.
  • Required fields (resource, operation, propertiesJson, contactId, searchJson, companyId, ticketId, ownerId) must be set, or the block fails validation before it runs.
  • On failure the error output is populated; downstream blocks that reference other outputs may not receive values.

On this page