Ingest HubSpot Contacts, Companies, Deals, Tickets, and Engagements into CortexDB.
HubSpot Connector
Captures CRM activity from HubSpot as CortexDB experiences. Webhooks for low-latency; CRM API polling as a fallback.
Two ways to run this connector:
- Run it yourself (Free + paid) —
pip install 'cortexdb-connectors[hubspot]'thencortexdb-sync sync hubspot. The connector reads your token from~/.cortexdb/state.json(written bycortexdb init) or from env vars. - Managed sync (Starter and up) — CortexDB runs the connector as a worker on its infrastructure. Configure it once from your dashboard; CortexDB handles webhook registration, retries, backfill, and idempotency.
1. Prepare credentials in HubSpot
HubSpot → Settings → Integrations → Private Apps. Scopes: crm.objects.contacts.read, crm.objects.companies.read, crm.objects.deals.read, tickets, crm.objects.notes.read. Copy the access token (pat-na1-…).
2. Configure in your CortexDB dashboard
- Sign in at cortexdb.ai/login.
- Settings → Connectors → Add Connector → HubSpot.
- Paste the private-app access token.
- Pick the HubSpot objects to sync. Default:
contact, company, deal, ticket, engagement. - Set the scope template. Default:
org:<your-org>/source:hubspot/object:{object_type}. - Pick sync mode: Real-time (webhook) or Polling.
- Click Start sync.
What gets written
| HubSpot object | Modality | Notes |
|---|---|---|
| Contact | observation | Properties as triples |
| Company | observation | Properties as triples |
| Deal | document | Name + amount; stage transitions as bi-temporal facts |
| Ticket | document | Subject + description |
| Engagement (email/call/meeting) | conversation | role inferred from direction |
idempotency_key shape: hs:<object>:<id>:<lastmodifieddate>.
Run it yourself
If you'd rather host the connector yourself instead of using CortexDB's managed worker, every connector ships in the cortexdb-connectors PyPI package:
pip install 'cortexdb-connectors[hubspot]'
# Step 1: get a CortexDB token + actor (one-time, free tier)
pip install cortexdb-cli
cortexdb init
# Step 2: supply the connector's third-party credentials
export HUBSPOT_TOKEN=... # required
# Step 3: one-shot sync, or `watch` for a poll loop
cortexdb-sync sync hubspot
cortexdb-sync watch hubspot --interval 60
cortexdb-sync reads your CortexDB token + actor from ~/.cortexdb/state.json automatically. Cursor state is persisted in ~/.cortexdb/connectors-state.json, so re-running picks up where the last cycle left off.
See also
- Salesforce Connector — same model, different CRM
- Facts + timeline