Hubspot
Discover HubSpot CRM and Service Hub data including contacts, companies, deals, tickets, and pipelines.
- Entities: Contacts, Companies, Deals, Tickets (Service Hub), Pipelines
- Relationships: Links CRM data across entities and to external systems
- Discovery: Automated polling-based discovery
- MCP Support: Query HubSpot data via Model Context Protocol
People in your CRM (leads, customers, prospects).
Spec fields:
id: Contact IDemail: Email addressfirstname: First namelastname: Last namelifecyclestage: subscriber, lead, marketingqualifiedlead, salesqualifiedlead, opportunity, customer, evangelist, othercreatedate: Contact creation datelastmodifieddate: Last modified timestamp
Labels:
email: Email addressname: Full namelifecycle_stage: Current lifecycle stage
Organizations in your CRM.
Spec fields:
id: Company IDname: Company namedomain: Company domainindustry: Industry verticallifecyclestage: Lead, customer, etc.annualrevenue: Annual revenuecreatedate: Company creation datelastmodifieddate: Last modified timestamp
Labels:
name: Company namelifecycle_stage: Current lifecycle stageindustry: Industry vertical
Sales opportunities in your pipeline.
Spec fields:
id: Deal IDdealname: Deal nameamount: Deal valuedealstage: Current deal stagepipeline: Pipeline IDclosedate: Expected close datecreatedate: Deal creation date
Labels:
deal_name: Deal namestage: Current stageamount: Deal value
Service Hub support tickets.
Spec fields:
id: Ticket IDsubject: Ticket subjectcontent: Ticket descriptionstatus: Ticket status (open, in progress, waiting, closed)priority: low, medium, highcategory: Ticket categorycreatedate: Ticket creation datecloseddate: Ticket closed date
Labels:
status: Ticket statuspriority: Ticket prioritycategory: Ticket category
Sales pipeline definitions.
Spec fields:
id: Pipeline IDlabel: Pipeline namedisplay_order: Display orderstages: Array of stage names
Labels:
name: Pipeline name
| Source | Relation | Target | Description |
|---|---|---|---|
HubSpotContact | WORKS_AT | HubSpotCompany | Contact's company |
HubSpotContact | INVOLVED_IN | HubSpotDeal | Contact associated with deal |
HubSpotDeal | FOR_COMPANY | HubSpotCompany | Deal's company |
HubSpotDeal | IN_PIPELINE | HubSpotPipeline | Deal's pipeline |
HubSpotTicket | FROM_CONTACT | HubSpotContact | Ticket requester |
HubSpotTicket | ABOUT_COMPANY | HubSpotCompany | Ticket's company |
| Source | Relation | Target | Description |
|---|---|---|---|
HubSpotCompany | LINKED_TO_ZENDESK | ZendeskOrganization | Cross-platform customer link |
HubSpotCompany | USES_SERVICE | K8sService | Customer using product |
HubSpotDeal | AFFECTED_BY | PagerDutyIncident | Deal impacted by incident |
HubSpotTicket | REPORTS_ERROR | SentryError | Ticket about error |
discovery:
enabled: true
settings:
token: "YOUR_PRIVATE_APP_TOKEN"
# Optional settings
include_contacts: true
include_companies: true
include_deals: true
include_tickets: true # Service Hub required
include_pipelines: true
max_contacts: 1000 # 0 = unlimited
max_companies: 1000 # 0 = unlimited
deal_stage_filter: "" # Empty = all stages, or specific stage like "closedwon"
mcp:
enabled: true
settings:
token: "YOUR_PRIVATE_APP_TOKEN"
- Go to Settings → Integrations → Private Apps
- Click "Create a private app"
- Name it "SixDegree Integration"
- Set required scopes:
- CRM:
crm.objects.contacts.read,crm.objects.companies.read,crm.objects.deals.read - Service Hub:
tickets(if using tickets)
- CRM:
- Create app and copy the access token
The token needs these OAuth scopes:
crm.objects.contacts.readcrm.objects.companies.readcrm.objects.deals.readtickets(for Service Hub tickets)crm.schemas.deals.read(for pipelines)
degree discovery run hubspot@1.0.0 --config hubspot-config.yaml
Query: "Show me the full journey of Acme Corp from lead to customer"
HubSpotContact (lead) → HubSpotDeal (qualified) → HubSpotCompany (customer) → K8sService (using product) → HubSpotTicket (support)
Query: "What's the revenue impact of this production incident?"
PagerDutyIncident → HubSpotCompany (affected) → HubSpotDeal (at risk) → SUM(amount)
Query: "Which deals are in the pipeline for customers with no support tickets?" (healthy accounts)
HubSpotDeal[stage=negotiation] → FOR_COMPANY → HubSpotCompany - (no HubSpotTicket)
Query: "High-value customers with increasing support ticket volume" (churn risk)
HubSpotCompany[annualrevenue>100000] ← ABOUT_COMPANY ← HubSpotTicket (count increasing)
Query: "Trial users with high product usage and no support issues" (ready to convert)
HubSpotContact[lifecyclestage=lead] → WORKS_AT → HubSpotCompany → USES_SERVICE → K8sService (high usage) - (no HubSpotTicket)
Query: "Which marketing campaigns converted to closed-won deals?"
HubSpotCampaign → CREATED → HubSpotContact → INVOLVED_IN → HubSpotDeal[stage=closedwon]
HubSpot API rate limits (Enterprise):
- Private Apps: 150 requests per 10 seconds
- Burst: 200 requests per 10 seconds
The molecule implements:
- 100ms delay between paginated requests
- Automatic pagination handling
- Efficient bulk data fetching with property batching
MATCH (c:HubSpotCompany {lifecyclestage: "customer"})
RETURN c
MATCH (d:HubSpotDeal)-[:IN_PIPELINE]->(p:HubSpotPipeline)
RETURN p.label, d.dealstage, COUNT(d) AS deal_count
ORDER BY deal_count DESC
MATCH (contact:HubSpotContact {email: "john@example.com"})
MATCH (contact)-[:WORKS_AT]->(company:HubSpotCompany)
MATCH (contact)-[:INVOLVED_IN]->(deal:HubSpotDeal)
RETURN contact, company, deal
MATCH (deal:HubSpotDeal)
WHERE deal.amount > 50000 AND deal.dealstage = "negotiation"
MATCH (deal)-[:FOR_COMPANY]->(company:HubSpotCompany)
MATCH (company)<-[:ABOUT_COMPANY]-(ticket:HubSpotTicket {status: "open"})
RETURN deal, company, COUNT(ticket) AS open_tickets
ORDER BY open_tickets DESC
MATCH (incident:PagerDutyIncident)
WHERE incident.created_at > "2024-01-01"
MATCH (company:HubSpotCompany)-[:USES_SERVICE]->(k8s:K8sService)
MATCH (k8s)-[:AFFECTED_BY]->(incident)
MATCH (company)<-[:FOR_COMPANY]-(deal:HubSpotDeal {dealstage: "negotiation"})
RETURN incident.title, SUM(toFloat(deal.amount)) AS at_risk_revenue
Match by domain:
MATCH (hubspot:HubSpotCompany)
MATCH (zendesk:ZendeskOrganization)
WHERE hubspot.domain IN zendesk.domain_names
CREATE (hubspot)-[:LINKED_TO_ZENDESK]->(zendesk)
MATCH (company:HubSpotCompany)
MATCH (company)<-[:FOR_COMPANY]-(deal:HubSpotDeal)
MATCH (company)-[:LINKED_TO_ZENDESK]->(zendeskOrg:ZendeskOrganization)
MATCH (zendeskOrg)<-[:BELONGS_TO]-(ticket:ZendeskTicket {status: "open"})
RETURN company.name, COUNT(DISTINCT deal) AS active_deals, COUNT(DISTINCT ticket) AS open_tickets
-
Verify token is from a Private App (not OAuth or API key)
-
Check token hasn't been revoked
-
Ensure all required scopes are granted
-
Check
include_*settings are enabled -
Verify Private App has access to object types
-
For Service Hub tickets, ensure Service Hub is enabled on your account
-
Reduce discovery frequency
-
Consider using
max_contactsandmax_companieslimits -
Upgrade to higher HubSpot plan tier
-
Some properties may be null/empty if not set in HubSpot
-
Check property permissions in Private App scopes
-
Custom properties require explicit inclusion in API calls
┌──────────────────┐
│ HubSpot API │
│ (REST v3) │
└────────┬─────────┘
│
│ HTTPS
│ Bearer Token
│
┌────────▼─────────┐
│ HubSpot Molecule │
│ - CRM Discovery │
│ - Associations │
│ - Relationships │
└────────┬─────────┘
│
│ gRPC
│
┌────────▼─────────┐
│ SixDegree │
│ Knowledge Graph │
└──────────────────┘
- Link to Zendesk: Match companies by domain for unified customer view
- Connect to K8s: Track which customers use which services (product analytics)
- Integrate with PagerDuty: Revenue impact of incidents
- Link to GitHub: Track which features were built for which deals
- Add Campaigns: Track marketing attribution to revenue
If you have 10K+ contacts or companies:
-
Set
max_contactsandmax_companiesto reasonable limits (e.g., 1000) -
Focus on recent or active contacts using HubSpot's last modified date filter (future enhancement)
-
Run discovery during off-peak hours
-
Disable entity types you don't need (
include_tickets: false) -
Use
deal_stage_filterto only fetch active deals -
Consider incremental sync for large datasets (future enhancement)
-
zendesk: Support ticket tracking
-
salesforce: Alternative CRM (if using Salesforce instead)
-
kubernetes: Product usage tracking
-
pagerduty: Incident impact on deals
-
github: Feature development for customer requests