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

# HubSpot

> Let your agents search your HubSpot CRM, read marketing email data, and create or update records.

With the HubSpot tool, your agents can search your CRM, read marketing email data, and create or update records like contacts, deals, tickets, and tasks. An admin connects HubSpot once, then people can add it to their agents.

## What your agent can do in HubSpot

| Action | What it does | Changes data |
| :- | :- | :- |
| Search and read records | Searches, filters, and reads contacts, companies, deals, leads, tickets, custom objects, and activity records like tasks, notes, meetings, calls, and emails. Also gets a meeting by its ID, or the meetings linked to a contact, company, or deal. | No |
| Count records | Counts contacts, companies, or deals that match given properties, up to 10,000. | No |
| Export to CSV | Exports records of any type to a CSV file the agent can query as a table, up to 2,000 rows. | No |
| Look up properties and object types | Lists the properties of an object type, and the custom object types in your HubSpot account. | No |
| Find owners and activity | Lists and searches owners, finds your own HubSpot user, and gets a user's activity across tasks, notes, meetings, calls, and emails. | No |
| Read associations | Lists the records linked to a contact, company, or deal, and the association labels available between two object types. | No |
| Get links and files | Builds links to HubSpot pages and records, and gets a public URL for a file. | No |
| Read marketing emails | Lists and reads marketing emails, their statistics, email events (opens, clicks, bounces), and email campaigns. | No |
| Create records | Creates contacts, companies, deals, leads, tickets, tasks, notes, meetings, communications (WhatsApp, LinkedIn, SMS), and custom object records. | Yes |
| Update records | Updates contacts, companies, deals, tasks, and custom object records, and marks tasks as completed. | Yes |
| Delete tasks | Deletes a task. | Yes |
| Manage associations | Links a contact, company, or deal to another one, with or without a label, or removes that link. | Yes |

The list in Dust is the source of truth, and it can change before this page does. To see every HubSpot tool, go to **Spaces** > **Tools**, select **HubSpot**, and open **Tools & stakes**.

## Before you start

* **In Dust:** you need to be an admin to connect HubSpot.
* **In HubSpot:** the HubSpot user who approves the connection must be a Super Admin or have the **HubSpot Marketplace Access** permission.

## Connect HubSpot (admins)

**1. Add the tool**

Go to **Spaces** > **Tools**, click **Add tools**, and select **HubSpot**.

**2. Choose how people connect**

Keep **Personal accounts**, selected by default, or pick **Shared account** (see below).

**3. Sign in to HubSpot**

Click **Setup connection**, sign in with your HubSpot account, and approve the permissions Dust asks for.

* **Personal accounts:** each person connects their own HubSpot account the first time an agent uses HubSpot. Actions then follow their HubSpot permissions and show under their name in HubSpot. A personal connection can only get the permissions that were granted when the admin connected HubSpot.
* **Shared account:** every agent uses the HubSpot account of the admin who connected it.

See [Personal vs Shared Credentials](https://docs.dust.tt/docs/user-documentation/admins/tools-management/personal-vs-shared-credentials.md) and [Managing Tools](https://docs.dust.tt/docs/user-documentation/admins/tools-management/adding-an-mcp-server.md) for more on tool setup.

## Add HubSpot to an agent

**1. Open your agent in the Agent Builder**

Create an agent, or open one you can edit.

**2. Add the tool**

In **Capabilities and knowledge**, click **Add capabilities** and select **HubSpot**. It needs no configuration.

**3. Say which records to work with**

In the instructions, name the HubSpot objects the agent should use, and when it should create or update them.

By default, tools that read data run without asking (**Never ask**), and tools that change data ask for approval every time (**High**). Admins can change the level of each tool in **Spaces** > **Tools** > **HubSpot** > **Tools & stakes**:

* **High:** needs explicit user approval.
* **Medium:** users can save confirmations for specific tool inputs, or skip them for the rest of a conversation session.
* **Low:** users can completely disable confirmations.
* **Never ask:** runs automatically.

> [!WARNING]
>
> Keep every tool that changes data in your CRM at **High**, so a person approves each change before it happens.

## Example instructions

```text theme={null}
After each sales call transcript, look for a HubSpot contact with the person's name or email, and create one if there's none. If the call set up a deal, create the deal and link it to the company.
```

## HubSpot permissions

When you connect HubSpot, Dust asks HubSpot for the permissions (OAuth scopes) below. Only `oauth` is required. The others are optional: if your HubSpot account can't grant one, the connection still works, but agents can't reach the matching objects.

| HubSpot feature | Scopes |
| - | - |
| Contacts | `crm.objects.contacts.read`, `crm.objects.contacts.write`, `crm.schemas.contacts.read` |
| Companies | `crm.objects.companies.read`, `crm.objects.companies.write`, `crm.schemas.companies.read` |
| Deals | `crm.objects.deals.read`, `crm.objects.deals.write`, `crm.schemas.deals.read` |
| Leads | `crm.objects.leads.read`, `crm.objects.leads.write` |
| Owners | `crm.objects.owners.read` |
| Custom objects | `crm.schemas.custom.read`, `crm.objects.custom.read`, `crm.objects.custom.write` |
| Quotes and line items | `crm.objects.quotes.read`, `crm.objects.line_items.read` |
| Products | `crm.objects.products.read` |
| Lists | `crm.lists.read`, `crm.lists.write` |
| Tickets | `crm.objects.tickets.read`, `crm.objects.tickets.write`, `crm.schemas.tickets.read`, `crm.schemas.tickets.write` |
| Files | `files` |
| Sales emails | `sales-email-read` |
| Timeline events | `timeline` |
| Marketing emails | `marketing-email` |
| CMS content | `content` |

## Limits

* **Counts** stop at 10,000 records.
* **CSV exports** stop at 2,000 rows per export.
* **Associations** can only be listed, created, or removed between contacts, companies, and deals. When the agent creates a record, it can also link the new record to existing ones. A ticket's related emails, notes, and calls aren't reachable that way. To get a ticket's related activity, have the agent search those activity records directly and match them to the ticket.
* **Marketing campaigns** and campaign revenue reporting aren't covered: Dust doesn't request `marketing.campaigns.read` or `marketing.campaigns.revenue.read`.

## Troubleshooting

| Error or symptom | What to do |
| :- | :- |
| HubSpot says you don't have permission to install the app | The HubSpot user approving the connection must be a Super Admin or have the **HubSpot Marketplace Access** permission. Ask your HubSpot admin for it, then connect again. |
| A HubSpot action fails with a `403` error for one person, but works for others on the same agent | That person needs to reconnect: open **Tools** from the user menu, click **…** next to HubSpot, select **Disconnect**, then click **Connect**. See [Managing your personal credentials](https://docs.dust.tt/docs/user-documentation/admins/tools-management/personal-vs-shared-credentials.md#managing-your-personal-credentials-for-users). |
| Requests about campaigns or revenue attribution fail with `403 MISSING_SCOPES` | Campaigns aren't supported (see **Limits**). Reconnecting HubSpot won't fix it: it can only add the permissions listed above. |

## Related

> [card] [Personal vs Shared Credentials](https://docs.dust.tt/docs/user-documentation/admins/tools-management/personal-vs-shared-credentials.md)
>
> How each connection type works for tools.

> [card] [Managing Tools](https://docs.dust.tt/docs/user-documentation/admins/tools-management/adding-an-mcp-server.md)
>
> Add tools to your workspace and choose who can use them.

> [card] [Tools](https://docs.dust.tt/docs/user-documentation/agents/tools/index)
>
> All the tools your agents can use.


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