By Source · HubSpot

HubSpot + Connect AI

Query HubSpot contacts, companies, deals, and tickets from any AI agent. Connect AI handles OAuth, association queries, and rate-limit backoff.

Use with Claude  ·  Use with OpenAI

Common objects
Contact Company Deal Ticket Note Task + custom objects
-- Ask Claude Code (or any MCP-aware agent):
--
-- "In HubSpot, show me the top 25 open deals with their
-- associated company. Highest amount first."
--
-- Claude generates and runs this SQL via the queryData MCP tool.
-- Associations resolved automatically across the join.

SELECT
  c.name AS Company,
  d.dealname AS Deal,
  d.amount,
  d.dealstage,
  d.closedate
FROM [HubSpot].[HubSpot].[Deal] d
LEFT JOIN [HubSpot].[HubSpot].[Company] c
  ON d.associatedcompanyid = c.id
WHERE d.dealstage != 'closedlost'
ORDER BY d.amount DESC
LIMIT 25

Tutorials by AI surface

Working integrations for HubSpot + every supported AI surface.

HubSpot + Claude Agent SDK Account research, deal progression summaries, and contact enrichment via a Python agent.
HubSpot + OpenAI SDK OpenAI Python SDK assistant for CRM queries, pipeline summaries, and outreach drafting.
HubSpot + CrewAI Multi-agent research crew for account intelligence across deals, contacts, and tickets.

Known quirks

Association queries

HubSpot relationships (deal ↔ company, contact ↔ deal) are stored as association IDs, not foreign keys. Connect AI resolves these transparently in JOIN queries, but very deep association chains (>3 hops) may require multiple queries.

Rate limits

Private app tokens are limited to 100 requests per 10 seconds. Connect AI handles retry backoff automatically, but agents issuing many parallel tool calls against large contact databases may hit sustained throughput limits.

Custom properties

Custom HubSpot properties appear as columns in the schema automatically. Property group names are normalized to avoid reserved keyword conflicts. Use getColumns to discover actual column names before writing queries.

Existing tutorials

Long-form recipes from the CData Knowledge Base.

View tutorials
Connect AI documentation

Full API reference, authentication guides, and configuration details.

View docs