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

# HubSpot Integration: CRM for Agents

> Agents can manage contacts, companies, deals, and tickets in HubSpot CRM. OAuth credentials are injected automatically.

## Overview

OneCLI connects AI agents to HubSpot through OAuth. Agents can read and manage CRM records including contacts, companies, deals, and tickets. The gateway injects OAuth credentials into requests to the HubSpot API automatically.

<Note>
  HubSpot is a cloud-only integration, available on the Team plan.
</Note>

## Setup

<Steps>
  <Step title="Go to Connections">
    Open the OneCLI dashboard and navigate to **Connections** > **HubSpot**.
  </Step>

  <Step title="Authorize">
    Click **Connect HubSpot**. You'll be redirected to HubSpot to authorize OneCLI. Review the requested permissions and click **Grant access**.

    OneCLI requests read access to contacts, companies, deals, owners, and tickets by default. Write access and additional scopes (line items, quotes, lists, schemas) are optional.
  </Step>

  <Step title="Verify">
    After authorization, you'll be redirected back to the dashboard. The connection will show as **Connected** with your HubSpot portal domain.
  </Step>
</Steps>

## What agents can do

| Area                    | Description                                                  |
| ----------------------- | ------------------------------------------------------------ |
| **Contacts**            | Read, create, and update contact records and properties      |
| **Companies**           | Read, create, and update company records                     |
| **Deals**               | Read, create, and update deals and pipeline stages           |
| **Tickets**             | Read, create, and update support tickets                     |
| **Owners**              | View record owners and assignments                           |
| **Lists**               | View contact lists (read-only)                               |
| **Quotes & Line Items** | View quotes and line item records (read-only)                |
| **Schemas**             | View property definitions for contacts, companies, and deals |

## Use cases

* CRM enrichment agents that update contact records with data from other sources
* Sales pipeline agents that track deals and update stages
* Support agents that create and triage tickets
* Reporting agents that pull CRM data for analysis

## Controlling access with rules

Use OneCLI's [rules engine](/guides/rules) to control what agents can do with your HubSpot account. For example, allow agents to read contacts but block creating or modifying them, or rate-limit API calls. Rules are evaluated before credential injection, so a blocked request never reaches the HubSpot API.
