---
title: HubSpot CRM
slug: connectors/hubspot-crm
docTags: 
createdAt: 2026-06-09T16:30:03.008Z
---

The HubSpot CRM connector facilitates the integration of HubSpot's CRM capabilities into automated workflows, enabling efficient management and analysis of customer data.

HubSpot CRM is a comprehensive customer relationship management platform that helps businesses manage their sales, marketing, and customer service efforts in one place. The HubSpot CRM Connector for Swimlane Turbine enables users to automate the creation, retrieval, and updating of company records within HubSpot CRM directly from the Swimlane platform. By integrating with HubSpot CRM, users can streamline their sales and marketing workflows, maintain up-to-date customer information, and enhance their overall customer engagement strategies without the need for manual data entry or complex API interactions.

## Prerequisites

To effectively utilize the HubSpot CRM connector with Swimlane Turbine, you must have the following:

- OAuth2 refresh token authentication with these parameters:
  - URL: The endpoint URL for HubSpot API access.
  - Client ID: Your HubSpot application's client identifier.
  - Client Secret: The secret key associated with your HubSpot application.
  - Refresh Token: A token used to obtain a new access token when the current one expires.

## Asset Setup

### Client Credential Flow Authentication

Authentication uses HubSpot application OAuth2.  You will need an admin account in HubSpot to create the application.

In order to set up the asset, you need the following:

- **A Developer Account**
- **An App** associated with your developer account

Steps to create Developer Account:

