Skip to content

HubSpot ​

Creates or updates HubSpot contacts, companies and deals, adds a note or a follow-up task, and searches the CRM.

The HubSpot node records in the CRM what an email tells you: it creates or updates the sender’s contact and company, opens a deal, adds the email summary as a note and creates the follow-up task. It can also search contacts, companies and deals.

It works with a HubSpot private app token, saved once in Connections. See HubSpot to create the connection.

At a glance ​

  • Type: hubspot.api · version 1
  • Category: Data
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Loop & Roll; described instead of performed during a test run
  • Needs a carrier email: No
  • Connection: HubSpot
  • Inputs: main
  • Outputs: main
The ports of “HubSpot”: what comes in on the left, what goes out on the rightInput: main. Outputs: main. An error output appears when its failure setting is “Follow the Error output”. It needs a HubSpot connection.HubSpothubspot.apimainmainerror · only with “Follow the Error output”Connection: HubSpot
The ports of “HubSpot”: what comes in on the left, what goes out on the right

Connection ​

This node needs a HubSpot connection.

Parameters ​

connection ​

HubSpot connection — The HubSpot connection to use. Create it once in Connections; its key never appears in the workflow.

  • Type: Connection (credential)
  • Required: Yes
  • Default: "" (empty)

action ​

Action

  • Type: One choice (options)
  • Required: Yes
  • Default: contact.upsert
  • Options:
    • contact.upsert — Create or update a contact: By email address: updates the contact if it exists, creates it otherwise. Never a duplicate.
    • contact.find — Find a contact by email
    • contact.update — Update a contact
    • company.upsert — Create or update a company: By domain name (dupont-agency.com): never a duplicate.
    • company.find — Find a company by domain
    • deal.create — Create a deal
    • deal.update — Update a deal: Change its stage, amount or close date.
    • note.create — Add a note: The email summary, on the contact, company or deal.
    • task.create — Create a follow-up task
    • search — Search: Full-text search across contacts, companies or deals.

email ​

Email address

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 320 characters at most
  • Example: {{ email.from.email }}
  • Shown when: action is one of contact.upsert, contact.find
  • Expressions: {{ }} accepted

firstName ​

First name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Shown when: action is one of contact.upsert, contact.update
  • Expressions: {{ }} accepted

lastName ​

Last name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 200 characters at most
  • Shown when: action is one of contact.upsert, contact.update
  • Expressions: {{ }} accepted

phone ​

Phone

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 60 characters at most
  • Shown when: action is one of contact.upsert, contact.update
  • Expressions: {{ }} accepted

domain ​

Domain name — Without “https://” or “www.”: dupont-agency.com. An email address is accepted too; its domain is kept.

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 320 characters at most
  • Shown when: action is one of company.upsert, company.find
  • Expressions: {{ }} accepted

companyName ​

Company name

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is company.upsert
  • Expressions: {{ }} accepted

recordId ​

HubSpot ID — The ID of the object to change, as an earlier step returns it (contactId, dealId).

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 40 characters at most
  • Example: {{ data.hubspot.contactId }}
  • Shown when: action is one of contact.update, deal.update
  • Expressions: {{ }} accepted

dealName ​

Deal name

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 500 characters at most
  • Example: {{ email.subject }}
  • Shown when: action is deal.create
  • Expressions: {{ }} accepted

pipeline ​

Pipeline — Empty: the account’s default pipeline (“default”).

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (hubspot.pipeline)
  • Listed with the connection in: connection
  • Shown when: action is one of deal.create, deal.update

stage ​

Stage — Required to create a deal. On an update, empty = unchanged.

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (hubspot.stage)
  • Listed inside: pipeline
  • Listed with the connection in: connection
  • Shown when: action is one of deal.create, deal.update

amount ​

Amount — A number with a decimal point: 1250.50. Empty = not set.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of deal.create, deal.update
  • Expressions: {{ }} accepted

closeDate ​

Expected close date — An ISO 8601 date: 2026-12-31. Empty = not set.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of deal.create, deal.update
  • Expressions: {{ }} accepted

body ​

Note text

  • Type: Long text (text)
  • Required: Yes
  • Default: "" (empty)
  • 65000 characters at most
  • Example: {{ data.summary.summary }}
  • Shown when: action is note.create
  • Expressions: {{ }} accepted

subject ​

Task subject

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 500 characters at most
  • Example: Call back {{ email.from.name }}
  • Shown when: action is task.create
  • Expressions: {{ }} accepted

taskBody ​

Task details

  • Type: Long text (text)
  • Required: No
  • Default: "" (empty)
  • 65000 characters at most
  • Shown when: action is task.create
  • Expressions: {{ }} accepted

dueDate ​

Due date — An ISO 8601 instant (2026-11-12T09:00:00Z). Empty = now.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is task.create
  • Expressions: {{ }} accepted

priority ​

Priority

  • Type: One choice (options)
  • Required: No
  • Default: NONE
  • Options:
    • NONE — None
    • LOW — Low
    • MEDIUM — Medium
    • HIGH — High
  • Shown when: action is task.create

taskType ​

Task type

  • Type: One choice (options)
  • Required: No
  • Default: todo
  • Options:
    • todo — To-do
    • email — Email
    • call — Call
  • Shown when: action is task.create

owner ​

Owner — Empty = no owner.

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID (hubspot.owner)
  • Listed with the connection in: connection
  • Shown when: action is one of contact.upsert, deal.create, deal.update, task.create

contactId ​

Associate with contact — The contact ID (contactId from an earlier step). Empty = none.

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of deal.create, note.create, task.create, company.upsert
  • Expressions: {{ }} accepted

companyId ​

