> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-migrated-bigcommerce-docs.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Hubspot

> Integrate your application with the Hubspot API

## 🚀 Quickstart

Connect to Hubspot with Nango and see data flow in 2 minutes.

<Steps>
  <Step title="Create the integration">
    In Nango ([free signup](https://app.nango.dev)), go to [Integrations](https://app.nango.dev/dev/integrations) -> *Configure New Integration* -> *Hubspot*.
  </Step>

  <Step title="Authorize Hubspot">
    Go to [Connections](https://app.nango.dev/dev/connections) -> *Add Test Connection* -> *Authorize*, then log in to Hubspot. Later, you'll let your users do the same directly from your app.
  </Step>

  <Step title="Call the Hubspot API">
    Let's make your first request to the Hubspot API (fetch a list of contacts). Replace the placeholders below with your [secret key](https://app.nango.dev/dev/environment-settings), [integration ID](https://app.nango.dev/dev/integrations), and [connection ID](https://app.nango.dev/dev/connections):

    <Tabs>
      <Tab title="cURL">
        ```bash theme={null}
        curl "https://api.nango.dev/proxy/crm/v3/objects/contacts?properties=email,phone" \
          -H "Authorization: Bearer <NANGO-SECRET-KEY>" \
          -H "Provider-Config-Key: <INTEGRATION-ID>" \
          -H "Connection-Id: <CONNECTION-ID>"
        ```
      </Tab>

      <Tab title="Node">
        Install Nango's backend SDK with `npm i @nangohq/node`. Then run:

        ```typescript theme={null}
        import { Nango } from '@nangohq/node';

        const nango = new Nango({ secretKey: '<NANGO-SECRET-KEY>' });

        const res = await nango.get({
            endpoint: '/crm/v3/objects/contacts',
            params: { properties: "email,phone" },
            providerConfigKey: '<INTEGRATION-ID>',
            connectionId: '<CONNECTION-ID>'
        });

        console.log(res.data);
        ```
      </Tab>
    </Tabs>

    Or fetch credentials with the [Node SDK](/reference/sdks/node#get-a-connection-with-credentials) or [API](/reference/api/connection/get).

    ✅ You're connected! Check the [Logs](https://app.nango.dev/dev/logs) tab in Nango to inspect requests.
  </Step>

  <Step title="Implement Nango in your app">
    Follow our [Auth implementation guide](/guides/primitives/auth) to integrate Nango in your app.

    To obtain your own production credentials, follow the setup guide linked below.
  </Step>
</Steps>

<Warning>
  **HubSpot Marketplace installation flow is not supported.** Nango only supports the standard OAuth flow — all connections must be initiated through Nango (e.g. via the Connect UI or the [Nango Auth API](/guides/primitives/auth)). If your HubSpot app is listed on the HubSpot Marketplace, users must connect through your Nango-powered flow, not via the Marketplace install button.
</Warning>

## 📚 Hubspot Integration Guides

Nango maintained guides for common use cases.

* [How to register your own Hubspot OAuth app](/api-integrations/hubspot/how-to-register-your-own-hubspot-api-oauth-app)\
  Register an OAuth app with Hubspot and obtain credentials to connect it to Nango

Official docs: [Hubspot API docs](https://developers.hubspot.com/docs/reference/api/overview)

## 🧩 Pre-built syncs & actions for Hubspot

Enable them in your dashboard. Extend and customize to fit your needs.

### Companies

| Function name | Description                     | Type                                           | Source code                                                                                                     |
| ------------- | ------------------------------- | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| `companies`   | Sync companies from HubSpot CRM | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/companies.ts) |

### Contacts

| Function name | Description   | Type                                           | Source code                                                                                                    |
| ------------- | ------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `contacts`    | Sync contacts | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/contacts.ts) |

### Deals

| Function name | Description                                                                                          | Type                                           | Source code                                                                                                 |
| ------------- | ---------------------------------------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `deals`       | Sync deals with amount, close date, stage, owner, description, and associated companies and contacts | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/deals.ts) |

### Marketing Emails

| Function name      | Description                        | Type                                           | Source code                                                                                                            |
| ------------------ | ---------------------------------- | ---------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `marketing-emails` | Sync marketing emails from HubSpot | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/marketing-emails.ts) |

### Owners

| Function name | Description                                                         | Type                                           | Source code                                                                                                  |
| ------------- | ------------------------------------------------------------------- | ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| `owners`      | Sync HubSpot owners with names, email, user IDs, and archive status | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/owners.ts) |

### Products

| Function name | Description                                                           | Type                                           | Source code                                                                                                    |
| ------------- | --------------------------------------------------------------------- | ---------------------------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `products`    | Sync product records with pricing, SKU, quantity, and billing details | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/products.ts) |

### Tasks

| Function name | Description                                                                                                  | Type                                           | Source code                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------------------------ | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `tasks`       | Sync tasks with type, title, priority, assignee, due date, notes, and related contacts, companies, and deals | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/tasks.ts) |

### Tickets

| Function name     | Description                                                                                | Type                                           | Source code                                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| `service-tickets` | Sync service tickets with subject, content, owner, pipeline, stage, category, and priority | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/service-tickets.ts) |

### Users

| Function name | Description                                                          | Type                                           | Source code                                                                                                 |
| ------------- | -------------------------------------------------------------------- | ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `users`       | Sync provisioned users with role IDs, primary team, and admin status | [Sync](/guides/functions/syncs/sync-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/syncs/users.ts) |