1. Conick on the [Developer Account](https://app.hubspot.com/signup-hubspot/developers?_ga=2.207664146.1651439249.1582052738-500942594.1573763828\&step=landing_page)
2. Click on the **continue with this user**
3. Click on the **Create a new developer account**
4. Add **Job Role** and **Company**

Steps to create the HubSpot app:

1. After Developer account Created then Click on Create New APP.
2. Enter a name for your new application and add logo.
3. Click on the **Auth** tab and give the required scopes for the endpoints and Redirect URL.
4. The **Client ID** and **Client Secret** needed in the asset are shown on this page.
5. After adding all the fields, Click on **Create APP** button.

### How to Generate Refresh Token and Pass it in the Asset

The Refresh Token generated by following:

- Oauth 2.0 refresh token grant, which requires a 'Redirect URI', 'Client ID' and 'Client Secret'. To generate a refresh token please follow the instructions below.
  - In steps  of the above-mentioned setup instructions, please provide a 'Redirect URI' before clicking on **Create APP** at the the bottom.
  - Copy the 'Client ID' and 'Client Secret' from the APP.
  - The Swimlane team will provide a Python script and instructions on how to use the script to generate the Refresh Token.

## Capabilities

This Connector provides the following capabilities:

- Create Companies
- Get Company by ID
- Retrieve Companies
- Update Company

## Notes

- [API Documentation](https://developers.hubspot.com/docs/api/crm/companies)
- [Association IDs](https://developers.hubspot.com/docs/api/crm/associations#association-type-id-values)
- [Association APIs](https://developers.hubspot.com/docs/api/crm/associations)

## Additional Documentation

- [HubSpot CRM Connector Documentation](https://docs.swimlane.com/connectors/hubspot-crm)
- [HubSpot CRM API Documentation](https://developers.hubspot.com/docs/api/crm/companies)

# Configurations

## HubSpot OAuth 2.0 Refresh Token

Authenticates using HubSpot OAuth 2.0 credentials.

### Configuration Parameters

| **Parameter**  | **Description**                                                                                | **Type** | **Required** |
| -------------- | ---------------------------------------------------------------------------------------------- | -------- | ------------ |
| url            | A URL to the target host.                                                                      | string   | Required     |
| client\_id     | The client ID.                                                                                 | string   | Required     |
| client\_secret | The client secret.                                                                             | string   | Required     |
| refresh\_token | Refresh Token used to obtain new access tokens. Please refer readme to generate refresh token. | string   | Required     |
| verify\_ssl    | Verify SSL certificate                                                                         | boolean  | Optional     |
| http\_proxy    | A proxy to route requests through.                                                             | string   | Optional     |

# Actions

## Create Companies

Enables the creation of new companies in HubSpot CRM using specified properties.

### Endpoint

- **URL:** `crm/v3/objects/companies`
- **Method:** `POST`

### Input

| **Argument Name**                        | **Type** | **Required** | **Description**                                                                                                                |
| ---------------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `properties`                             | object   | Optional     | Parameter for Create Companies                                                                                                 |
| `properties.name`                        | string   | Required     | The name of the company.                                                                                                       |
| `properties.domain`                      | string   | Required     | The company's website domain.                                                                                                  |
| `properties.city`                        | string   | Optional     | The city where the company is located.                                                                                         |
| `properties.industry`                    | string   | Optional     | The type of business the company performs. By default, this property has approximately 150 pre-defined options to select from. |
| `properties.phone`                       | string   | Optional     | The company's primary phone number.                                                                                            |
| `properties.state`                       | string   | Optional     | The state or region where the company is located.                                                                              |
| `properties.lifecyclestage`              | string   | Optional     | A property used to indicate at what point the company is within the marketing/sales process.                                   |
| `associations`                           | array    | Optional     | Parameter for Create Companies                                                                                                 |
| `associations.to`                        | object   | Required     | The record or activity you want to associate with the company, specified by its unique id value.                               |
| `associations.to.id`                     | number   | Required     | Unique identifier                                                                                                              |
| `associations.types`                     | array    | Required     | The type of the association between the company and the record/activity. Include the associationCategoryand associationTypeId. |
| `associations.types.associationCategory` | string   | Required     | Type of the resource                                                                                                           |
| `associations.types.associationTypeId`   | number   | Required     | Unique identifier                                                                                                              |

### Input Example

`{"json_body":{"properties":{"name":"amazon","domain":"amazon.com","city":"USA","industry":"Design","phone":"555555555","state":"Massachusetts","lifecyclestage":"51439524"},"associations":[{"to":{"id":101},"types":[{"associationCategory":"HUBSPOT_DEFINED","associationTypeId":280}]}]}}`

### Output

| **Parameter**                       | **Type** | **Description**                                    |
| ----------------------------------- | -------- | -------------------------------------------------- |
| `status_code`                       | number   | HTTP status code of the response                   |
| `reason`                            | string   | Response reason phrase                             |
| `id`                                | string   | Unique identifier                                  |
| `properties`                        | object   | Output field: properties                           |
| `properties.city`                   | string   | Output field: properties.city                      |
| `properties.createdate`             | string   | Date value                                         |
| `properties.domain`                 | string   | Output field: properties.domain                    |
| `properties.hs_lastmodifieddate`    | string   | Date value                                         |
| `properties.hs_object_id`           | string   | Unique identifier                                  |
| `properties.hs_object_source`       | string   | Output field: properties.hs\_object\_source        |
| `properties.hs_object_source_id`    | string   | Unique identifier                                  |
| `properties.hs_object_source_label` | string   | Output field: properties.hs\_object\_source\_label |
| `properties.hs_pipeline`            | string   | Output field: properties.hs\_pipeline              |
| `properties.lifecyclestage`         | string   | Output field: properties.lifecyclestage            |
| `properties.name`                   | string   | Name of the resource                               |
| `properties.phone`                  | string   | Output field: properties.phone                     |
| `properties.state`                  | string   | Output field: properties.state                     |
| `properties.website`                | string   | Output field: properties.website                   |
| `createdAt`                         | string   | Output field: createdAt                            |
| `updatedAt`                         | string   | Output field: updatedAt                            |
| `archived`                          | boolean  | Output field: archived                             |

### Output Example

`{"status_code":201,"response_headers":{"Date":"Tue, 06 Aug 2024 18:32:51 GMT","Content-Type":"application/json;charset=utf-8","Content-Length":"281","Connection":"keep-alive","Location":"https://api.hubapi.com/crm/v3/objects/companies/22268214699","CF-Ray":"8af11ca6ffc37efe-MAA","CF-Cache-Status":"DYNAMIC","Content-Encoding":"gzip","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Vary":"origin, Accept-Encoding","access-control-allow-credentials":"false","x-content-type...`

## Get Company by ID

Retrieve details for a specific company in HubSpot CRM using the unique Company ID provided as a path parameter.

### Endpoint

- **URL:** `/crm/v3/objects/companies/{{companyId}}`
- **Method:** `GET`

### Input

| **Argument Name**                  | **Type** | **Required** | **Description**                                                                                                                                                                                   |
| ---------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters.properties`            | string   | Optional     | A comma separated list of the properties to be returned in the response. If the requested company doesn't have a value for a property, it will not appear in the response.                        |
| `parameters.propertiesWithHistory` | string   | Optional     | A comma separated list of the current and historical properties to be returned in the response. If the requested company doesn't have a value for a property, it will not appear in the response. |
| `parameters.associations`          | string   | Optional     | A comma separated list of objects to retrieve associated IDs for. Any specified associations that don't exist will not be returned in the response.                                               |
| `path_parameters.companyId`        | string   | Required     | Company ID.                                                                                                                                                                                       |

### Input Example

`{"parameters":{"properties":"domain,name","propertiesWithHistory":"name","associations":"56789"},"path_parameters":{"companyId":"22267481744"}}`

### Output

| **Parameter**                           | **Type** | **Description**                     |
| --------------------------------------- | -------- | ----------------------------------- |
| `status_code`                           | number   | HTTP status code of the response    |
| `reason`                                | string   | Response reason phrase              |
| `id`                                    | string   | Unique identifier                   |
| `properties`                            | object   | Output field: properties            |
| `properties.createdate`                 | string   | Date value                          |
| `properties.domain`                     | string   | Output field: properties.domain     |
| `properties.hs_lastmodifieddate`        | string   | Date value                          |
| `properties.hs_object_id`               | string   | Unique identifier                   |
| `properties.name`                       | string   | Name of the resource                |
| `propertiesWithHistory`                 | object   | Output field: propertiesWithHistory |
| `propertiesWithHistory.name`            | array    | Name of the resource                |
| `propertiesWithHistory.name.value`      | string   | Name of the resource                |
| `propertiesWithHistory.name.timestamp`  | string   | Name of the resource                |
| `propertiesWithHistory.name.sourceType` | string   | Name of the resource                |
| `propertiesWithHistory.name.sourceId`   | string   | Unique identifier                   |
| `createdAt`                             | string   | Output field: createdAt             |
| `updatedAt`                             | string   | Output field: updatedAt             |
| `archived`                              | boolean  | Output field: archived              |

### Output Example

`{"status_code":200,"response_headers":{"Date":"Tue, 06 Aug 2024 19:18:11 GMT","Content-Type":"application/json;charset=utf-8","Content-Length":"279","Connection":"keep-alive","CF-Ray":"8af15f1038de7efe-MAA","CF-Cache-Status":"DYNAMIC","Content-Encoding":"gzip","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Vary":"origin, Accept-Encoding","access-control-allow-credentials":"false","x-content-type-options":"nosniff","x-envoy-upstream-service-time":"108","x-evy-trace-li...`

## Retrieve Companies

Retrieves a comprehensive list of companies from HubSpot CRM, complete with names, IDs, and associated contacts.

### Endpoint

- **URL:** `/crm/v3/objects/companies`
- **Method:** `GET`

### Input

| **Argument Name**                  | **Type** | **Required** | **Description**                                                                                                                                                                                   |
| ---------------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `parameters.properties`            | string   | Optional     | A comma separated list of the properties to be returned in the response. If the requested company doesn't have a value for a property, it will not appear in the response.                        |
| `parameters.propertiesWithHistory` | string   | Optional     | A comma separated list of the current and historical properties to be returned in the response. If the requested company doesn't have a value for a property, it will not appear in the response. |
| `parameters.associations`          | string   | Optional     | A comma separated list of objects to retrieve associated IDs for. Any specified associations that don't exist will not be returned in the response.                                               |

### Input Example

`{"parameters":{"properties":"domain,name","propertiesWithHistory":"name","associations":"56789"}}`

### Output

| **Parameter**                            | **Type** | **Description**                  |
| ---------------------------------------- | -------- | -------------------------------- |
| `status_code`                            | number   | HTTP status code of the response |
| `reason`                                 | string   | Response reason phrase           |
| `results`                                | array    | Result of the operation          |
| `results.id`                             | string   | Unique identifier                |
| `results.properties`                     | object   | Result of the operation          |
| `results.properties.createdate`          | string   | Result of the operation          |
| `results.properties.domain`              | string   | Result of the operation          |
| `results.properties.hs_lastmodifieddate` | string   | Result of the operation          |
| `results.properties.hs_object_id`        | string   | Unique identifier                |
| `results.properties.name`                | string   | Name of the resource             |
| `results.createdAt`                      | string   | Result of the operation          |
| `results.updatedAt`                      | string   | Result of the operation          |
| `results.archived`                       | boolean  | Result of the operation          |

### Output Example

`{"status_code":200,"response_headers":{"Date":"Tue, 06 Aug 2024 18:03:10 GMT","Content-Type":"application/json;charset=utf-8","Content-Length":"242","Connection":"keep-alive","CF-Ray":"8af0f12dba297efe-MAA","CF-Cache-Status":"DYNAMIC","Content-Encoding":"gzip","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Vary":"origin, Accept-Encoding","access-control-allow-credentials":"false","x-content-type-options":"nosniff","x-envoy-upstream-service-time":"87","x-evy-trace-lis...`

## Update Company

Updates a company's details in HubSpot CRM using the provided Company ID and specified properties.

### Endpoint

- **URL:** `/crm/v3/objects/companies/{{companyId}}`
- **Method:** `PATCH`

### Input

| **Argument Name**           | **Type** | **Required** | **Description**                                                                                                                |
| --------------------------- | -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------ |
| `path_parameters.companyId` | string   | Required     | Parameters for the Update Company action                                                                                       |
| `properties`                | object   | Optional     | Parameter for Update Company                                                                                                   |
| `properties.name`           | string   | Optional     | The name of the company.                                                                                                       |
| `properties.domain`         | string   | Optional     | The company's website domain.                                                                                                  |
| `properties.city`           | string   | Optional     | The city where the company is located.                                                                                         |
| `properties.industry`       | string   | Optional     | The type of business the company performs. By default, this property has approximately 150 pre-defined options to select from. |
| `properties.phone`          | string   | Optional     | The company's primary phone number.                                                                                            |
| `properties.state`          | string   | Optional     | The state or region where the company is located.                                                                              |
| `properties.lifecyclestage` | string   | Optional     | A property used to indicate at what point the company is within the marketing/sales process.                                   |

### Input Example

`{"json_body":{"properties":{"name":"amazon","domain":"amazon.com","city":"USA","industry":"Design","phone":"555555555","state":"Massachusetts","lifecyclestage":"51439524"}},"path_parameters":{"companyId":"22267481744"}}`

### Output

| **Parameter**                       | **Type** | **Description**                                    |
| ----------------------------------- | -------- | -------------------------------------------------- |
| `status_code`                       | number   | HTTP status code of the response                   |
| `reason`                            | string   | Response reason phrase                             |
| `id`                                | string   | Unique identifier                                  |
| `properties`                        | object   | Output field: properties                           |
| `properties.city`                   | string   | Output field: properties.city                      |
| `properties.createdate`             | string   | Date value                                         |
| `properties.hs_lastmodifieddate`    | string   | Date value                                         |
| `properties.hs_object_id`           | string   | Unique identifier                                  |
| `properties.hs_object_source`       | string   | Output field: properties.hs\_object\_source        |
| `properties.hs_object_source_id`    | string   | Unique identifier                                  |
| `properties.hs_object_source_label` | string   | Output field: properties.hs\_object\_source\_label |
| `properties.hs_pipeline`            | string   | Output field: properties.hs\_pipeline              |
| `properties.lifecyclestage`         | string   | Output field: properties.lifecyclestage            |
| `createdAt`                         | string   | Output field: createdAt                            |
| `updatedAt`                         | string   | Output field: updatedAt                            |
| `archived`                          | boolean  | Output field: archived                             |

### Output Example

`{"status_code":200,"response_headers":{"Date":"Tue, 06 Aug 2024 19:26:09 GMT","Content-Type":"application/json;charset=utf-8","Content-Length":"239","Connection":"keep-alive","CF-Ray":"8af16aba9f477efe-MAA","CF-Cache-Status":"DYNAMIC","Content-Encoding":"gzip","Strict-Transport-Security":"max-age=31536000; includeSubDomains; preload","Vary":"origin, Accept-Encoding","access-control-allow-credentials":"false","x-content-type-options":"nosniff","x-envoy-upstream-service-time":"109","x-evy-trace-li...`

# Response Headers

| **Header**                                | **Description**                                                 | **Example**                                                                                                                                                                                                                                      |
| ----------------------------------------- | --------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| access-control-allow-credentials          | HTTP response header: access-control-allow-credentials          | false                                                                                                                                                                                                                                            |
| CF-Cache-Status                           | HTTP response header: CF-Cache-Status                           | DYNAMIC                                                                                                                                                                                                                                          |
| CF-Ray                                    | HTTP response header: CF-Ray                                    | 8af11ca6ffc37efe-MAA                                                                                                                                                                                                                             |
| Connection                                | HTTP response header: Connection                                | keep-alive                                                                                                                                                                                                                                       |
| Content-Encoding                          | HTTP response header: Content-Encoding                          | gzip                                                                                                                                                                                                                                             |
| Content-Length                            | The length of the response body in bytes                        | 281                                                                                                                                                                                                                                              |
| Content-Type                              | The media type of the resource                                  | application/json;charset=utf-8                                                                                                                                                                                                                   |
| Date                                      | The date and time at which the message was originated           | Tue, 06 Aug 2024 19:26:09 GMT                                                                                                                                                                                                                    |
| Location                                  | The URL to redirect a page to                                   | [https://api.hubapi.com/crm/v3/objects/companies/22268214699](https://api.hubapi.com/crm/v3/objects/companies/22268214699)                                                                                                                       |
| NEL                                       | HTTP response header: NEL                                       | \{"success\_fraction":0.01,"report\_to":"cf-nel","max\_age":604800}                                                                                                                                                                              |
| Report-To                                 | HTTP response header: Report-To                                 | \{"endpoints":\[\{"url":"https\://a.nel.cloudflare.com/report/v4?s=%2BpXuELSstwxtn1byl864uJbuhY4dJl9Uwm2XK5yYbvD9d%2FxfUZSc9hUjniPFm18ODHxjDnbTYM81Hk21FVFxaCqf0DmMCssB6%2B0YRnnGEQzMMQn9lnFxqjsE01gFjPFh"}],"group":"cf-nel","max\_age":604800} |
| Server                                    | Information about the software used by the origin server        | cloudflare                                                                                                                                                                                                                                       |
| Strict-Transport-Security                 | HTTP response header: Strict-Transport-Security                 | max-age=31536000; includeSubDomains; preload                                                                                                                                                                                                     |
| Vary                                      | HTTP response header: Vary                                      | origin, Accept-Encoding                                                                                                                                                                                                                          |
| x-content-type-options                    | HTTP response header: x-content-type-options                    | nosniff                                                                                                                                                                                                                                          |
| x-envoy-upstream-service-time             | HTTP response header: x-envoy-upstream-service-time             | 109                                                                                                                                                                                                                                              |
| x-evy-trace-listener                      | HTTP response header: x-evy-trace-listener                      | listener\_https                                                                                                                                                                                                                                  |
| x-evy-trace-route-configuration           | HTTP response header: x-evy-trace-route-configuration           | listener\_https/all                                                                                                                                                                                                                              |
| x-evy-trace-route-service-name            | HTTP response header: x-evy-trace-route-service-name            | envoyset-translator                                                                                                                                                                                                                              |
| x-evy-trace-served-by-pod                 | HTTP response header: x-evy-trace-served-by-pod                 | iad02/hubapi-td/envoy-proxy-85b74c4c74-2ftm6                                                                                                                                                                                                     |
| x-evy-trace-virtual-host                  | HTTP response header: x-evy-trace-virtual-host                  | all                                                                                                                                                                                                                                              |
| x-hubspot-correlation-id                  | HTTP response header: x-hubspot-correlation-id                  | 52c302e2-bf74-40c6-b291-0826c660d2e4                                                                                                                                                                                                             |
| x-hubspot-ratelimit-interval-milliseconds | HTTP response header: x-hubspot-ratelimit-interval-milliseconds | 10000                                                                                                                                                                                                                                            |
| x-hubspot-ratelimit-max                   | HTTP response header: x-hubspot-ratelimit-max                   | 100                                                                                                                                                                                                                                              |
| x-hubspot-ratelimit-remaining             | HTTP response header: x-hubspot-ratelimit-remaining             | 99                                                                                                                                                                                                                                               |
| x-hubspot-ratelimit-secondly              | HTTP response header: x-hubspot-ratelimit-secondly              | 10                                                                                                                                                                                                                                               |
| x-hubspot-ratelimit-secondly-remaining    | HTTP response header: x-hubspot-ratelimit-secondly-remaining    | 9                                                                                                                                                                                                                                                |
| x-request-id                              | A unique identifier for the request                             | 52c302e2-bf74-40c6-b291-0826c660d2e4                                                                                                                                                                                                             |
