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

# Overview

> Connect HubSpot Service Hub to Neo Agent as your PSA: tickets, companies, contacts and replies to your customers

Neo connects to HubSpot Service Hub with a **service key** that a HubSpot super admin creates. Neo reads and works your HubSpot tickets, their notes and conversations, companies, contacts and owners, the same way it works tickets in any other PSA.

This is HubSpot as your **PSA**. The [HubSpot](https://docs.neoagent.io/integrations/hubspot/overview.md) integration on the Integrations page is a separate tile that lets an agent work your HubSpot CRM next to another PSA.

## Prerequisites

* A HubSpot **super admin**, or a user with Developer Tools access, to create the service key.
* A HubSpot **user for Neo**: a seat with Service Hub access that can own tickets. Neo's notes are held by this user, and its replies to your customers are sent as this user. Many teams create a dedicated user, such as **Neo Agent**.
* To send Neo ticket events as they happen: **Data Hub Professional** or **Enterprise**, for a workflow's **Send a webhook** action. Without it, Neo still syncs your tickets, but triggered agents do not run.

## 1. Create a service key in HubSpot

**1. Open the service keys**

In HubSpot, go to **Settings** > **Integrations** > **Service Keys**, and create a key named **Neo Agent**.

**2. Add the scopes**

Add these scopes: `tickets`, `crm.objects.companies.read`, `crm.objects.companies.write`, `crm.objects.contacts.read`, `crm.objects.contacts.write`, `crm.objects.owners.read`, `conversations.read` and `conversations.write`.

**3. Copy the key**

Copy the key. You enter it once in Neo, and Neo stores it encrypted.

An account that still has a legacy private app can use that app's access token instead, with the same scopes.

## 2. Connect HubSpot in Neo

**1. Open the HubSpot Service Hub tile**

In the Neo dashboard, go to **Integrations** > **PSA**, find **HubSpot Service Hub** and select **Connect**.

**2. Enter the connection details**

Enter the **service key** and **Neo's HubSpot user email**, then save.

**3. Let the checks run**

Neo signs in, reads one open ticket, finds its HubSpot user and starts the first sync. Each check shows its result and what to fix when it fails.

## 3. Send Neo ticket events

A service key cannot receive webhooks, so you send them from a HubSpot workflow. After you connect, Neo shows the webhook URL on the **HubSpot Service Hub** card under **Integrations**. Only a dashboard admin can see it, because it holds a credential.

**1. Create a ticket workflow**

In HubSpot, go to **Automation** > **Workflows** and create a **ticket-based** workflow from scratch.

**2. Set the enrollment triggers**

Enroll a ticket when it is created, and when **Ticket status**, **Priority**, **Ticket owner**, **Last customer reply date**, **Last response date** or **Last activity date** changes. Turn on re-enrollment for each change. HubSpot sets **Last response date** when one of your users replies to the customer and **Last activity date** when a note is logged, so these two send Neo your team's replies and notes.

**3. Add the webhook**

Add the action **Send a webhook**. Set the method to **POST**, paste Neo's webhook URL, and choose **Customize request body** with one key, `hs_object_id`, set to the ticket property **Ticket ID**.

**4. Turn it on**

Review and turn the workflow on.

## How HubSpot maps to Neo

| HubSpot | In Neo |
| - | - |
| Ticket | Ticket. The record ID is its number |
| Ticket status (pipeline stage) | Status. With more than one pipeline, Neo names each status *Pipeline: Stage* |
| Priority | Priority |
| Company | Company. A ticket's primary company is its company |
| Contact | Contact |
| Owner | Technician |
| Note | Internal note |
| Message on the ticket's conversation | Client-facing note: HubSpot sends it to the customer by email or chat |
| Comment on the ticket's conversation | Internal note |

A ticket counts as closed in Neo once its stage is a closed stage. When Neo closes a ticket, it moves it to the first closed stage of its pipeline.

Neo replies to a customer on the ticket's conversation, so a ticket that came in through your HubSpot inbox (email, chat or form) can get a reply. A ticket created by hand has no conversation, so a client-facing note on it fails and says why; add an internal note there instead.

## How permissions work

Neo uses **two layers of access control**, and both must allow an action. The service key's scopes decide what Neo can reach in HubSpot at all. Within that, each agent's permission groups in the Neo dashboard decide what Neo actually does: which areas it reads, which it writes, and whether an action needs technician approval first.

The HubSpot permission groups are **Tickets**, **Internal Notes**, **Client-Facing Replies**, **Companies**, **Contacts** and **Owners** (read only). On the **Tickets** group, the **Fields** selector limits which ticket properties an update may change, such as Status, Priority or Owner. Linking a company or contact to a ticket, when the ticket is created or later, needs **Client-Facing Replies** as well as **Tickets**, because the ticket's replies then go to them. Changing a contact's email or phone, and deleting a company or contact, always asks a technician first. Neo reads or changes a note or conversation only when it belongs to a ticket, so your sales notes and chats stay out of reach. Neo adds notes but never edits or deletes an existing one, so a note keeps its author's words and stays on every record it is linked to. Neo never changes your workflows, webhooks, properties, pipelines or users.

## Limits

* **Rate limit.** HubSpot allows 100 to 190 API requests every 10 seconds for your whole account, by plan. Neo keeps its own use under 80, so your other apps keep room.
* **Triggers.** A ticket-created agent fires when a ticket is created, and a status-changed or priority-changed agent fires on each change, read from the ticket's property history. Name the status as Neo lists it. **Customer Replied** fires on a message from the customer on the ticket's conversation, and **Technician Replied to Customer** on a message from one of your users. The first message, which opened the ticket, and a message Neo sends start neither. **Note Added** and **Technician Added a Note** also work. **Time Entry Created** never fires, because HubSpot tickets have no time entries.
* **Not yet in Neo for HubSpot:** time entries, dispatch to a calendar, the phone agent's call recording, attachments, and custom ticket properties in the agent builder. Find Entities searches tickets with HubSpot's search, which returns at most 10,000 tickets.


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