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

# HubSpot

Invite your AI teammate into HubSpot so it replies to inbox tickets with the CRM record behind them, and learns from your knowledge base and past tickets.

In HubSpot your support inbox sits next to your CRM. So your AI teammate can read the ticket and, once you allow it, the customer record behind it at the same time. It reads your HubSpot knowledge base and your past tickets, so it already knows how your team answers before it picks anything up. Then it works your queue the way you tell it to: writing replies for a human to check, answering the routine ones itself, creating, prioritizing and updating tickets as it goes.

You stay in control the whole way. Nothing runs until you create an automation. For each action you then choose: run on its own, ask you first, or stay off.

In this example the agent read the ticket, checked the knowledge base, and left its draft as an internal comment.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-091b3a14bb4d508fcefc49aebf53dccce0663a74%2Fhubspot-hero.png?alt=media" alt="A HubSpot ticket about a duplicate invoice charge, with eesel AI posting an internal comment showing it read the ticket and checked the knowledge base"><figcaption><p>Your agent works inside HubSpot Service Hub, reading the ticket and the record behind it, and showing its work.</p></figcaption></figure>

## Quick start

{% stepper %}
{% step %}

### Ask your agent to connect HubSpot

Open the chat in your dashboard and ask it to connect HubSpot. It generates the connection link for you to open. Prefer to click? **Integrations** in the left sidebar has the same option.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-a641d04d6fec9b48431bd68ca8639eaf820d5646%2Fhubspot-connect-chat.png?alt=media" alt="The dashboard chat where the user asks to connect HubSpot and the agent generates a Connect HubSpot link to approve in the browser"><figcaption><p>The agent posts the connect link in the chat.</p></figcaption></figure>
{% endstep %}

{% step %}

### Approve it in HubSpot

Open the link and pick the account if you have more than one. HubSpot then shows you what eesel is asking to access. Whoever approves it needs HubSpot's **App Marketplace Access** permission. Super admins have it already. Tick the box to agree and click **Connect app**.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-2631d832d9bd610d4807ce65fd8620f2bbead40d%2Fhubspot-authorize.png?alt=media" alt="The HubSpot authorization screen for eesel, with the scopes it requests and the Connect app button"><figcaption><p>The HubSpot approval screen, listing the access eesel asks for.</p></figcaption></figure>

eesel asks to: read and write inbox conversations, read and update tickets, see who owns each record, read the sales emails logged in HubSpot, and read your contacts, companies and deals. The agent copies those CRM records in so it can search them. It also reads them live from HubSpot when it replies.

This approval is the one step a person has to do in the browser. If an AI agent is doing the setup for you, it hands you the link and waits.
{% endstep %}

{% step %}

### Confirm the connection

Back in the chat, your agent notices the connection on its own. It confirms and starts reading your tickets and CRM records.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-53857ddc4be25227e437fa66803fc668859d1720%2Fhubspot-connected.png?alt=media" alt="The dashboard chat showing HubSpot is in, with the agent offering to take a first look at pipelines, stage names and ticket volume"><figcaption><p>The chat confirms HubSpot is connected.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check what it can read

HubSpot has one connection. It brings in your knowledge base, tickets and CRM records at once, each with its own toggle on the integration page. From a terminal, `eesel status` lists the integration as connected with its source counts.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-76b2e4d3dcc33518c8251547036d8baf8605a69d%2Fhubspot-integration-page.png?alt=media" alt="The connected HubSpot integration page in eesel, listing Knowledge Base, Tickets, Deals, Contacts and Companies as sources with document counts and toggles"><figcaption><p>Each source has its own toggle and its own document count.</p></figcaption></figure>

* **Knowledge base.** Read natively through the connection. It doesn't need to be public, and there's nothing to crawl. Re-sync from the integration page after you publish or edit articles.
* **Tickets.** Training starts on its own: connecting indexes a batch of your recently closed tickets, so the agent learns your team's voice straight away. Run more from the integration page.
* **Deals, contacts and companies.** Connecting copies your CRM records in too. But an agent cannot search them until you allow it. That is deliberate. Your contact records are personal data, and on HubSpot your agent often talks to your customers. Turn Deals, Contacts or Companies on for an agent from its knowledge settings. Then it can find a customer record the way it finds a help article. Each record carries the date it was copied, and the agent reads HubSpot live before it quotes a stage or an amount.