Associate with company

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of deal.create, note.create, task.create, contact.upsert
  • Expressions: {{ }} accepted

dealId ​

Associate with deal

  • Type: Text (string)
  • Required: No
  • Default: "" (empty)
  • 40 characters at most
  • Shown when: action is one of note.create, task.create
  • Expressions: {{ }} accepted

properties ​

Other properties — The internal name (not the displayed label) of the HubSpot property (jobtitle, city, lifecyclestage…) and its value. Accepts {{ }} expressions.

  • Type: Key / value pairs (keyValue)
  • Required: No
  • Shown when: action is one of contact.upsert, contact.update, company.upsert, deal.create, deal.update
  • Expressions: {{ }} accepted

searchObject ​

Search in

  • Type: One choice (options)
  • Required: No
  • Default: contacts
  • Options:
    • contacts — Contacts
    • companies — Companies
    • deals — Deals
  • Shown when: action is search

query ​

Search text — Searched in the default properties (name, email, domain, phone…).

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 300 characters at most
  • Shown when: action is search
  • Expressions: {{ }} accepted

limit ​

Maximum count

  • Type: Number (number)
  • Required: No
  • Default: 10
  • Whole number, from 1 to 200
  • Shown when: action is search

Outputs ​

  • main — Taken once the HubSpot call succeeds, whatever the action. An error response from HubSpot fails the step instead.

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.contactId }} — string. Create or update a contact, Find a contact, Update a contact: the HubSpot contact ID. Empty when Find a contact finds nothing, or in a test run on a creation.
  • {{ data.<step>.created }} — boolean. Create or update (contact or company): true when the object was created, false when it existed and was updated.
  • {{ data.<step>.contact }} — { id, properties, createdAt, updatedAt }. The contact read or written. properties holds email, firstname, lastname, phone, company, jobtitle and hubspot_owner_id when they are set.
  • {{ data.<step>.found }} — boolean. Find a contact and Find a company: true when the object exists.
  • {{ data.<step>.companyId }} — string. Company actions: the HubSpot company ID.
  • {{ data.<step>.company }} — { id, properties, createdAt, updatedAt }. The company read or written (name, domain, city, phone, hubspot_owner_id).
  • {{ data.<step>.dealId }} — string. Create and Update a deal: the deal ID.
  • {{ data.<step>.noteId }} — string. Add a note: the ID of the created note.
  • {{ data.<step>.taskId }} — string. Create a follow-up task: the ID of the created task.
  • {{ data.<step>.dueAt }} — string. Create a follow-up task: the due date sent, in ISO 8601.
  • {{ data.<step>.results }} — array of { id, properties, createdAt, updatedAt }. Search: the objects found.
  • {{ data.<step>.firstId }} — string. Search: the ID of the first result, empty if there is none.
  • {{ data.<step>.count }} — number. Search: the number of results returned (total gives HubSpot’s total).
  • {{ data.<step>.simulated }} — boolean. true when the write was described instead of done (test run). Reads and searches always run for real.
  • {{ data.<step>.summary }} — string. The one-line summary in the member’s language, for example “Contact marie@agency.com created in HubSpot.”.

Operations ​

The Action parameter (action) picks the move:

  • Create or update a contact (contact.upsert, the default). Reads the contact by its Email address (GET /crm/v3/objects/contacts/{email}?idProperty=email); if it exists, it is updated with First name, Last name, Phone, Owner and Other properties (only filled fields are sent); otherwise it is created, and linked to the Associate with company company if given. Never a duplicate: this is the action to use on every incoming email.
  • Find a contact by email (contact.find). Publishes found, contactId, contact.
  • Update a contact (contact.update) by its HubSpot ID.
  • Create or update a company (company.upsert) by Domain name — an email address or a URL are accepted, only the domain is kept. On creation the company can be linked to the Associate with contact contact.
  • Find a company by domain (company.find).
  • Create a deal (deal.create): Name, Pipeline (empty: the default pipeline), Stage (required, cascading list under the pipeline), Amount, Expected close date, Owner, associated with the contact and/or company.
  • Update a deal (deal.update): change its stage, amount or date.
  • Add a note (note.create): the Note text, timestamped now, on the contact, company and/or deal (at least one).
  • Create a follow-up task (task.create): Subject, Details, Due date (empty: now), Priority, Type (to-do, email, call), Owner, associated like a note.
  • Search (search): free text across contacts, companies or deals, up to Maximum count (200 at most).

Other properties (properties) takes the INTERNAL name of a HubSpot property (jobtitle, city, lifecyclestage…) and its value; it completes or overrides the named fields.

Example ​

A prospect writes to the agency. The workflow records the contact, then adds the email summary as a note. The first node is named “Contact”, the second reads its ID:

text
action       contact.upsert
email        {{ email.from.email }}
firstName    {{ data.extraction.first_name }}

action       note.create
body         {{ data.summary.summary }}
contactId    {{ data.contact.contactId }}

Tips ​

  • Test runs. Reads and searches run for real; creations and updates are only described (simulated is true).
  • Retries. HubSpot offers no idempotency key: if the engine retries the step after an incident, a note, task or deal may be created twice. The two “Create or update” actions do not have this flaw: they look first.
  • Search index. HubSpot search lags a few moments behind: a contact created in the previous step may not be found by Search. Create or update a contact reads by address and has no such lag.
  • Errors. integration.unauthorized: token revoked or a scope is missing (for example deal write). integration.rejected: HubSpot refused the request (unknown property, stage from another pipeline). integration.rate_limited is retried automatically: Loop & Roll sends at most 100 requests per 10 seconds per connection. See Error handling.

Loop & Roll — the workflow builder for email.