> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/integrations/catalog/hubspot.md).

# HubSpot

HubSpot is a CRM platform for marketing, sales, and service. Connect to create and query contacts, companies, deals, notes, and pipelines from your AI workflows.

* MCP connection

### Connectors

Choose the connector that matches your authentication method. The options below use the names shown in StackAI.

| Connector     | Authentication |
| ------------- | -------------- |
| HubSpot       | OAuth sign-in  |
| HubSpot (MCP) | MCP with OAuth |

#### HubSpot

Connect to HubSpot CRM to access contacts, companies, deals, and marketing data. Supports customer relationship management and marketing automation.

**Set up in HubSpot**

1. Sign in to HubSpot and, if you manage more than one account, select the HubSpot account to connect.
2. Review and authorize the requested CRM permissions for contacts, companies, deals, tickets, and related data.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **HubSpot**.
2. Select **Connect**, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

StackAI obtains the OAuth credentials during sign-in. You do not need to paste an access token or refresh token.

**Provider documentation:** [Setup reference](https://www.hubspot.com/products/crm).

#### HubSpot (MCP)

Connect to HubSpot's MCP server for AI-powered access to your CRM contacts, companies, deals, and tickets. Uses HubSpot's native MCP authentication.

**Set up in HubSpot**

1. Sign in to HubSpot and select the account you want to connect to HubSpot's native MCP server.
2. Review and authorize the requested permissions for AI-powered access to your contacts, companies, deals, and tickets.

**Set up in StackAI**

1. Open **Settings → Connections**, add a connection, and select **HubSpot (MCP)**.
2. Select **Connect**, sign in to the provider account, and review the requested access. Complete authorization to return to StackAI.
3. Save the connection and check its connection status. Select this saved connection when configuring an action or feature that uses it.

**Connection fields**

| StackAI field          | Required                 | What to enter                                                                                                                                                                                                         |
| ---------------------- | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Client Secret          | Optional / as applicable | The OAuth client secret (e.g., 1234567890). You may not need to set this, the OAuth flow will try to set it with Dynamic Client Registration, but some MCP Servers don't support it, so they require a Client Secret. |
| Custom Headers         | Optional / as applicable | Enter the custom headers issued for the account or service you are connecting.                                                                                                                                        |
| MCP Server URL         | Yes                      | The MCP server URL (e.g., <https://mcp.example.com>).                                                                                                                                                                 |
| Client ID              | Optional / as applicable | The OAuth client ID (e.g., 1234567890). You may not need to set this, the OAuth flow will try to set it with Dynamic Client Registration, but some MCP Servers don't support it, so they require a Client ID.         |
| Authorization Endpoint | Optional / as applicable | The OAuth endpoint URL (e.g., <https://mcp.example.com/oauth2/authorize>). You probably don't have to set this, the OAuth flow will try to discover it on its own.                                                    |
| Description            | Optional / as applicable | Optional description for this MCP server connection.                                                                                                                                                                  |

**Provider documentation:** [Setup reference](https://developers.hubspot.com/mcp).

#### Verify the connection

Check that the connection is healthy. Then run a read operation against a resource the connected account can access. A successful connection check confirms authentication; it does not guarantee permission for every action.

If access is denied, check the credential or OAuth permissions, the selected account or environment, and access to the specific resource. Update expired credentials or reconnect after permissions change.

### Use an action

1. Add the required **HubSpot** action to the workflow.
2. Select a connection when the action requests one.
3. Complete the required fields. Use the reference picker when a value comes from another workflow step.
4. Run the workflow and inspect the action’s output. Check the result before using it in a later step.

### Actions

#### Create Contact

Create a new contact in HubSpot with the specified properties (email, name, phone). Optionally enable 'Return Existing If Found' to return an existing contact instead of failing when a duplicate email exists.

**Inputs**

| Field                    | Type            | Required | Description                                                                                                                                                                                                                                              |
| ------------------------ | --------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Email                    | string          | Yes      | The email address of the contact.                                                                                                                                                                                                                        |
| First Name               | string          | Yes      | The first name of the contact.                                                                                                                                                                                                                           |
| Last Name                | string          | Yes      | The last name of the contact.                                                                                                                                                                                                                            |
| Phone                    | string          | No       | The phone number of the contact. Default: .                                                                                                                                                                                                              |
| Lifecycle Stage          | select (string) | No       | The contact's lifecycle stage indicating where they are in your sales/marketing funnel (e.g., subscriber, lead, customer). Available values: Subscriber, Lead, Marketing Qualified Lead, Sales Qualified Lead, Opportunity, Customer, Evangelist, Other. |
| Lead Status              | select (string) | No       | The lead status indicating how this contact came in or their current engagement status. Available values: New, Open, In Progress, Open Deal, Unqualified, Attempted to Contact, Connected, Bad Timing.                                                   |
| Return Existing If Found | boolean         | No       | If enabled, returns an existing contact when one with the same email already exists instead of failing. When disabled (default), attempts to create a new contact and fails if a duplicate exists. Default: false.                                       |

**Outputs**

| Field       | Type    | Description                                                                   |
| ----------- | ------- | ----------------------------------------------------------------------------- |
| Contact     | object  | The contact object (created or existing).                                     |
| Was Created | boolean | True if a new contact was created, False if an existing contact was returned. |

#### Create HubSpot Deal

Create a new deal in HubSpot with a name, pipeline, stage, and optional details. Optionally associate with contacts and companies.

**Inputs**

| Field                    | Type                      | Required | Description                                                                                                                      |
| ------------------------ | ------------------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------- |
| Deal Name                | string                    | Yes      | The name of the deal.                                                                                                            |
| Pipeline                 | select (string)           | Yes      | The pipeline for the deal. The available deal stages depend on the selected pipeline. Options load from the selected connection. |
| Deal Stage               | select (string)           | Yes      | The stage of the deal in the selected pipeline. Options load from the selected connection.                                       |
| Amount                   | number                    | No       | The monetary value of the deal.                                                                                                  |
| Close Date               | date                      | No       | The expected close date for the deal.                                                                                            |
| Owner                    | select (string)           | No       | The HubSpot user who owns this deal. Options load from the selected connection.                                                  |
| Associate with Contacts  | multiple\_select (string) | No       | Select contacts to associate with this deal. Options load from the selected connection. Default: \[].                            |
| Associate with Companies | multiple\_select (string) | No       | Select companies to associate with this deal. Options load from the selected connection. Default: \[].                           |
| Custom Properties        | object                    | No       | Additional custom properties for the deal. Use this for any custom fields not covered by the standard fields above. Default: {}. |

**Outputs**

| Field     | Type   | Description                          |
| --------- | ------ | ------------------------------------ |
| Deal ID   | string | The ID of the newly created deal.    |
| Deal Data | object | All data for the newly created deal. |

#### Create Pipeline Stage

Create a new stage within a HubSpot pipeline for deals or tickets.

**Inputs**

| Field                       | Type            | Required | Description                                                                                                                          |
| --------------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| Object Type                 | select (string) | Yes      | The object type of the pipeline (standard or custom objects). Options load from the selected connection.                             |
| Pipeline                    | select (string) | Yes      | The pipeline to which the stage will be added. Options load from the selected connection.                                            |
| Stage Label                 | string          | Yes      | A unique label for this pipeline stage.                                                                                              |
| Display Order               | integer         | Yes      | The order for displaying this stage (0 = first).                                                                                     |
| Probability (Deals only)    | number          | No       | The likelihood a deal will close (0.0 to 1.0). Required for deals pipelines, ignored for tickets.                                    |
| Ticket State (Tickets only) | select (string) | No       | Whether tickets in this stage are open or closed. Optional for tickets pipelines, ignored for deals. Available values: Open, Closed. |

**Outputs**

| Field      | Type   | Description                                       |
| ---------- | ------ | ------------------------------------------------- |
| Stage ID   | string | The unique identifier of the newly created stage. |
| Stage Data | object | All data for the newly created pipeline stage.    |

#### List Contacts

List contacts from HubSpot with optional filtering by creation date. Enables browsing all contacts and provides dropdown sources for other actions.

**Inputs**

| Field          | Type    | Required | Description                                                                      |
| -------------- | ------- | -------- | -------------------------------------------------------------------------------- |
| Created After  | date    | No       | Filter contacts created after this date. Format: YYYY-MM-DD.                     |
| Created Before | date    | No       | Filter contacts created before this date. Format: YYYY-MM-DD.                    |
| Limit          | integer | No       | Maximum number of contacts to return. Default: 100. Range: 1-1000. Default: 100. |

**Outputs**

| Field    | Type          | Description                                                       |
| -------- | ------------- | ----------------------------------------------------------------- |
| Contacts | object\_array | Complete list of contacts from HubSpot with all their properties. |
| Count    | integer       | Total number of contacts returned.                                |

#### Get Company

Retrieve a company from HubSpot by name or ID.

**Inputs**

| Field               | Type            | Required | Description                                                                                                               |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| Company             | select (string) | Yes      | Select the company to retrieve from HubSpot. Options load from the selected connection.                                   |
| Include Attachments | boolean         | No       | If true, fetch every file attached to the company (via its notes) and return their StackAI download URLs. Default: false. |

**Outputs**

| Field       | Type        | Description                                                                             |
| ----------- | ----------- | --------------------------------------------------------------------------------------- |
| Company ID  | string      | The ID of the company.                                                                  |
| Company     | object      | The company information retrieved from HubSpot.                                         |
| Attachments | dict\_array | Files attached to the company via its notes. Empty unless include\_attachments is true. |

#### Get Contact

Get all data for a HubSpot contact. Select a contact from the dropdown to retrieve their complete information.

**Inputs**

| Field               | Type            | Required | Description                                                                                                               |
| ------------------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| Contact             | select (string) | Yes      | Select the contact to retrieve from HubSpot. Options load from the selected connection.                                   |
| Include Attachments | boolean         | No       | If true, fetch every file attached to the contact (via its notes) and return their StackAI download URLs. Default: false. |

**Outputs**

| Field        | Type        | Description                                                                             |
| ------------ | ----------- | --------------------------------------------------------------------------------------- |
| Contact ID   | string      | The ID of the contact that was retrieved.                                               |
| Contact Data | object      | All current data for the specified HubSpot contact.                                     |
| Attachments  | dict\_array | Files attached to the contact via its notes. Empty unless include\_attachments is true. |

#### Get Deal Data

Get all data, associated contacts, property history, and custom fields for a HubSpot deal. Select a deal from the dropdown to retrieve its complete information.

**Inputs**

| Field                   | Type            | Required | Description                                                                                                            |
| ----------------------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------- |
| Deal                    | select (string) | Yes      | Select the deal to retrieve from HubSpot. Options load from the selected connection.                                   |
| Include Contact Details | boolean         | No       | If true, fetch full details for each associated contact. Default: false.                                               |
| Include Attachments     | boolean         | No       | If true, fetch every file attached to the deal (via its notes) and return their StackAI download URLs. Default: false. |

**Outputs**

| Field                 | Type        | Description                                                                          |
| --------------------- | ----------- | ------------------------------------------------------------------------------------ |
| Deal ID               | string      | The ID of the deal.                                                                  |
| Deal Data             | object      | All data for the specified HubSpot deal, including custom fields.                    |
| Associated Contacts   | dict\_array | List of contacts associated with the deal (IDs and optionally details).              |
| Deal Property History | object      | The property history (audit trail) for the deal.                                     |
| Attachments           | dict\_array | Files attached to the deal via its notes. Empty unless include\_attachments is true. |

#### Get Deals for Contact

Get deals from HubSpot for a specific contact. Select a contact from the dropdown.

**Inputs**

| Field   | Type            | Required | Description                                                                          |
| ------- | --------------- | -------- | ------------------------------------------------------------------------------------ |
| Contact | select (string) | Yes      | Select the contact to retrieve deals for. Options load from the selected connection. |

**Outputs**

| Field       | Type        | Description                                |
| ----------- | ----------- | ------------------------------------------ |
| Deals       | dict\_array | List of deals associated with the contact. |
| Total Count | number      | Total number of deals found.               |

#### Get Emails for Company

Get the most recent emails logged against a HubSpot company by name or ID.

**Inputs**

| Field   | Type            | Required | Description                                                                                                                        |
| ------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Company | select (string) | Yes      | Select the company to retrieve emails for. Options load from the selected connection.                                              |
| Limit   | integer         | No       | Maximum number of most-recent emails to return (defaults to 5). Use 0 to return all associated emails (capped at 100). Default: 5. |

**Outputs**

| Field       | Type        | Description                                                    |
| ----------- | ----------- | -------------------------------------------------------------- |
| Emails      | dict\_array | List of emails for the specified company, sorted newest first. |
| Total Count | number      | Total number of emails returned.                               |

#### Get Emails for Contact

Get the most recent emails logged against a HubSpot contact by name or ID.

**Inputs**

| Field   | Type            | Required | Description                                                                                                                        |
| ------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| Contact | select (string) | Yes      | Select the contact to retrieve emails for. Options load from the selected connection.                                              |
| Limit   | integer         | No       | Maximum number of most-recent emails to return (defaults to 5). Use 0 to return all associated emails (capped at 100). Default: 5. |

**Outputs**

| Field       | Type        | Description                                                    |
| ----------- | ----------- | -------------------------------------------------------------- |
| Emails      | dict\_array | List of emails for the specified contact, sorted newest first. |
| Total Count | number      | Total number of emails returned.                               |

#### Get Notes by Timeframe

Get notes from HubSpot within a specific date range

**Inputs**

| Field      | Type | Required | Description                                                                                |
| ---------- | ---- | -------- | ------------------------------------------------------------------------------------------ |
| Start Date | date | Yes      | Start date for the timeframe (inclusive from 00:00:00).                                    |
| End Date   | date | No       | End date for the timeframe (inclusive until 23:59:59). If not provided, uses current date. |

**Outputs**

| Field       | Type        | Description                                       |
| ----------- | ----------- | ------------------------------------------------- |
| Notes       | dict\_array | List of notes within the specified timeframe.     |
| Total Count | number      | Total number of notes found within the timeframe. |

#### Get Notes for Company

Get notes from HubSpot for a specific company by name or ID

**Inputs**

| Field   | Type            | Required | Description                                                                          |
| ------- | --------------- | -------- | ------------------------------------------------------------------------------------ |
| Company | select (string) | Yes      | Select the company to retrieve notes for. Options load from the selected connection. |

**Outputs**

| Field       | Type        | Description                              |
| ----------- | ----------- | ---------------------------------------- |
| Notes       | dict\_array | List of notes for the specified company. |
| Total Count | number      | Total number of notes found.             |

#### Get Notes for Deal

Get notes from HubSpot for a specific deal

**Inputs**

| Field | Type            | Required | Description                                                                       |
| ----- | --------------- | -------- | --------------------------------------------------------------------------------- |
| Deal  | select (string) | Yes      | Select the deal to retrieve notes for. Options load from the selected connection. |

**Outputs**

| Field       | Type        | Description                           |
| ----------- | ----------- | ------------------------------------- |
| Notes       | dict\_array | List of notes for the specified deal. |
| Total Count | number      | Total number of notes found.          |

#### Get Pipeline Data

Get all data for a HubSpot pipeline, including stage names and metadata.

**Inputs**

| Field       | Type            | Required | Description                                                                                               |
| ----------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------- |
| Object Type | select (string) | Yes      | The object type for the pipeline (standard or custom objects). Options load from the selected connection. |
| Pipeline    | select (string) | Yes      | Select the pipeline to retrieve data for. Options load from the selected connection.                      |

**Outputs**

| Field         | Type   | Description                                           |
| ------------- | ------ | ----------------------------------------------------- |
| Pipeline ID   | string | The ID of the pipeline.                               |
| Pipeline Data | object | Complete pipeline data including stages and metadata. |

#### List HubSpot Pipelines and Stages

Get all pipelines and their stages for a HubSpot object type.

**Inputs**

| Field       | Type            | Required | Description                                                                                                |
| ----------- | --------------- | -------- | ---------------------------------------------------------------------------------------------------------- |
| Object Type | select (string) | Yes      | The object type for the pipelines (standard or custom objects). Options load from the selected connection. |

**Outputs**

| Field     | Type          | Description                                                |
| --------- | ------------- | ---------------------------------------------------------- |
| Pipelines | object\_array | Complete list of pipelines with their stages and metadata. |
| Count     | integer       | Total number of pipelines returned.                        |

#### List Companies

List companies from HubSpot with optional filtering by name, domain, or creation date. Enables browsing all companies and provides dropdown sources for other actions.

**Inputs**

| Field         | Type    | Required | Description                                                                       |
| ------------- | ------- | -------- | --------------------------------------------------------------------------------- |
| Company Name  | string  | No       | Filter companies by name (partial match).                                         |
| Domain        | string  | No       | Filter companies by domain.                                                       |
| Created After | date    | No       | Filter companies created after this date. Format: YYYY-MM-DD.                     |
| Limit         | integer | No       | Maximum number of companies to return. Default: 100. Range: 1-1000. Default: 100. |

**Outputs**

| Field     | Type          | Description                                                        |
| --------- | ------------- | ------------------------------------------------------------------ |
| Companies | object\_array | Complete list of companies from HubSpot with all their properties. |
| Count     | integer       | Total number of companies returned.                                |

#### List HubSpot Deals

List HubSpot deals with optional filters for pipeline, stage, amount, and creation date.

**Inputs**

| Field          | Type            | Required | Description                                                          |
| -------------- | --------------- | -------- | -------------------------------------------------------------------- |
| Pipeline       | select (string) | No       | Filter deals by pipeline. Options load from the selected connection. |
| Deal Stage     | select (string) | No       | Filter deals by stage. Options load from the selected connection.    |
| Minimum Amount | number          | No       | Filter deals with amount >= this value.                              |
| Maximum Amount | number          | No       | Filter deals with amount <= this value.                              |
| Created After  | date            | No       | Filter deals created after this date (YYYY-MM-DD).                   |
| Created Before | date            | No       | Filter deals created before this date (YYYY-MM-DD).                  |
| Limit          | integer         | No       | Maximum number of deals to return (1-1000). Default: 100.            |

**Outputs**

| Field | Type          | Description                                                    |
| ----- | ------------- | -------------------------------------------------------------- |
| Deals | object\_array | Complete list of deals from HubSpot with all their properties. |
| Count | integer       | Total number of deals returned.                                |

#### List HubSpot Owners

List all owners/users available in the HubSpot account.

**Inputs**

No input fields are required in this catalog entry.

**Outputs**

| Field  | Type          | Description                                                     |
| ------ | ------------- | --------------------------------------------------------------- |
| Owners | object\_array | Complete list of owners from HubSpot with all their properties. |
| Count  | integer       | Total number of owners returned.                                |

#### Query HubSpot

Query HubSpot CRM contacts using filter criteria

**Inputs**

| Field | Type     | Required | Description                            |
| ----- | -------- | -------- | -------------------------------------- |
| Query | textarea | Yes      | JSON query to filter HubSpot contacts. |

**Outputs**

| Field    | Type          | Description                                                          |
| -------- | ------------- | -------------------------------------------------------------------- |
| Query    | string        | The HubSpot query that was executed.                                 |
| Results  | string        | JSON string containing the contacts matching the query from HubSpot. |
| Contacts | object\_array | The contacts matching the query from HubSpot.                        |
| Count    | integer       | Total number of contacts returned.                                   |

#### Search Deals

Query HubSpot CRM deals using filter criteria

**Inputs**

| Field                        | Type     | Required | Description                                                                                                                                                                                          |
| ---------------------------- | -------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Query                        | textarea | Yes      | JSON query to filter HubSpot deals.                                                                                                                                                                  |
| Properties (comma-separated) | string   | No       | Comma-separated list of deal properties to return. Leave blank to return the standard fields (dealname, amount, pipeline, dealstage, owner, etc.). hubspot\_owner\_id is always included. Default: . |

**Outputs**

| Field   | Type   | Description                               |
| ------- | ------ | ----------------------------------------- |
| Query   | string | The HubSpot deal query that was executed. |
| Results | string | The results from the HubSpot deal query.  |

#### List Custom Objects

List custom object schemas from HubSpot with their properties and associations.

**Inputs**

| Field         | Type    | Required | Description                                                   |
| ------------- | ------- | -------- | ------------------------------------------------------------- |
| Show Archived | boolean | No       | If true, return only archived object schemas. Default: false. |

**Outputs**

| Field          | Type          | Description                                                        |
| -------------- | ------------- | ------------------------------------------------------------------ |
| Object Schemas | object\_array | List of all object schemas with their properties and associations. |
| Count          | integer       | Total number of object schemas returned.                           |

#### Create Note

Create a new note in HubSpot and associate it with a contact, company, or deal. Notes can be used to track activities, communications, and important information.

**Inputs**

| Field          | Type            | Required | Description                                                                                                           |
| -------------- | --------------- | -------- | --------------------------------------------------------------------------------------------------------------------- |
| Note Content   | textarea        | Yes      | The content/body of the note to create.                                                                               |
| Associate With | select (string) | Yes      | The type of object to associate this note with (Contact, Company, or Deal). Available values: Contact, Company, Deal. |
| Select Object  | select (string) | Yes      | The specific contact, company, or deal to associate this note with. Options load from the selected connection.        |

**Outputs**

| Field | Type   | Description                                            |
| ----- | ------ | ------------------------------------------------------ |
| Note  | object | The newly created note including its ID and timestamp. |

#### Get Message

Get all data for a HubSpot communication message (WhatsApp, LinkedIn, or SMS). First select a contact, then choose a message from their communications.

**Inputs**

| Field   | Type            | Required | Description                                                                                        |
| ------- | --------------- | -------- | -------------------------------------------------------------------------------------------------- |
| Contact | select (string) | Yes      | Select the contact whose messages you want to retrieve. Options load from the selected connection. |
| Message | select (string) | Yes      | Select the message to retrieve from HubSpot. Options load from the selected connection.            |

**Outputs**

| Field        | Type   | Description                                                       |
| ------------ | ------ | ----------------------------------------------------------------- |
| Message ID   | string | The ID of the message that was retrieved.                         |
| Message Data | object | All current data for the specified HubSpot communication message. |

#### Create Message

Log a new communication message (WhatsApp, LinkedIn, or SMS) to HubSpot. First select a contact, then specify the channel type and message body.

**Inputs**

| Field        | Type            | Required | Description                                                                                                                               |
| ------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
| Contact      | select (string) | Yes      | Select the contact to associate this message with. Options load from the selected connection.                                             |
| Channel Type | select (string) | Yes      | The communication channel type: WhatsApp, LinkedIn Message, or SMS. Available values: WhatsApp, LinkedIn Message, SMS.                    |
| Message Body | string          | Yes      | The text content of the message.                                                                                                          |
| Owner        | select (string) | Yes      | The HubSpot owner to attribute this message to. Select from the dropdown or enter an owner ID. Options load from the selected connection. |

**Outputs**

| Field   | Type   | Description                               |
| ------- | ------ | ----------------------------------------- |
| Message | object | The created communication message object. |

#### Update Message

Update an existing communication message (WhatsApp, LinkedIn, or SMS) in HubSpot. First select a contact, then choose a message to modify.

**Inputs**

| Field        | Type            | Required | Description                                                                                                                                                                  |
| ------------ | --------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Contact      | select (string) | Yes      | Select the contact whose messages you want to update. Options load from the selected connection.                                                                             |
| Message      | select (string) | Yes      | Select the message to update from HubSpot. Options load from the selected connection.                                                                                        |
| Message Body | string          | No       | The new text content of the message. Leave empty to keep unchanged. Default: .                                                                                               |
| Owner        | select (string) | No       | The new HubSpot owner to attribute this message to. Select from the dropdown or enter an owner ID. Leave empty to keep unchanged. Options load from the selected connection. |

**Outputs**

| Field   | Type   | Description                               |
| ------- | ------ | ----------------------------------------- |
| Message | object | The updated communication message object. |

#### List Messages

List communication messages (WhatsApp, LinkedIn, or SMS) for a contact. Optionally filter by owner, channel type, or date range.

**Inputs**

| Field        | Type            | Required | Description                                                                                                             |
| ------------ | --------------- | -------- | ----------------------------------------------------------------------------------------------------------------------- |
| Contact      | select (string) | Yes      | Select the contact whose messages you want to list. Options load from the selected connection.                          |
| Owner        | select (string) | No       | Filter messages by owner. Only show messages from this owner. Options load from the selected connection.                |
| Channel Type | select (string) | No       | Filter messages by channel type: WhatsApp, LinkedIn Message, or SMS. Available values: WhatsApp, LinkedIn Message, SMS. |
| Sent After   | date            | No       | Only show messages sent after this date (inclusive).                                                                    |
| Sent Before  | date            | No       | Only show messages sent before this date (inclusive).                                                                   |
| Limit        | integer         | No       | Maximum number of messages to return. Default: 100. Max: 1,000. Default: 100.                                           |

**Outputs**

| Field         | Type   | Description                            |
| ------------- | ------ | -------------------------------------- |
| Messages      | array  | List of communication messages.        |
| Message Count | number | The total number of messages returned. |

#### Search Companies

Search HubSpot CRM companies using free-text fuzzy matching and/or filter criteria

**Inputs**

| Field                        | Type     | Required | Description                                                                        |
| ---------------------------- | -------- | -------- | ---------------------------------------------------------------------------------- |
| Search Query                 | string   | No       | Free-text search query for fuzzy matching on company name, domain, etc. Default: . |
| Filter Groups (JSON)         | textarea | No       | JSON filter groups to narrow search results using structured criteria. Default: .  |
| Properties (comma-separated) | string   | No       | Comma-separated list of company properties to return. Default: .                   |
| Limit                        | integer  | No       | Maximum number of companies to return. Default: 100. Range: 1-10000. Default: 100. |

**Outputs**

| Field     | Type          | Description                                     |
| --------- | ------------- | ----------------------------------------------- |
| Companies | object\_array | List of companies matching the search criteria. |
| Count     | integer       | Total number of companies returned.             |

#### Search Custom Objects

Search custom object records in HubSpot using filter criteria. Supports simple equality filters and advanced filters with comparison operators (=, !=, <, <=, >, >=). If no filters provided, returns all records.

**Inputs**

| Field                 | Type    | Required | Description                                                                                                                       |
| --------------------- | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------- |
| Custom Object Type ID | string  | Yes      | The custom object type ID (e.g., '2-23456789'). Find this in your HubSpot URL: /objects/{object\_type\_id}/.                      |
| Filters               | object  | No       | Filter criteria as key-value pairs. All conditions must match (AND logic). Leave empty to return all records.                     |
| Advanced Filters      | array   | No       | Click + to add filter conditions. Format: 'property, operator, value' (e.g., 'revenue, <, 1000'). Operators: =, !=, <, <=, >, >=. |
| Created After         | string  | No       | Filter records created after this timestamp (ISO format).                                                                         |
| Created Before        | string  | No       | Filter records created before this timestamp (ISO format).                                                                        |
| Limit                 | integer | No       | Maximum number of records to return. Default: 1000. Max: 10,000. Default: 1000.                                                   |

**Outputs**

| Field   | Type          | Description                                                   |
| ------- | ------------- | ------------------------------------------------------------- |
| Records | object\_array | List of custom object records matching the search criteria.   |
| Count   | integer       | Total number of records returned.                             |
| Total   | integer       | Total number of records matching the criteria (if available). |

#### Search HubSpot

Search HubSpot CRM objects (contacts, companies, deals, meetings, etc.) using filter criteria. Optionally include specific properties and associations.

**Inputs**

| Field                | Type                      | Required | Description                                                                                                                                                                                                                          |
| -------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Object Type          | select (string)           | Yes      | The type of HubSpot object to search. Available values: Contacts, Companies, Deals, Tickets, Meetings, Calls, Emails, Tasks, Notes, Users, Custom Object (enter ID below).                                                           |
| Custom Object ID     | string                    | No       | Required if Object Type is 'Custom Object'. The custom object type ID (e.g., '2-23456789').                                                                                                                                          |
| Filters              | object                    | No       | Filter criteria as key-value pairs. All conditions must match (AND logic). Leave empty to return all records.                                                                                                                        |
| Advanced Filters     | array                     | No       | Click + to add filter conditions. Format: 'property, operator, value' (e.g., 'hs\_meeting\_outcome, =, COMPLETED'). Operators: =, !=, <, <=, >, >=, IN.                                                                              |
| Properties           | array                     | No       | Specific properties to return. Leave empty to return all available properties.                                                                                                                                                       |
| Include Associations | multiple\_select (string) | No       | Object types to include associations for. For example, select 'Contacts' to get linked contacts (with their properties and association labels) for each result. Available values: Contacts, Companies, Deals, Tickets. Default: \[]. |
| Created After        | string                    | No       | Filter records created after this timestamp (ISO format).                                                                                                                                                                            |
| Created Before       | string                    | No       | Filter records created before this timestamp (ISO format).                                                                                                                                                                           |
| Limit                | integer                   | No       | Maximum number of records to return. Default: 10,000. Max: 10,000. Default: 10000.                                                                                                                                                   |

**Outputs**

| Field       | Type          | Description                                                   |
| ----------- | ------------- | ------------------------------------------------------------- |
| Object Type | string        | The object type that was searched.                            |
| Records     | object\_array | List of records matching the search criteria.                 |
| Count       | integer       | Total number of records returned.                             |
| Total       | integer       | Total number of records matching the criteria (if available). |

#### Create Company

Create a new company in HubSpot with the specified properties (name, domain, industry, phone, address, lifecycle stage).

**Inputs**

| Field                   | Type                      | Required | Description                                                                                                                                                                                                                                                                           |
| ----------------------- | ------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                    | string                    | Yes      | The name of the company.                                                                                                                                                                                                                                                              |
| Domain                  | string                    | No       | The primary website domain of the company. Default: .                                                                                                                                                                                                                                 |
| Industry                | string                    | No       | The industry the company operates in. Must use HubSpot's enum values (UPPERCASE\_WITH\_UNDERSCORES, no spaces) — e.g., COMPUTER\_SOFTWARE, RETAIL, FINANCIAL\_SERVICES. The exact list of allowed values depends on your HubSpot portal's Industry property configuration. Default: . |
| Phone                   | string                    | No       | The primary phone number of the company. Default: .                                                                                                                                                                                                                                   |
| City                    | string                    | No       | The city where the company is located. Default: .                                                                                                                                                                                                                                     |
| State / Region          | string                    | No       | The state or region where the company is located. Default: .                                                                                                                                                                                                                          |
| Country                 | string                    | No       | The country where the company is located. Default: .                                                                                                                                                                                                                                  |
| Lifecycle Stage         | select (string)           | No       | The company's lifecycle stage indicating where they are in your sales/marketing funnel (e.g., lead, opportunity, customer). Available values: Subscriber, Lead, Marketing Qualified Lead, Sales Qualified Lead, Opportunity, Customer, Evangelist, Other.                             |
| Associate with Contacts | multiple\_select (string) | No       | Select contacts to associate with this company. Options load from the selected connection. Default: \[].                                                                                                                                                                              |
| Associate with Deals    | multiple\_select (string) | No       | Select deals to associate with this company. Options load from the selected connection. Default: \[].                                                                                                                                                                                 |

**Outputs**

| Field   | Type   | Description                       |
| ------- | ------ | --------------------------------- |
| Company | object | The newly created company object. |

#### Get Ticket

Retrieve a ticket from HubSpot by ID.

**Inputs**

| Field  | Type            | Required | Description                                                                              |
| ------ | --------------- | -------- | ---------------------------------------------------------------------------------------- |
| Ticket | select (string) | Yes      | Select a ticket or enter a HubSpot ticket ID. Options load from the selected connection. |

**Outputs**

| Field     | Type   | Description                                    |
| --------- | ------ | ---------------------------------------------- |
| Ticket ID | string | The ID of the ticket.                          |
| Ticket    | object | The ticket information retrieved from HubSpot. |

#### Create Ticket

Create a new ticket in HubSpot with subject, body, pipeline, stage, priority and optional associations with contacts, companies, or deals.

**Inputs**

| Field                    | Type                      | Required | Description                                                                                                           |
| ------------------------ | ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------- |
| Subject                  | string                    | Yes      | The title or subject line of the ticket.                                                                              |
| Content                  | textarea                  | No       | The body of the ticket describing the issue. Default: .                                                               |
| Pipeline                 | select (string)           | Yes      | The ticket pipeline. The available stages depend on the selected pipeline. Options load from the selected connection. |
| Stage                    | select (string)           | Yes      | The stage of the ticket in the selected pipeline. Options load from the selected connection.                          |
| Priority                 | select (string)           | No       | The priority level of the ticket. Available values: Low, Medium, High.                                                |
| Owner                    | select (string)           | No       | The HubSpot user assigned to this ticket. Options load from the selected connection.                                  |
| Associate with Contacts  | multiple\_select (string) | No       | Select contacts to associate with this ticket. Options load from the selected connection. Default: \[].               |
| Associate with Companies | multiple\_select (string) | No       | Select companies to associate with this ticket. Options load from the selected connection. Default: \[].              |
| Associate with Deals     | multiple\_select (string) | No       | Select deals to associate with this ticket. Options load from the selected connection. Default: \[].                  |

**Outputs**

| Field  | Type   | Description                      |
| ------ | ------ | -------------------------------- |
| Ticket | object | The newly created ticket object. |

#### Update Ticket

Update an existing ticket in HubSpot. Only the fields you provide are changed; unspecified fields are left as-is.

**Inputs**

| Field    | Type            | Required | Description                                                                                                                                                              |
| -------- | --------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Ticket   | select (string) | Yes      | Select a ticket or enter a HubSpot ticket ID to update. Options load from the selected connection.                                                                       |
| Subject  | string          | No       | The new subject of the ticket. Leave empty to keep unchanged. Default: .                                                                                                 |
| Content  | textarea        | No       | The new body of the ticket. Leave empty to keep unchanged. Default: .                                                                                                    |
| Pipeline | select (string) | No       | Move the ticket to a different pipeline. The available stages depend on the selected pipeline. Leave empty to keep unchanged. Options load from the selected connection. |
| Stage    | select (string) | No       | The new stage of the ticket. Leave empty to keep unchanged. Options load from the selected connection.                                                                   |
| Priority | select (string) | No       | The new priority of the ticket. Leave empty to keep unchanged. Available values: Low, Medium, High.                                                                      |
| Owner    | select (string) | No       | The new HubSpot owner assigned to this ticket. Options load from the selected connection.                                                                                |

**Outputs**

| Field  | Type   | Description                |
| ------ | ------ | -------------------------- |
| Ticket | object | The updated ticket object. |

### Important behavior

If an operation is denied, check the connection’s granted permissions and the account’s access in the provider. Reauthorize the connection when it needs additional permissions.

Actions that create, update, send, or delete data can change the connected service. Review their inputs before running them. A retry can repeat an operation; consider this when configuring retries for actions that change data.

The catalog lists the fields and capabilities available in the supplied provider definition. Availability can also depend on your deployment and organization’s Feature Access settings.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/integrations/catalog/hubspot.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