### Others

| Function name               | Description                                                                                                                                  | Type                                         | Source code                                                                                                                       |
| --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `batch-create-companies`    | Create multiple companies at once                                                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/batch-create-companies.ts)    |
| `batch-update-companies`    | Update multiple companies at once                                                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/batch-update-companies.ts)    |
| `change-user-role`          | Update a HubSpot user's role and team assignments                                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/change-user-role.ts)          |
| `clone-marketing-email`     | Clone an existing marketing email                                                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/clone-marketing-email.ts)     |
| `create-association`        | Associate two records together                                                                                                               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-association.ts)        |
| `create-company`            | Create a company record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-company.ts)            |
| `create-contact`            | Create a contact record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-contact.ts)            |
| `create-deal`               | Create a deal record in HubSpot                                                                                                              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-deal.ts)               |
| `create-marketing-email`    | Create a marketing email in HubSpot                                                                                                          | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-marketing-email.ts)    |
| `create-note`               | Create a HubSpot note with body, timestamp, owner, optional attachments, and an explicit association to a contact, company, deal, or ticket. | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-note.ts)               |
| `create-property`           | Create a custom CRM property for a specified HubSpot object type                                                                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-property.ts)           |
| `create-task`               | Create a HubSpot task with type, title, priority, assignee, due date, notes, and optional associations to contacts, companies, or deals      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-task.ts)               |
| `create-ticket`             | Create a support ticket in HubSpot CRM                                                                                                       | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-ticket.ts)             |
| `create-user`               | Provision a HubSpot user with email, role, and team assignments                                                                              | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/create-user.ts)               |
| `delete-a-workflow`         | Delete an automation workflow                                                                                                                | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-a-workflow.ts)         |
| `delete-company`            | Delete a company record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-company.ts)            |
| `delete-contact`            | Delete a contact record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-contact.ts)            |
| `delete-deal`               | Delete a deal record                                                                                                                         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-deal.ts)               |
| `delete-marketing-email`    | Delete a marketing email                                                                                                                     | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-marketing-email.ts)    |
| `delete-task`               | Delete a HubSpot task by record ID                                                                                                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-task.ts)               |
| `delete-ticket`             | Delete a support ticket                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-ticket.ts)             |
| `delete-user`               | Delete a HubSpot provisioned user by ID                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/delete-user.ts)               |
| `fetch-account-information` | Retrieve portal account details, currency settings, timezone, and hosting region                                                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/fetch-account-information.ts) |
| `fetch-custom-objects`      | Retrieve HubSpot custom object schemas for enterprise accounts                                                                               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/fetch-custom-objects.ts)      |
| `fetch-pipelines`           | List pipelines and stages for an object type, defaulting to deals                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/fetch-pipelines.ts)           |
| `fetch-properties`          | List CRM property metadata for a specified HubSpot object type                                                                               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/fetch-properties.ts)          |
| `fetch-roles`               | List available user roles for a HubSpot enterprise account                                                                                   | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/fetch-roles.ts)               |
| `get-company`               | Get a company by ID                                                                                                                          | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-company.ts)               |
| `get-contact`               | Get a contact by ID                                                                                                                          | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-contact.ts)               |
| `get-deal`                  | Get a deal by ID                                                                                                                             | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-deal.ts)                  |
| `get-marketing-email`       | Get a marketing email by ID                                                                                                                  | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-marketing-email.ts)       |
| `get-owner`                 | Get an owner by ID                                                                                                                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-owner.ts)                 |
| `get-ticket`                | Get a ticket by ID                                                                                                                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/get-ticket.ts)                |
| `list-companies`            | List company records                                                                                                                         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-companies.ts)            |
| `list-contacts`             | List contact records                                                                                                                         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-contacts.ts)             |
| `list-deals`                | List deal records from HubSpot CRM                                                                                                           | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-deals.ts)                |
| `list-forms`                | List forms                                                                                                                                   | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-forms.ts)                |
| `list-marketing-emails`     | List marketing emails                                                                                                                        | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-marketing-emails.ts)     |
| `list-tickets`              | List support tickets                                                                                                                         | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/list-tickets.ts)              |
| `search-companies`          | Search companies by criteria                                                                                                                 | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/search-companies.ts)          |
| `search-deals`              | Search deals by criteria                                                                                                                     | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/search-deals.ts)              |
| `search-tickets`            | Search tickets by criteria                                                                                                                   | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/search-tickets.ts)            |
| `update-company`            | Update a company record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-company.ts)            |
| `update-contact`            | Update a contact record                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-contact.ts)            |
| `update-deal`               | Update a deal record in HubSpot CRM                                                                                                          | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-deal.ts)               |
| `update-marketing-email`    | Update a marketing email                                                                                                                     | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-marketing-email.ts)    |
| `update-task`               | Update a HubSpot task's fields, owner, due date, and associations                                                                            | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-task.ts)               |
| `update-ticket`             | Update a support ticket                                                                                                                      | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/update-ticket.ts)             |
| `whoami`                    | Retrieve the current authenticated HubSpot user's ID and email                                                                               | [Action](/guides/functions/action-functions) | [🔗 Github](https://github.com/NangoHQ/integration-templates/blob/main/integrations/hubspot/actions/whoami.ts)                    |

***