{% hint style="info" %}
**Help content outside HubSpot?** Add that site with the Website integration alongside HubSpot and your agent answers from both. Message templates aren't synced: paste the ones you use into the agent's instructions or add them as a file, and ask us in the in-app chat if you have a lot to bring over.
{% endhint %}
{% endstep %}

{% step %}

### Create your first automation

Connecting alone does not start your agent. It needs an automation first. Tell it what to handle and it creates an [automation](/automations-and-schedules/automations-and-schedules.md). An automation is a HubSpot trigger plus instructions. In the instructions you describe which tickets it should handle and what to do with them. Skipped tickets are recorded on the agent's Activity page, so you can see what was passed over and why.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-6e1f1c22e47d7eed9b1da12fcffa7fe2dbe967d7%2Fhubspot-automation-chat.png?alt=media" alt="The dashboard chat where the user asks for internal-note reply drafts on every new ticket, and the agent reports the trigger and action it enabled"><figcaption><p>Ask in chat for the automation you want, and the agent builds it.</p></figcaption></figure>

It shows up on your Automations page, switched on and ready. From a terminal, `eesel automations` lists it as on.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-0a47de6c47e769e5574e9eacceba2f00ab7e40a0%2Fhubspot-automation-live.png?alt=media" alt="The Automations page in eesel with the HubSpot rule listed and toggled on"><figcaption><p>The new automation on your Automations page, switched on.</p></figcaption></figure>

Open the automation to see or change what it does. The trigger event is fixed when the automation is created. So a new automation is required for each different trigger event.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-76fcb7c98a3b649fb130ffd13d730430f346005d%2Fhubspot-automation-editor.png?alt=media" alt="The automation editor showing its name, the HubSpot event it runs on, and the instructions telling the agent to draft a reply as an internal comment"><figcaption><p>The automation editor, where you change the instructions it follows.</p></figcaption></figure>
{% endstep %}

{% step %}

### Check automation work in HubSpot

Open HubSpot and look at the next ticket that comes in to see what the automation did there. In this example it left a drafted reply as an internal comment, for a teammate to review and send.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-d31daefd3af862aac249e21da69644c5abb8a9a4%2Fhubspot-note-on-ticket.png?alt=media" alt="A HubSpot Service Hub ticket where the customer email is shown above eesel AI&#x27;s internal comment, which opens with a draft reply for team review"><figcaption><p>The customer email, with the drafted reply below it as an internal comment.</p></figcaption></figure>

The comment carries the whole suggested reply, from the opening line to the sign-off, ready to copy and send.

<figure><img src="https://3732419023-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F2xXO0947TYoPIhGoBgSE%2Fuploads%2Fgit-blob-8e4768802d98aab917987937e00de7903be4279c%2Fhubspot-note-on-ticket-2.png?alt=media" alt="The rest of eesel AI&#x27;s internal comment on the HubSpot ticket, showing the full draft reply with next steps and sign-off"><figcaption><p>The rest of the draft, with the next steps and the sign-off.</p></figcaption></figure>
{% endstep %}
{% endstepper %}

{% hint style="info" %}
**From Claude Code, Cursor or a terminal.** The same setup works as commands: `eesel login`, then `eesel integrations connect hubspot` (a person approves it in the browser; if the receipt has no link, ask `eesel chat` for one), `eesel integrations download start` to copy your sources in, and `eesel automations` to see and switch on the automations. Trigger keys for this page are in the Triggers table below. Full command reference: [The eesel CLI](/apis-and-developer-resources/cli.md). Step-by-step: [Set up from Claude Code or the terminal](/getting-started/set-up-from-a-coding-agent.md). From an MCP client: [Claude Code and MCP clients](/apis-and-developer-resources/claude-code-and-mcp-clients.md).
{% endhint %}

