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

# HubSpot

> Add a bot to HubSpot using the official integration.

[Open in Hub](https://studio.botpress.cloud/home?exploreHub=1\&hubItemId=intver_01KTV8S0ZX48N54R7AVG24CHJZ)
*v6.0.9*

The official HubSpot integration allows your bot to interact with your HubSpot account.

## Setup

> [!NOTE]
>
> You will need:
>
> * A [published bot](https://botpress.com/docs/get-started/quick-start.md)
> * A [HubSpot account](https://hubspot.com)

1. In Botpress Studio, select **Explore Hub** in the upper-right corner.
2. Search for the **HubSpot** integration, then select **Install Integration**.
3. In the **Configuration** menu, select **Authorize HubSpot**.
4. Follow the instructions to connect Botpress to your HubSpot account.

> [!TIP]
>
> Your HubSpot integration is ready—you can use the integration's [Cards](https://botpress.com/docs/studio/concepts/cards/introduction.md) and [Triggers](https://botpress.com/docs/studio/concepts/triggers.md) to interact with your HubSpot account.

***

## Cards

{/* vale off */}

Here's a reference for all [Cards](https://botpress.com/docs/studio/concepts/cards/introduction.md) available with the integration:

### Create Contact

Create a contact in HubSpot

**input** `object`

**email** `string`

The email of the contact

**phone** `string`

The phone number of the contact

**owner** `string`

The ID or email of the owner of the contact

**companies** `array`

The companies to which the contact is associated

**array item properties**

**idOrNameOrDomain** `string` *required*

The ID, name or domain of the company

**primary** `boolean`

Whether the contact is the primary contact for the company

**tickets** `array`

The tickets to which the contact is associated

**properties** `array`

Additional properties of the contact

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**contact** `object` *required*

The created contact

**id** `string` *required*

The ID of the contact

**email** `string` *required*

The email of the contact

**phone** `string` *required*

The phone number of the contact

**createdAt** `string` *required*

The date and time the contact was created

**updatedAt** `string` *required*

The date and time the contact was last updated

**properties** `object` *required*

The properties of the contact

### Create Deal

Create a deal in HubSpot

**input** `object`

**name** `string` *required*

The name of the deal

**properties** `array`

The properties of the deal

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**deal** `object` *required*

The created deal

**id** `string` *required*

The ID of the deal

**name** `string` *required*

The name of the deal

**createdAt** `string` *required*

Creation date of the deal

**updatedAt** `string` *required*

Last time the deal was updated

**properties** `object` *required*

The properties of the deal

### Create Lead

Create a lead in HubSpot

**input** `object`

**name** `string` *required*

The name of the lead

**contact** `string` *required*

The contact to associate the lead with. Can be an email address or contact ID

**properties** `array`

The properties of the lead

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**lead** `object` *required*

The created lead

**id** `string` *required*

The ID of the lead

**name** `string` *required*

The name of the lead

**createdAt** `string` *required*

Creation date of the lead

**updatedAt** `string` *required*

Last time the lead was updated

**properties** `object` *required*

The properties of the lead

### Create Ticket

Create a ticket in HubSpot

**input** `object`

**subject** `string` *required*

Short summary of ticket

**category** `string`

Main reason customer reached out for help

**description** `string`

Description of the ticket

**priority** `string`

The level of attention needed on the ticket

**source** `string`

The original source of the ticket

**pipeline** `string` *required*

The pipeline that contains this ticket. Can be a name or internal ID

**pipelineStage** `string` *required*

The pipeline stage that contains this ticket. Can be a name or internal ID

**ticketOwner** `string`

User the ticket is assigned to. Can be an email address or user ID

**requester** `string`

The ticket requester. Can be an email address or contact ID

**company** `string`

The company associated with the ticket. Can be a name, domain, or company ID

**properties** `array`

Additional ticket properties

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**ticket** `object` *required*

The created ticket

**id** `string` *required*

The ID of the ticket

**subject** `string` *required*

Short summary of ticket

**category** `string` *required*

Main reason customer reached out for help

**description** `string` *required*

Description of the ticket

**priority** `string` *required*

The level of attention needed on the ticket

**source** `string` *required*

The original source of the ticket

**properties** `object` *required*

The properties of the ticket

### Delete Contact

Delete a contact in HubSpot

**input** `object`

**contactId** `string` *required*

The ID of the contact to delete

**output** `object`

This Card has no output.

### Delete Deal

Delete a deal in HubSpot

**input** `object`

**dealId** `string` *required*

The ID of the deal to delete

**output** `object`

This Card has no output.

### Delete Lead

Delete a lead in HubSpot

**input** `object`

**leadId** `string` *required*

The ID of the lead to delete

**output** `object`

This Card has no output.

### Get Company

Get a company from HubSpot by ID

**input** `object`

**companyId** `string` *required*

The ID of the company to get

**propertiesToReturn** `array`

Additional properties to return (e.g., \["health\_status", "industry"]). Default properties are always included.

**output** `object`

**company** `object` *required*

The fetched company

**id** `string` *required*

The ID of the company

**name** `string` *required*

The name of the company

**domain** `string` *required*

The domain of the company

**createdAt** `string` *required*

Creation date of the company

**updatedAt** `string` *required*

Last time the company was updated

**properties** `object` *required*

The properties of the company

### Get Contact

Get a contact from HubSpot

**input** `object`

**contactIdOrEmail** `string` *required*

The ID or email of the contact to get

**output** `object`

**contact** `object` *required*

The fetched contact

**id** `string` *required*

The ID of the contact

**email** `string` *required*

The email of the contact

**phone** `string` *required*

The phone number of the contact

**createdAt** `string` *required*

The date and time the contact was created

**updatedAt** `string` *required*

The date and time the contact was last updated

**properties** `object` *required*

The properties of the contact

**url** `string` *required*

The URL to the contact's page in the HubSpot UI

### Get Deal

Get a deal from HubSpot

**input** `object`

**dealId** `string` *required*

The ID of the deal to get

**output** `object`

**deal** `object` *required*

The fetched deal

**id** `string` *required*

The ID of the deal

**name** `string` *required*

The name of the deal

**createdAt** `string` *required*

Creation date of the deal

**updatedAt** `string` *required*

Last time the deal was updated

**properties** `object` *required*

The properties of the deal

### Get File URL

Get a URL to access a file stored in Hubspot Files

**input** `object`

**fileName** `string` *required*

The path to the Hubspot file

**output** `object`

**url** `string`

The URL of the file, or undefined if not available

### Get Lead

Get a lead from HubSpot

**input** `object`

**leadId** `string` *required*

The ID of the lead to get

**output** `object`

**lead** `object` *required*

The fetched lead

**id** `string` *required*

The ID of the lead

**name** `string` *required*

The name of the lead

**createdAt** `string` *required*

Creation date of the lead

**updatedAt** `string` *required*

Last time the lead was updated

**properties** `object` *required*

The properties of the lead

### Get Owner

Get a Hubspot owner (user) by ID. Used to resolve owner references on contacts, deals, etc.

**input** `object`

**ownerId** `string` *required*

The ID of the owner to fetch

**output** `object`

**owner** `object`

The owner found, or undefined if not found

**id** `string` *required*

The ID of the owner

**email** `string`

The email of the owner

**firstName** `string`

The first name of the owner

**lastName** `string`

The last name of the owner

**userId** `number`

The Hubspot user ID associated with the owner

**type** `string` *required*

The type of owner (e.g. PERSON, QUEUE)

**archived** `boolean` *required*

Whether the owner is archived

**createdAt** `string` *required*

The date and time the owner was created

**updatedAt** `string` *required*

The date and time the owner was last updated

### List Contact Properties

List all available Hubspot contact properties with their metadata

**input** `object`

This Card has no input fields.

**output** `object`

**properties** `array` *required*

The contact properties defined in this Hubspot account

**array item properties**

**name** `string` *required*

The internal name of the property

**label** `string` *required*

The human-readable label of the property

**type** `string` *required*

The data type of the property (e.g. string, number, date, datetime, enumeration, bool)

**fieldType** `string` *required*

The form field type of the property (e.g. text, textarea, select, radio, checkbox)

**groupName** `string` *required*

The internal name of the property group

**description** `string` *required*

The description of the property

**referencedObjectType** `string`

The type of object referenced by this property (e.g. OWNER), if any

### List Contacts

List contacts in HubSpot

**input** `object`

**meta** `object` *required*

Metadata containing pagination information

**nextToken** `string`

The token to get the next page of contacts

**output** `object`

**contacts** `array` *required*

The contacts found

**array item properties**

**id** `string` *required*

The ID of the contact

**email** `string` *required*

The email of the contact

**phone** `string` *required*

The phone number of the contact

**createdAt** `string` *required*

The date and time the contact was created

**updatedAt** `string` *required*

The date and time the contact was last updated

**properties** `object` *required*

The properties of the contact

**meta** `object` *required*

Metadata containing pagination information

**nextToken** `string`

The token to get the next page of contacts

### Search Company

Search for a company in HubSpot

**input** `object`

**name** `string`

The name of the company to search for

**domain** `string`

The domain of the company to search for

**output** `object`

**company** `object`

The company found

**id** `string` *required*

The ID of the company

**name** `string` *required*

The name of the company

**domain** `string` *required*

The domain of the company

**createdAt** `string` *required*

Creation date of the company

**updatedAt** `string` *required*

Last time the company was updated

**properties** `object` *required*

The properties of the company

### Search Contact

Search for a contact in HubSpot

**input** `object`

**email** `string`

The email of the contact to search for

**phone** `string`

The phone number of the contact to search for

**properties** `array`

The list of property names to fetch on the matching contact. Defaults to all properties.

**output** `object`

**contact** `object`

The contact found, or undefined if not found

**id** `string` *required*

The ID of the contact

**email** `string` *required*

The email of the contact

**phone** `string` *required*

The phone number of the contact

**createdAt** `string` *required*

The date and time the contact was created

**updatedAt** `string` *required*

The date and time the contact was last updated

**properties** `object` *required*

The properties of the contact

**url** `string`

The URL to the contact's page in the HubSpot UI, or undefined if no contact was found

### Search Deal

Search for a deal in HubSpot

**input** `object`

**name** `string`

The name of the deal to search for

**output** `object`

**deal** `object`

The deal found, or undefined if not found

**id** `string` *required*

The ID of the deal

**name** `string` *required*

The name of the deal

**createdAt** `string` *required*

Creation date of the deal

**updatedAt** `string` *required*

Last time the deal was updated

**properties** `object` *required*

The properties of the deal

### Search Lead

Search for a lead in HubSpot

**input** `object`

**name** `string`

The name of the lead to search for

**output** `object`

**lead** `object`

The lead found, or undefined if not found

**id** `string` *required*

The ID of the lead

**name** `string` *required*

The name of the lead

**createdAt** `string` *required*

Creation date of the lead

**updatedAt** `string` *required*

Last time the lead was updated

**properties** `object` *required*

The properties of the lead

### Update Company

Update a company in HubSpot

**input** `object`

**companyId** `string` *required*

The ID of the company to update

**properties** `array` *required*

Properties to update on the company

**array item properties**

**name** `string` *required*

The name of the property (e.g., "health\_status")

**value** `string` *required*

The value of the property

**output** `object`

**company** `object` *required*

The updated company

**id** `string` *required*

The ID of the company

**name** `string`

The name of the company

**domain** `string`

The domain of the company

**createdAt** `string` *required*

Creation date of the company

**updatedAt** `string` *required*

Last time the company was updated

**properties** `object` *required*

The properties of the company

### Update Contact

Update a contact in HubSpot

**input** `object`

**contactIdOrEmail** `string` *required*

The ID or email of the contact to update

**email** `string`

The new email of the contact

**phone** `string`

The new phone number of the contact

**properties** `array`

Additional properties of the contact

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The new value of the property

**output** `object`

**contact** `object` *required*

The updated contact

**id** `string` *required*

The ID of the contact

**email** `string`

The email of the contact

**phone** `string`

The phone number of the contact

**createdAt** `string` *required*

The date and time the contact was created

**updatedAt** `string` *required*

The date and time the contact was last updated

**properties** `object` *required*

The properties of the contact

### Update Deal

Update a deal in HubSpot

**input** `object`

**dealId** `string` *required*

The ID of the deal to update

**name** `string`

The name of the deal

**properties** `array`

The properties of the deal

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**deal** `object` *required*

The updated deal

**id** `string` *required*

The ID of the deal

**name** `string`

The name of the deal

**createdAt** `string` *required*

Creation date of the deal

**updatedAt** `string` *required*

Last time the deal was updated

**properties** `object` *required*

The properties of the deal

### Update Lead

Update a lead in HubSpot

**input** `object`

**leadId** `string` *required*

The ID of the lead to update

**name** `string`

The name of the lead

**properties** `array`

The properties of the lead

**array item properties**

**name** `string` *required*

The name of the property

**value** `string` *required*

The value of the property

**output** `object`

**lead** `object` *required*

The updated lead

**id** `string` *required*

The ID of the lead

**name** `string`

The name of the lead

**createdAt** `string` *required*

Creation date of the lead

**updatedAt** `string` *required*

Last time the lead was updated

**properties** `object` *required*

The properties of the lead

***

## Triggers

{/* vale off */}

Here's a reference for all [Triggers](https://botpress.com/docs/studio/concepts/triggers.md) available with the integration:

> [!TIP]
>
> You can access data returned from any of these Triggers by reading `event.payload` after the Trigger fires.

### Company Created

A new company has been created in HubSpot.

**payload** `object`

**companyId** `string` *required*

The ID of the created company

**name** `string`

The name of the created company

**domain** `string`

The domain of the created company

**phoneNumber** `string`

The phone number of the created company

### Company Deleted

A company has been deleted in HubSpot.

**payload** `object`

**companyId** `string` *required*

The ID of the deleted company

### Contact Created

A new contact has been created in HubSpot.

**payload** `object`

**contactId** `string` *required*

The ID of the created contact

**name** `string`

The name of the created contact

**email** `string`

The email of the created contact

**phoneNumber** `string`

The phone number of the created contact

### Contact Deleted

A contact has been deleted in HubSpot.

**payload** `object`

**contactId** `string` *required*

The ID of the deleted contact

### Ticket Created

A new ticket has been created in HubSpot.

**payload** `object`

**ticketId** `string` *required*

The ID of the created ticket

**subject** `string`

The subject of the created ticket

**priority** `string`

The priority of the created ticket

**category** `string`

The category of the created ticket

**pipeline** `string` *required*

The pipeline of the created ticket

**stage** `string` *required*

The stage of the created ticket

### Ticket Deleted

A ticket has been deleted in HubSpot.

**payload** `object`

**ticketId** `string` *required*

The ID of the deleted ticket


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.