Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or Docker Desktop.
- To connect HubSpot to MindsDB, install the required dependencies following this instruction.
Authentication
The handler supports two authentication methods:Personal Access Token Authentication
Recommended for server-to-server integrations and production environments. Steps to obtain an access token:- Navigate to your HubSpot account settings
- Go to Integrations -> Private Apps
- Create a new private app or select an existing one
- Configure required scopes for the tables you plan to access
- Copy the generated access token
OAuth Authentication
Recommended for applications requiring user consent and dynamic scope management. Required OAuth Parameters:client_id: Your app’s client identifierclient_secret: Your app’s client secret (store securely)
Supported Tables
Core CRM and Engagement Tables
These tables supportSELECT, INSERT, UPDATE, and DELETE operations.
| Table Name | Description | Reference |
|---|---|---|
companies | Company records from HubSpot CRM | https://developers.hubspot.com/docs/api-reference/crm-companies-v3/guide |
contacts | Contact records from HubSpot CRM | https://developers.hubspot.com/docs/api-reference/crm-contacts-v3/guide |
deals | Deal records from HubSpot CRM | https://developers.hubspot.com/docs/api-reference/crm-deals-v3/guide |
tickets | Support ticket records | https://developers.hubspot.com/docs/api-reference/crm-tickets-v3/guide |
tasks | Task and follow-up records | https://developers.hubspot.com/docs/api-reference/crm-tasks-v3/guide |
calls | Call log records | https://developers.hubspot.com/docs/api-reference/crm-calls-v3/guide |
emails | Email log records | https://developers.hubspot.com/docs/api-reference/crm-emails-v3/guide |
meetings | Meeting records | https://developers.hubspot.com/docs/api-reference/crm-meetings-v3/guide |
notes | Timeline notes | https://developers.hubspot.com/docs/api-reference/crm-notes-v3/guide |
Metadata Tables
These tables are read-only and supportSELECT only.
| Table Name | Description | Reference |
|---|---|---|
owners | HubSpot owners with names and emails | https://developers.hubspot.com/docs/api-reference/crm-owners-v3/guide |
pipelines | Deal pipelines with names and stages | https://developers.hubspot.com/docs/api-reference/crm-pipelines-v3/guide |
Association Tables
Association tables are read-only and supportSELECT only. They expose relationships between objects and include association_type and association_label columns.
Reference: https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide
| Table Name | Description |
|---|---|
company_contacts | Company to contact associations |
company_deals | Company to deal associations |
company_tickets | Company to ticket associations |
contact_companies | Contact to company associations |
contact_deals | Contact to deal associations |
contact_tickets | Contact to ticket associations |
deal_companies | Deal to company associations |
deal_contacts | Deal to contact associations |
ticket_companies | Ticket to company associations |
ticket_contacts | Ticket to contact associations |
ticket_deals | Ticket to deal associations |
Connection
Using Access Token:Usage
Basic Data Retrieval:Notes on Filters and Limits
- Supported filter operators include
=,!=,<,<=,>,>=,IN, andNOT IN. - Date helpers supported in filters include
CURDATE()/CURRENT_DATE,NOW()/CURRENT_TIMESTAMP,DATE_SUB, andDATE_ADD. - Updates and deletes evaluate conditions against a sample of up to 200 records before applying changes.
- Unsupported filters or order-by expressions are skipped rather than raising errors.