> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# HubSpot

> Use HubSpot's 2026-03 CRM API and verified portal webhooks for records, activities, and associations.

```ts automations/follow-up-hubspot-contacts.automation.ts theme={null}
import { automation } from "automate.ax"
import { hubspot } from "automate.ax/hubspot"

export default automation("Follow up on HubSpot contacts", () => {
  const contact = hubspot.onContactCreated()
  hubspot.createTask({
    timestamp: contact.occurredAt,
    subject: "Qualify the new contact",
    associations: [
      {
        toRecordId: contact.objectId,
        types: [
          {
            associationCategory: "HUBSPOT_DEFINED",
            associationTypeId: 204,
          },
        ],
      },
    ],
  })
})
```

Connect HubSpot with OAuth or a private app access token. OAuth is required for triggers because HubSpot delivers app-level webhooks by portal. Actions support either connection method when its token has the required scope.

CRM actions use HubSpot's `2026-03` API. Property inputs are arrays of `{ name, value }` entries so provider property names remain data rather than TypeScript field names. Record dates become JavaScript `Date` values. List and search results include an opaque `pageInfo.after` cursor for the next request.

HubSpot webhooks cover contacts, companies, deals, and tickets. Automate.ax verifies the exact request body with the HubSpot app secret, deduplicates retries, and classifies broad deliveries into typed creation, property-change, deletion, merge, restore, and association triggers. Property-change triggers receive the properties enabled in the HubSpot app's webhook configuration.

HubSpot returns archived records from its recycling bin when an action accepts `archived: true`. Archive actions do not permanently erase CRM records.

## Exports

```ts theme={null}
import { hubspot, hubspotAccount, getHubSpotApi } from "automate.ax/hubspot"
```

* `hubspot` contains the packaged HubSpot actions and triggers.
* `hubspotAccount("name")` selects a named HubSpot connection.
* `getHubSpotApi` creates the authenticated HubSpot API helper for a custom account-backed action.

## Triggers

* [On HubSpot CRM event](/reference/integrations/hubspot/triggers/on-hubspot-crm-event)
* [On HubSpot contact created](/reference/integrations/hubspot/triggers/on-hubspot-contact-created)
* [On HubSpot contact updated](/reference/integrations/hubspot/triggers/on-hubspot-contact-updated)
* [On HubSpot contact deleted](/reference/integrations/hubspot/triggers/on-hubspot-contact-deleted)
* [On HubSpot contact merged](/reference/integrations/hubspot/triggers/on-hubspot-contact-merged)
* [On HubSpot contact restored](/reference/integrations/hubspot/triggers/on-hubspot-contact-restored)
* [On HubSpot contact association added](/reference/integrations/hubspot/triggers/on-hubspot-contact-association-added)
* [On HubSpot contact association removed](/reference/integrations/hubspot/triggers/on-hubspot-contact-association-removed)
* [On HubSpot company created](/reference/integrations/hubspot/triggers/on-hubspot-company-created)
* [On HubSpot company updated](/reference/integrations/hubspot/triggers/on-hubspot-company-updated)
* [On HubSpot company deleted](/reference/integrations/hubspot/triggers/on-hubspot-company-deleted)
* [On HubSpot company merged](/reference/integrations/hubspot/triggers/on-hubspot-company-merged)
* [On HubSpot company restored](/reference/integrations/hubspot/triggers/on-hubspot-company-restored)
* [On HubSpot company association added](/reference/integrations/hubspot/triggers/on-hubspot-company-association-added)
* [On HubSpot company association removed](/reference/integrations/hubspot/triggers/on-hubspot-company-association-removed)
* [On HubSpot deal created](/reference/integrations/hubspot/triggers/on-hubspot-deal-created)
* [On HubSpot deal updated](/reference/integrations/hubspot/triggers/on-hubspot-deal-updated)
* [On HubSpot deal deleted](/reference/integrations/hubspot/triggers/on-hubspot-deal-deleted)
* [On HubSpot deal merged](/reference/integrations/hubspot/triggers/on-hubspot-deal-merged)
* [On HubSpot deal restored](/reference/integrations/hubspot/triggers/on-hubspot-deal-restored)
* [On HubSpot deal association added](/reference/integrations/hubspot/triggers/on-hubspot-deal-association-added)
* [On HubSpot deal association removed](/reference/integrations/hubspot/triggers/on-hubspot-deal-association-removed)
* [On HubSpot ticket created](/reference/integrations/hubspot/triggers/on-hubspot-ticket-created)
* [On HubSpot ticket updated](/reference/integrations/hubspot/triggers/on-hubspot-ticket-updated)
* [On HubSpot ticket deleted](/reference/integrations/hubspot/triggers/on-hubspot-ticket-deleted)
* [On HubSpot ticket merged](/reference/integrations/hubspot/triggers/on-hubspot-ticket-merged)
* [On HubSpot ticket restored](/reference/integrations/hubspot/triggers/on-hubspot-ticket-restored)
* [On HubSpot ticket association added](/reference/integrations/hubspot/triggers/on-hubspot-ticket-association-added)
* [On HubSpot ticket association removed](/reference/integrations/hubspot/triggers/on-hubspot-ticket-association-removed)

