MojarMojar
Connectors

HubSpot

Create, update, and search contacts, deals, companies, and tickets in HubSpot from a workflow.

The HubSpot connector gives your agent full CRM access: create and update contacts, deals, companies, and tickets, or search across any object type — all from a workflow node.

What you can do

ActionWhat it does
Create contactCreates a new CRM contact with the properties you specify.
Update contactUpdates one or more properties on an existing contact by ID.
Get contactReads a contact's properties by ID.
Search contactsFinds contacts matching a text query or property filters.
Create dealCreates a new deal record.
Update dealUpdates properties on an existing deal by ID.
Create ticketCreates a new HubSpot ticket (CRM object, not support ticket).
Update ticketUpdates properties on an existing ticket by ID.
Create companyCreates a new company record.
Get object / SearchGeneric read/search for any CRM object type.

Properties are passed as JSON and support {{variable}} template syntax for dynamic values.

Before you start

You need:

  • A HubSpot account (any paid tier, or a developer sandbox).
  • A Private App access token with the correct CRM scopes.

HubSpot deprecated legacy API keys in 2022. Use a Private App access token (starts with pat-) instead.

To create a Private App:

In HubSpot, click the settings gear icon, then go to Account SetupIntegrationsPrivate Apps.
Click Create a private app and give it a name (e.g. "Mojar Integration").

On the Scopes tab, add the scopes your workflows need:

  • crm.objects.contacts.read and crm.objects.contacts.write
  • crm.objects.deals.read and crm.objects.deals.write
  • crm.objects.companies.read and crm.objects.companies.write
  • crm.objects.tickets.read and crm.objects.tickets.write (if using tickets)
Click Create app and then Continue creating on the warning dialog.
Copy the access token from the Auth tab. Store it safely — it is not shown again.

Connect HubSpot

Open your agent in Mojar and go to Integrations in the sidebar.
Find HubSpot in the list of available providers and click Connect.

Paste your Private App Access Token (pat-na1-...) into the Private App Access Token field.

Click Save. Mojar tests the token against the HubSpot CRM API.

HubSpot connector credential form showing the Private App Access Token field

Use it in a workflow

Open the workflow editor and add a new node where you want the HubSpot action.
Select HubSpot as the connector.
Choose an Action from the dropdown.

Set the Properties field as a JSON object matching the HubSpot property names:

Example: create a contact
{
  "email": "{{lead.email}}",
  "firstname": "{{lead.firstName}}",
  "lastname": "{{lead.lastName}}",
  "phone": "{{lead.phone}}"
}
Example: create a deal
{
  "dealname": "{{company.name}} – New Opportunity",
  "pipeline": "default",
  "dealstage": "appointmentscheduled",
  "amount": "{{deal.value}}"
}

For update actions, also set the Object ID field to the HubSpot record ID (e.g. captured from an earlier Create node).

For search actions, set a Query string or use the Filters field as a JSON array of HubSpot filter groups.

Connect the node's output to the next step. Created records return an id and properties you can reference in later nodes.

HubSpot property names use snake_case and are different from display labels. For example, the "First name" field is firstname and "Deal stage" is dealstage. Check the HubSpot CRM properties reference for the correct internal names.

On this page