## Sources, triggers and actions

### Sources

Sources are what it learns from:

| Source             | Description                                                                   | Requires                           |
| ------------------ | ----------------------------------------------------------------------------- | ---------------------------------- |
| **Knowledge Base** | Your HubSpot knowledge base articles, read natively through the connection    | Connection                         |
| **Tickets**        | Your past HubSpot tickets and their conversations                             | Connection                         |
| **Deals**          | Your HubSpot deals, so the agent can find one that isn't attached to a ticket | Connection + switched on per agent |
| **Contacts**       | Your HubSpot contacts                                                         | Connection + switched on per agent |
| **Companies**      | Your HubSpot companies                                                        | Connection + switched on per agent |

Every other integration on the agent is also a source, so a HubSpot reply can draw on Confluence, Notion, your website, and your files at once. See [Integrations](/integrations/overview.md).

### Triggers

Triggers are the HubSpot events an automation can run on:

| Trigger                             | Fires when                                                           | Best for            | Key                        |
| ----------------------------------- | -------------------------------------------------------------------- | ------------------- | -------------------------- |
| **When a customer sends a message** | A customer sends any inbound message on a conversation in your inbox | Full automation     | `hubspot_customer_message` |
| **When a new ticket is created**    | A ticket is created in HubSpot, however it got there                 | Catching everything | `hubspot_ticket_created`   |
| **Call @eesel in an inbox comment** | A teammate types @eesel in a comment on an inbox conversation        | On-demand help      | `hubspot_eesel_mentioned`  |

The customer-message trigger runs on HubSpot's conversation message event, so it fires the moment a customer writes in. A ticket created straight in the CRM is not a customer message, which is what the new-ticket trigger is for.

**@eesel only works in the inbox.** HubSpot sends us nothing at all for a note on a ticket record, so typing @eesel there reaches no one. Use a comment on the conversation in your inbox instead.

A ticket raised straight in the CRM has no conversation attached, so there is nobody to reply to. On those, eesel leaves an internal comment with what it found rather than a draft reply.

### Actions

Actions are what it can do, each set to run on its own, ask you first, or stay off:

|             | Action                               | What it does                                                                                                                                                                                    |
| ----------- | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Respond** | Reply to customer                    | Sends a reply to the customer on a conversation thread                                                                                                                                          |
|             | Add internal comment                 | Adds a comment the customer can't see. Start here: the agent drafts, a human sends                                                                                                              |
| **Manage**  | Create ticket                        | Creates a new ticket in HubSpot                                                                                                                                                                 |
|             | Change ticket priority               | Changes a ticket's priority                                                                                                                                                                     |
|             | Update ticket                        | Updates a ticket's title and description                                                                                                                                                        |
| **Look up** | Read ticket / Search tickets         | Reads a ticket with its conversation thread, plus the contacts, companies and deals attached to it, and finds tickets by text, pipeline stage, priority, or date                                |
|             | Search CRM records / Read CRM record | Finds a deal, contact or company by name, email or domain and reads one in full, straight from HubSpot. This is how the agent answers with today's value rather than the one from the last sync |
|             | List ticket fields                   | Lists your pipelines, stages, owners, and custom ticket properties, so the agent sets values that exist rather than guessing                                                                    |

Turn on **List ticket fields** alongside the write actions: it's how the agent learns the real names of your pipelines, stages and custom properties before it changes anything.

## Troubleshooting

<details>

<summary>Agent not responding to tickets?</summary>

Check the automation is enabled on the agent's **Automations** page, its instructions cover the tickets you expect, the HubSpot connection is still authorized, and at least one action is enabled.

</details>

<details>

<summary>Knowledge base or tickets not syncing?</summary>

Confirm the connection is authorized and the source is toggled on, check knowledge base articles are published, then re-sync from the HubSpot integration page. If the sync says it can't find your knowledge base, the connection is missing its HubSpot portal id: reconnect HubSpot to repair it.

</details>

<details>

<summary>The agent says it can't see the customer on a ticket?</summary>

