---
title: "Connect HubSpot to ChatGPT: Manage Sales Deals & Contact Records"
slug: connect-hubspot-to-chatgpt-manage-sales-deals-and-contact-records
date: 2026-06-08
author: Uday Gajavalli
categories: ["AI & Agents"]
excerpt: "Give your AI agents read and write access to HubSpot. Learn how to generate a secure MCP server, connect it to ChatGPT, and automate CRM workflows using natural language."
tldr: "Connect HubSpot to ChatGPT using a managed MCP server. This guide covers bypassing HubSpot API quirks, creating a secure Truto MCP server via API or UI, and executing complex, multi-step sales workflows using natural language."
canonical: https://truto.one/blog/connect-hubspot-to-chatgpt-manage-sales-deals-and-contact-records/
---

# Connect HubSpot to ChatGPT: Manage Sales Deals & Contact Records


You want to connect HubSpot to ChatGPT so your AI agents can read contact records, update deal stages, and retrieve historical notes for pre-call briefs. If your team uses Claude instead, check out our guide on [connecting HubSpot to Claude](https://truto.one/connect-hubspot-to-claude-automate-marketing-blogs-and-support/), or explore our broader architectural overview on [connecting HubSpot to AI Agents](https://truto.one/connect-hubspot-to-ai-agents-sync-invoices-orders-and-workflows/). Here is exactly how to do it using a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-and-mcp-servers-and-how-do-they-work/).

B2B sales teams run on HubSpot, but forcing account executives to manually update deal stages or synthesize meeting notes creates massive operational friction. Giving a Large Language Model (LLM) [read and write access to your CRM](https://truto.one/how-to-connect-ai-agents-to-read-and-write-data-in-salesforce-and-hubspot/) solves this, but it introduces a major engineering challenge. You either spend weeks building, hosting, and maintaining a custom proxy layer, or you use a managed infrastructure layer that handles the boilerplate for you.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for HubSpot, connect it natively to ChatGPT, and execute complex sales workflows using natural language.

## The Engineering Reality of the HubSpot API

A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests. While the open MCP standard provides a predictable way for models to discover tools, implementing it against HubSpot's API requires dealing with several vendor-specific constraints.

If you decide to build a [custom MCP server for HubSpot](https://truto.one/how-do-i-build-a-hubspot-integration-2026-architecture-guide/), you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with HubSpot:

### The Search API and filterGroups
When an LLM wants to find a specific company or contact, it cannot just append `?name=Acme` to a GET request. HubSpot requires using the `/search` endpoints, which expect a complex HTTP POST body utilizing `filterGroups`.

```json
{
  "filterGroups": [
    {
      "filters": [
        {
          "propertyName": "domain",
          "operator": "EQ",
          "value": "acmecorp.com"
        }
      ]
    }
  ]
}
```

If your MCP server does not accurately expose this JSON schema in its tool definitions, ChatGPT will hallucinate query parameters, resulting in HTTP 400 Bad Request errors. 

### Associations and Object IDs
HubSpot relies heavily on an explicit Associations API. A deal is not simply a nested object inside a company. To find out which contacts are associated with a deal, the LLM must first fetch the deal, then query the associations using specific definition IDs, and finally fetch the underlying contact records. Your tool schemas must clearly instruct the LLM on this multi-step relational mapping.

### Custom Properties and Read-Only Traps
Updating a deal in HubSpot requires passing the exact internal property name, not the display label in the UI (e.g., `hs_analytics_source` instead of "Original Source"). Furthermore, if an LLM attempts to send a payload that includes a read-only property (like `hs_lastmodifieddate`), HubSpot will reject the entire payload. Your MCP server must dynamically prune or restrict schemas based on property mutability.

### Strict Rate Limits and the 429 Reality
HubSpot enforces aggressive rate limits - typically 100 requests per 10 seconds for standard OAuth apps, alongside a daily burst limit. 

**A factual note on rate limits:** Truto does not retry, throttle, or apply backoff on rate limit errors. When the upstream HubSpot API returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. The caller (the MCP client or AI agent) is strictly responsible for interpreting these headers and executing its own exponential backoff.

## Generating a Managed MCP Server for HubSpot

Instead of building a stateful proxy, handling OAuth token refreshes, and manually writing JSON schemas for HubSpot's massive API surface, you can generate a managed MCP server dynamically. Truto derives tool definitions directly from the integration's underlying resources and human-readable documentation, ensuring that tools are strictly typed and consistently up to date.

There are two ways to generate a HubSpot MCP server in Truto.

### Method 1: Via the Truto UI

For administrators and operators, the simplest way to expose HubSpot is through the dashboard.

1. Navigate to the **Integrated Accounts** page for your specific HubSpot connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration (e.g., assign a human-readable name, restrict allowed methods to 'read', or set an expiration date).
5. Copy the generated MCP server URL. This URL contains a cryptographic token that securely authenticates the connection.

### Method 2: Via the REST API

For engineering teams building multi-tenant AI products, MCP servers can be provisioned programmatically. The API validates that the integration has tools available, generates a secure token, provisions the edge routing, and returns a ready-to-use URL.

Make an authenticated POST request to the Truto API:

**Endpoint:** `POST /integrated-account/:id/mcp`

```typescript
// Request payload
{
  "name": "Sales Assistant HubSpot MCP",
  "config": {
    "methods": ["read", "write"],
    "tags": ["crm", "sales"],
    "require_api_token_auth": false
  },
  "expires_at": null
}
```

**Response payload:**

```json
{
  "id": "mcp_2b3c4d5e6f",
  "name": "Sales Assistant HubSpot MCP",
  "config": {
    "methods": ["read", "write"],
    "tags": ["crm", "sales"],
    "require_api_token_auth": false
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890..."
}
```

This single URL (`https://api.truto.one/mcp/...`) represents a fully operational JSON-RPC 2.0 server. The token in the URL encodes the integrated account and configuration. 

## Connecting the MCP Server to ChatGPT

Once you have the URL, you must connect it to your LLM client. 

### Method A: Via the ChatGPT UI

If you are using ChatGPT desktop or web interfaces on an eligible account (Pro, Plus, Team, Enterprise, or Education):

1. In ChatGPT, navigate to **Settings** -> **Apps** -> **Advanced settings**.
2. Enable **Developer mode** (MCP support operates behind this flag).
3. Under MCP servers / Custom connectors, click to add a new server.
4. **Name:** Give it a recognizable label, like "HubSpot Production".
5. **Server URL:** Paste the `https://api.truto.one/mcp/...` URL generated in the previous step.
6. Save the configuration. ChatGPT will immediately perform the MCP initialization handshake and fetch the available tools.

*(Note: If you are using Claude instead, the process is similar: **Settings** -> **Integrations** -> **Add MCP Server**, then paste the URL.)*

### Method B: Via Manual Config File

If you are running a local MCP client or a custom AI agent framework that relies on standard MCP configuration files, you configure the server using a Server-Sent Events (SSE) transport adapter.

```json
{
  "mcpServers": {
    "hubspot_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890..."
      ]
    }
  }
}
```

Because query and body parameters share a flat input namespace in Truto's MCP protocol handling, your agent simply passes arguments as a single JSON object. The Truto router dynamically splits them into query and body parameters based on the integration schemas before delegating execution to the proxy API.

## Hero Tools for HubSpot Sales Automation

An MCP server derives its utility from the precision of its tools. Truto dynamically maps HubSpot's vast REST API into distinct, explicitly typed MCP operations. 

Here are 6 high-leverage hero tools exposed by the HubSpot MCP server, along with contextual usage notes and example prompts.

### list_all_hub_spot_contacts_search

Retrieves contacts based on complex search criteria. This is crucial because pulling the entire CRM directory is impossible; agents must use this tool to filter by email, domain, or custom properties using HubSpot's `filterGroups` schema.

*Usage note:* Ensure your agent understands the structure of HubSpot's search API. It must pass an operator (like `EQ` or `CONTAINS_TOKEN`) alongside the property name.

> "Search HubSpot for any contact with the email domain 'acmecorp.com'. Return their internal HubSpot ID, first name, and current lifecycle stage."

### get_single_hub_spot_deal_by_id

Fetches a comprehensive payload for a specific deal. This returns the deal's properties, historical property changes (if requested via `propertiesWithHistory`), and the IDs of associated objects (like companies or line items).

*Usage note:* To get the associated company, the agent must inspect the `associations` block in the response payload. It does not return the full company object automatically.

> "Pull the complete record for deal ID 987654321. I specifically need to see the 'amount', 'dealstage', and the ID of the associated primary contact."

### create_a_hub_spot_deal

Provisions a new deal in the pipeline. Requires an explicitly formatted properties object containing core fields like `dealname`, `pipeline`, and `dealstage`.

*Usage note:* The `dealstage` must be the internal internal GUID of the stage (e.g., `appointmentscheduled`), not the human-readable UI label.

> "Create a new deal in HubSpot named 'Acme Corp - Q4 Expansion'. Set the amount to $50,000, assign it to the standard sales pipeline, and place it in the 'Discovery' stage."

### update_a_hub_spot_deal_by_id

Performs a partial update on an existing deal. You must provide the deal ID and a `properties` object containing only the fields you wish to mutate.

*Usage note:* Read-only properties and non-existent custom properties will cause the API to throw a 400 error. The agent must strictly only pass mutable fields.

> "Update deal ID 987654321. Move its dealstage to 'Closed Won' and update the close date to today."

### hub_spot_notes_get_for_deal

Retrieves all CRM notes, call transcripts, and logged emails associated with a specific deal. This is the primary mechanism AI agents use to gather historical context before drafting emails or summaries.

*Usage note:* This is a dedicated association endpoint. It requires passing the deal ID and supports filtering by timestamp to isolate recent activity.

> "Fetch all notes associated with deal ID 987654321 that were created in the last 30 days. Summarize the main objections the prospect raised."

### create_a_hub_spot_task

Generates a follow-up task and associates it with a specific contact or deal owner. Useful for enforcing CRM hygiene after the agent completes a workflow.

*Usage note:* The body schema requires `hs_task_body`, `hs_task_subject`, and `hs_timestamp` (in Unix milliseconds) to determine the due date.

> "Log a task in HubSpot to follow up with the primary contact on deal 987654321. Set the subject to 'Review security questionnaire' and set the due date for 3 days from now."

To view the complete inventory of available HubSpot operations, schemas, and required parameters, visit the [HubSpot integration page](https://truto.one/integrations/detail/hubspot).

## Workflows in Action

Once connected, ChatGPT stops being a simple chatbot and becomes a functional operator capable of executing multi-step workflows. Because the tools are strictly mapped to HubSpot's native schema, the LLM can chain actions together logically.

### Scenario 1: Pre-call Deal Briefing

An Account Executive needs to jump into a renewal call in five minutes. Instead of clicking through five different screens in HubSpot, they ask ChatGPT to synthesize the account context.

> "Find the 'Acme Corp Renewal' deal. Summarize all notes and recent activity from the last 60 days, then list the key contacts associated with this deal and their job titles."

**Agentic Execution Steps:**
1. **Tool Call:** `list_all_hub_spot_deals_search` with a filter query matching `dealname = "Acme Corp Renewal"` to obtain the primary Deal ID.
2. **Tool Call:** `hub_spot_notes_get_for_deal` using the Deal ID to retrieve the unstructured historical notes and call logs.
3. **Tool Call:** `get_single_hub_spot_deal_by_id` specifically requesting the `associations` block to find linked Contact IDs.
4. **Tool Call:** `list_all_hub_spot_contacts` (or batch read) using the retrieved Contact IDs to fetch names and `jobtitle` properties.
5. **Result:** ChatGPT outputs a synthesized briefing document detailing the prospect's previous objections, current deal amount, and a bulleted list of the specific contacts attending the call.

### Scenario 2: Pipeline Hygiene and Stale Deal Cleanup

A Sales Manager wants to enforce CRM hygiene without yelling at reps during pipeline review.

> "Find all deals in the 'Negotiation' stage that have not had any activity logged in the last 14 days. Update their status to 'At Risk' and create a task for each deal owner to follow up immediately."

**Agentic Execution Steps:**
1. **Tool Call:** `list_all_hub_spot_deals_search` using `filterGroups` to query for deals where `dealstage = "negotiation"` AND `notes_last_updated < [Timestamp 14 Days Ago]`.
2. **Tool Call (Loop):** For each returned Deal ID, execute `update_a_hub_spot_deal_by_id` passing `{"properties": {"dealstage": "at_risk"}}`.
3. **Tool Call (Loop):** For each returned Deal ID, extract the `hubspot_owner_id`.
4. **Tool Call (Loop):** Execute `create_a_hub_spot_task` assigning a highly visible follow-up task to that specific owner ID.
5. **Result:** ChatGPT processes the batch update, sanitizing the pipeline and creating an audit trail of actionable tasks, reporting back a summary of exactly which deals were moved.

## Security and Access Control

Giving an LLM direct API access to your company's revenue engine requires strict governance. Truto's MCP architecture provides native security controls applied at the server generation level, preventing prompt injection attacks from accidentally wiping out your pipeline.

*   **Method Filtering:** You can mathematically restrict an MCP server to only perform read operations. By passing `config.methods: ["read"]` during server creation, the system dynamically filters out all POST, PUT, PATCH, and DELETE endpoints before the tools are ever sent to the LLM. 
*   **Tag Filtering:** You can group tools by functional area using `config.tags`. If you only want an agent to access ticketing data but not sales pipeline data, you can restrict the server to tags like `["support"]`.
*   **Secondary Authentication (`require_api_token_auth`):** By default, possessing the MCP URL is sufficient to call tools. By enabling this flag, the client must also pass a valid Truto API token in the `Authorization` header. This ensures that even if the MCP URL leaks in a log file, unauthorized users cannot execute CRM actions.
*   **Automatic Expiration (`expires_at`):** You can generate ephemeral MCP servers by passing an ISO datetime. Cloudflare KV TTLs and Durable Object alarms guarantee that the server, token, and access are permanently destroyed the second the expiration is reached. This is ideal for granting contractors or temporary autonomous agents bounded access windows.

> Stop writing boilerplate integration code. Let Truto generate secure, schema-perfect MCP servers for your AI agents.
>
> [Talk to us](https://cal.com/truto/partner-with-truto)

If you want an AI agent to reliably automate HubSpot workflows, you must provide it with strictly typed schemas, handle complex search queries, and manage OAuth token lifecycles securely. Building a proxy to do this manually drains engineering capacity. By utilizing a managed MCP infrastructure layer, you instantly translate HubSpot's complex REST APIs into LLM-native tools, allowing your team to focus on building agentic intelligence rather than debugging undocumented API errors.