## Actions

* [List contacts](/reference/integrations/hubspot/actions/list-contacts)
* [Get contact](/reference/integrations/hubspot/actions/get-contact)
* [Search contacts](/reference/integrations/hubspot/actions/search-contacts)
* [Create contact](/reference/integrations/hubspot/actions/create-contact)
* [Update contact](/reference/integrations/hubspot/actions/update-contact)
* [Archive contact](/reference/integrations/hubspot/actions/archive-contact)
* [List companies](/reference/integrations/hubspot/actions/list-companies)
* [Get company](/reference/integrations/hubspot/actions/get-company)
* [Search companies](/reference/integrations/hubspot/actions/search-companies)
* [Create company](/reference/integrations/hubspot/actions/create-company)
* [Update company](/reference/integrations/hubspot/actions/update-company)
* [Archive company](/reference/integrations/hubspot/actions/archive-company)
* [List deals](/reference/integrations/hubspot/actions/list-deals)
* [Get deal](/reference/integrations/hubspot/actions/get-deal)
* [Search deals](/reference/integrations/hubspot/actions/search-deals)
* [Create deal](/reference/integrations/hubspot/actions/create-deal)
* [Update deal](/reference/integrations/hubspot/actions/update-deal)
* [Archive deal](/reference/integrations/hubspot/actions/archive-deal)
* [List tickets](/reference/integrations/hubspot/actions/list-tickets)
* [Get ticket](/reference/integrations/hubspot/actions/get-ticket)
* [Search tickets](/reference/integrations/hubspot/actions/search-tickets)
* [Create ticket](/reference/integrations/hubspot/actions/create-ticket)
* [Update ticket](/reference/integrations/hubspot/actions/update-ticket)
* [Archive ticket](/reference/integrations/hubspot/actions/archive-ticket)
* [Upsert contacts](/reference/integrations/hubspot/actions/upsert-contacts)
* [List owners](/reference/integrations/hubspot/actions/list-owners)
* [Get owner](/reference/integrations/hubspot/actions/get-owner)
* [List properties](/reference/integrations/hubspot/actions/list-properties)
* [List pipelines](/reference/integrations/hubspot/actions/list-pipelines)
* [List association labels](/reference/integrations/hubspot/actions/list-association-labels)
* [Associate contact](/reference/integrations/hubspot/actions/associate-contact)
* [Associate company](/reference/integrations/hubspot/actions/associate-company)
* [Associate deal](/reference/integrations/hubspot/actions/associate-deal)
* [Associate ticket](/reference/integrations/hubspot/actions/associate-ticket)
* [Remove contact association](/reference/integrations/hubspot/actions/remove-contact-association)
* [Remove company association](/reference/integrations/hubspot/actions/remove-company-association)
* [Remove deal association](/reference/integrations/hubspot/actions/remove-deal-association)
* [Remove ticket association](/reference/integrations/hubspot/actions/remove-ticket-association)
* [Log call](/reference/integrations/hubspot/actions/log-call)
* [Log email](/reference/integrations/hubspot/actions/log-email)
* [Create meeting](/reference/integrations/hubspot/actions/create-meeting)
* [Create note](/reference/integrations/hubspot/actions/create-note)
* [Create task](/reference/integrations/hubspot/actions/create-task)