You connected HubSpot before eesel started asking for contact, company and deal access, so your connection never got it. Reconnect HubSpot from its integration page and accept those permissions. The person who does it needs HubSpot's **App Marketplace Access** permission: super admins have it by default, and it can be granted to anyone else. Reconnecting keeps everything you have set up, and the agent starts seeing the customer on its next reply.

</details>

<details>

<summary>Connection failing?</summary>

Make sure you have admin or owner rights in HubSpot, then disconnect and re-authorize, granting every requested permission. A dropped permission leaves the connection incomplete.

</details>

<details>

<summary>The agent left a note but never replied?</summary>

The ticket was created straight in the CRM, not from a customer message. There is no conversation thread to reply on, so the agent leaves an internal comment with what it found instead.

</details>

<details>

<summary>Replies going out before anyone reviews them?</summary>

Turn on **Add internal comment** instead of **Reply to customer**, or set Reply to customer to ask for approval so the agent prepares the reply and waits for a person.

</details>

## FAQ

<details>

<summary>Does connecting HubSpot start replying to customers automatically?</summary>

No. Connecting only gives your agent access to your sources. It won't act until you enable a trigger and an action, so you can test with a human in the loop first.

</details>

<details>

<summary>How do I keep a human in the loop?</summary>

Two ways, and you can use both. Turn on **Add internal comment** instead of **Reply to customer**, so the agent writes its answer as a comment the customer can't see and your team reads, edits and sends it. Or set an action to ask you first, so the agent shows you exactly what it wants to do and waits. Start with internal comments, then move to replying once you're happy. When an action is set to ask you first, the prepared reply shows up in the dashboard with three buttons: Approve runs it once, Always allow stops asking for that action, and Deny discards it.

</details>

<details>

<summary>Can I limit which tickets the agent touches?</summary>

Yes. In the automation's instructions, describe the tickets you want in plain language, for example "only billing and refund questions from the Support inbox", and what to do with them. The agent only runs on the ones that match. Skipped tickets are recorded on the agent's Activity page, so you can see what it passed over and why.

</details>

<details>

<summary>Do I need to make my knowledge base public, or crawl it?</summary>

No. eesel reads your HubSpot knowledge base natively through the connection. The website crawler is only for help content that lives outside HubSpot.

</details>

<details>

<summary>Can I train it on past tickets, and where does the data go?</summary>

Yes, and it starts on its own: connecting indexes a batch of your recently closed tickets, and you can run more from the integration page. The content is used to train your own agent inside eesel.

</details>

<details>

<summary>Does eesel store my contacts, companies and deals?</summary>

Yes, and it also reads them live. eesel keeps a copy of those records so the agent can search your CRM the way it searches your knowledge base, which is what lets it find a customer nobody attached to the ticket in front of it. Each copy carries the date it was taken. Before the agent quotes a deal stage, an amount or a plan, it reads that record live from HubSpot. What reaches your customer is today's value.

Two things must be true before an agent can reach that copy. Your account granted the contact, company and deal permissions, or eesel holds no CRM records at all. And you switched Deals, Contacts or Companies on for that agent in its knowledge settings. An agent answering your customers can be asked anything, and being connected is not the same as agreeing it may answer from your contact database.

</details>

<details>

<summary>How is this billed?</summary>

Pay-as-you-go: a ticket your agent handles is one task, however many replies happen on it, and chats you run yourself from the eesel dashboard are free. See [Pricing](/pricing/overview.md) for rates, the annual commitment, and Enterprise.

</details>

## Related pages

* [Helpdesk](/use-cases/helpdesk.md) for the job your teammate takes on in a ticket queue
* [Automations and Schedules](/automations-and-schedules/automations-and-schedules.md) for triggers, instructions and schedules
* [Actions and Approvals](/instructions-and-memory/actions-and-approvals.md) for setting each action to run on its own, ask you first, or stay off
* [Integrations overview](/integrations/overview.md) for how sources, triggers and actions fit together
* [Set up from Claude Code or the terminal](/getting-started/set-up-from-a-coding-agent.md)


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eesel.ai/integrations/helpdesks/hubspot.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
