Hubspot skill

Manage HubSpot CRM contacts, companies, deals, and CMS content via API.

by OpenClaudia·MIT license·★ 705 Stars on the repo·GitHub ↗

Use now

Files of Hubspot

OpenClaudia/main1 file shown
SKILL.md
Show the full text247 lines

HubSpot CRM & CMS Skill

You are a HubSpot CRM and CMS automation expert. Use the HubSpot API to manage contacts, companies, deals, owners, associations, properties, CMS pages, and files.

Prerequisites

This skill requires HUBSPOT_ACCESS_TOKEN (Private App token). Check for it in environment variables or ~/.claude/.env.global. If not found, inform the user:

This skill requires a HubSpot Private App access token. Set it via:
  export HUBSPOT_ACCESS_TOKEN=your_token_here
Or add it to ~/.claude/.env.global

Create a Private App at: Settings > Integrations > Private Apps
Required scopes: crm.objects.contacts, crm.objects.companies, crm.objects.deals, content

API Reference

Base URL: https://api.hubapi.com Auth header: Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN} Rate limit: 100 requests per 10 seconds for private apps.

Contacts

List contacts:

curl -s "https://api.hubapi.com/crm/v3/objects/contacts?limit=10&properties=firstname,lastname,email,company,phone" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

Search contacts:

curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts/search" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "filterGroups": [{
      "filters": [{
        "propertyName": "email",
        "operator": "CONTAINS_TOKEN",
        "value": "example.com"
      }]
    }],
    "properties": ["firstname", "lastname", "email", "company"],
    "limit": 10
  }'

Create contact:

curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "properties": {
      "firstname": "John",
      "lastname": "Doe",
      "email": "[email protected]",
      "company": "Acme Inc",
      "phone": "+1234567890"
    }
  }'

Get contact by email:

curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts/search" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "filterGroups": [{
      "filters": [{
        "propertyName": "email",
        "operator": "EQ",
        "value": "[email protected]"
      }]
    }],
    "properties": ["firstname", "lastname", "email", "company", "phone", "lifecyclestage"]
  }'
Companies

List companies:

curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=10&properties=name,domain,industry,numberofemployees" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

Search companies by domain:

curl -s -X POST "https://api.hubapi.com/crm/v3/objects/companies/search" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "filterGroups": [{
      "filters": [{
        "propertyName": "domain",
        "operator": "EQ",
        "value": "example.com"
      }]
    }],
    "properties": ["name", "domain", "industry", "numberofemployees", "annualrevenue"]
  }'
Deals

Create deal:

curl -s -X POST "https://api.hubapi.com/crm/v3/objects/deals" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{
    "properties": {
      "dealname": "New Enterprise Deal",
      "dealstage": "appointmentscheduled",
      "pipeline": "default",
      "amount": "50000",
      "closedate": "2026-06-30"
    }
  }'

List deals:

curl -s "https://api.hubapi.com/crm/v3/objects/deals?limit=10&properties=dealname,dealstage,amount,closedate,pipeline" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

Update deal stage:

curl -s -X PATCH "https://api.hubapi.com/crm/v3/objects/deals/{dealId}" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
  -H "Content-Type: application/json" \
  -d '{"properties": {"dealstage": "closedwon"}}'
Owners

List owners (sales reps):

curl -s "https://api.hubapi.com/crm/v3/owners/" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
Associations

Associate contacts with companies or deals:

# Associate deal with contact (type 3)
curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/contacts/{contactId}/3" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

# Associate deal with company (type 5)
curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/companies/{companyId}/5" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

# Associate contact with company (type 1)
curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/contacts/{contactId}/associations/companies/{companyId}/1" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

Get associated contacts for a deal:

curl -s "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/contacts" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
Properties

List all contact properties:

curl -s "https://api.hubapi.com/crm/v3/properties/contacts" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
CMS Pages

List site pages:

curl -s "https://api.hubapi.com/cms/v3/pages/site-pages?limit=10" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

List landing pages:

curl -s "https://api.hubapi.com/cms/v3/pages/landing-pages?limit=10" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
Search Operators
Operator Description
EQ Equal to
NEQ Not equal to
LT / LTE Less than / Less than or equal
GT / GTE Greater than / Greater than or equal
CONTAINS_TOKEN Contains word
NOT_CONTAINS_TOKEN Does not contain word
HAS_PROPERTY Property exists
NOT_HAS_PROPERTY Property does not exist
Pagination

All list endpoints support pagination via the after parameter:

curl -s "https://api.hubapi.com/crm/v3/objects/contacts?limit=100&after={next_cursor}" \
  -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"

The after value comes from paging.next.after in the response.

Common Workflows

Pipeline Report
  1. List all deals with dealstage, amount, closedate
  2. Group by stage
  3. Sum amounts per stage
  4. Present as pipeline summary table
Contact Enrichment
  1. Search contacts missing key properties (NOT_HAS_PROPERTY)
  2. For each, check if company domain exists
  3. Pull company data and update contact
Deal Health Check
  1. List deals in active stages
  2. Flag deals with no activity in 14+ days
  3. Flag deals past expected close date
  4. Present prioritized action list

Important Notes

  • Always use pagination for large datasets. Default limit is 10, max is 100.
  • HubSpot property names are lowercase with no spaces (e.g., firstname, dealstage, closedate).
  • Deal stages vary by pipeline. List pipeline stages via the Pipelines API if needed.
  • Rate limit: 100 requests per 10 seconds. Batch operations when possible.
1---
2name: hubspot
3description: Manage HubSpot CRM contacts, companies, deals, and CMS content via API. Use when the user says "add contact to HubSpot", "create deal", "search CRM", "HubSpot contacts", "update deal stage", "CRM report", "HubSpot pages", or asks about managing their sales pipeline, CRM data, or HubSpot content.
4---
5 
6# HubSpot CRM & CMS Skill
7 
8You are a HubSpot CRM and CMS automation expert. Use the HubSpot API to manage contacts, companies, deals, owners, associations, properties, CMS pages, and files.
9 
10## Prerequisites
11 
12This skill requires `HUBSPOT_ACCESS_TOKEN` (Private App token). Check for it in environment variables or `~/.claude/.env.global`. If not found, inform the user:
13 
14```
15This skill requires a HubSpot Private App access token. Set it via:
16 export HUBSPOT_ACCESS_TOKEN=your_token_here
17Or add it to ~/.claude/.env.global
18 
19Create a Private App at: Settings > Integrations > Private Apps
20Required scopes: crm.objects.contacts, crm.objects.companies, crm.objects.deals, content
21```
22 
23## API Reference
24 
25Base URL: `https://api.hubapi.com`
26Auth header: `Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}`
27Rate limit: 100 requests per 10 seconds for private apps.
28 
29### Contacts
30 
31**List contacts:**
32```bash
33curl -s "https://api.hubapi.com/crm/v3/objects/contacts?limit=10&properties=firstname,lastname,email,company,phone" \
34 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
35```
36 
37**Search contacts:**
38```bash
39curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts/search" \
40 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
41 -H "Content-Type: application/json" \
42 -d '{
43 "filterGroups": [{
44 "filters": [{
45 "propertyName": "email",
46 "operator": "CONTAINS_TOKEN",
47 "value": "example.com"
48 }]
49 }],
50 "properties": ["firstname", "lastname", "email", "company"],
51 "limit": 10
52 }'
53```
54 
55**Create contact:**
56```bash
57curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts" \
58 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
59 -H "Content-Type: application/json" \
60 -d '{
61 "properties": {
62 "firstname": "John",
63 "lastname": "Doe",
64 "email": "[email protected]",
65 "company": "Acme Inc",
66 "phone": "+1234567890"
67 }
68 }'
69```
70 
71**Get contact by email:**
72```bash
73curl -s -X POST "https://api.hubapi.com/crm/v3/objects/contacts/search" \
74 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
75 -H "Content-Type: application/json" \
76 -d '{
77 "filterGroups": [{
78 "filters": [{
79 "propertyName": "email",
80 "operator": "EQ",
81 "value": "[email protected]"
82 }]
83 }],
84 "properties": ["firstname", "lastname", "email", "company", "phone", "lifecyclestage"]
85 }'
86```
87 
88### Companies
89 
90**List companies:**
91```bash
92curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=10&properties=name,domain,industry,numberofemployees" \
93 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
94```
95 
96**Search companies by domain:**
97```bash
98curl -s -X POST "https://api.hubapi.com/crm/v3/objects/companies/search" \
99 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
100 -H "Content-Type: application/json" \
101 -d '{
102 "filterGroups": [{
103 "filters": [{
104 "propertyName": "domain",
105 "operator": "EQ",
106 "value": "example.com"
107 }]
108 }],
109 "properties": ["name", "domain", "industry", "numberofemployees", "annualrevenue"]
110 }'
111```
112 
113### Deals
114 
115**Create deal:**
116```bash
117curl -s -X POST "https://api.hubapi.com/crm/v3/objects/deals" \
118 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
119 -H "Content-Type: application/json" \
120 -d '{
121 "properties": {
122 "dealname": "New Enterprise Deal",
123 "dealstage": "appointmentscheduled",
124 "pipeline": "default",
125 "amount": "50000",
126 "closedate": "2026-06-30"
127 }
128 }'
129```
130 
131**List deals:**
132```bash
133curl -s "https://api.hubapi.com/crm/v3/objects/deals?limit=10&properties=dealname,dealstage,amount,closedate,pipeline" \
134 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
135```
136 
137**Update deal stage:**
138```bash
139curl -s -X PATCH "https://api.hubapi.com/crm/v3/objects/deals/{dealId}" \
140 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}" \
141 -H "Content-Type: application/json" \
142 -d '{"properties": {"dealstage": "closedwon"}}'
143```
144 
145### Owners
146 
147**List owners (sales reps):**
148```bash
149curl -s "https://api.hubapi.com/crm/v3/owners/" \
150 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
151```
152 
153### Associations
154 
155Associate contacts with companies or deals:
156 
157```bash
158# Associate deal with contact (type 3)
159curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/contacts/{contactId}/3" \
160 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
161 
162# Associate deal with company (type 5)
163curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/companies/{companyId}/5" \
164 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
165 
166# Associate contact with company (type 1)
167curl -s -X PUT "https://api.hubapi.com/crm/v3/objects/contacts/{contactId}/associations/companies/{companyId}/1" \
168 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
169```
170 
171**Get associated contacts for a deal:**
172```bash
173curl -s "https://api.hubapi.com/crm/v3/objects/deals/{dealId}/associations/contacts" \
174 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
175```
176 
177### Properties
178 
179**List all contact properties:**
180```bash
181curl -s "https://api.hubapi.com/crm/v3/properties/contacts" \
182 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
183```
184 
185### CMS Pages
186 
187**List site pages:**
188```bash
189curl -s "https://api.hubapi.com/cms/v3/pages/site-pages?limit=10" \
190 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
191```
192 
193**List landing pages:**
194```bash
195curl -s "https://api.hubapi.com/cms/v3/pages/landing-pages?limit=10" \
196 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
197```
198 
199### Search Operators
200 
201| Operator | Description |
202|----------|-------------|
203| `EQ` | Equal to |
204| `NEQ` | Not equal to |
205| `LT` / `LTE` | Less than / Less than or equal |
206| `GT` / `GTE` | Greater than / Greater than or equal |
207| `CONTAINS_TOKEN` | Contains word |
208| `NOT_CONTAINS_TOKEN` | Does not contain word |
209| `HAS_PROPERTY` | Property exists |
210| `NOT_HAS_PROPERTY` | Property does not exist |
211 
212### Pagination
213 
214All list endpoints support pagination via the `after` parameter:
215```bash
216curl -s "https://api.hubapi.com/crm/v3/objects/contacts?limit=100&after={next_cursor}" \
217 -H "Authorization: Bearer ${HUBSPOT_ACCESS_TOKEN}"
218```
219 
220The `after` value comes from `paging.next.after` in the response.
221 
222## Common Workflows
223 
224### Pipeline Report
2251. List all deals with `dealstage`, `amount`, `closedate`
2262. Group by stage
2273. Sum amounts per stage
2284. Present as pipeline summary table
229 
230### Contact Enrichment
2311. Search contacts missing key properties (`NOT_HAS_PROPERTY`)
2322. For each, check if company domain exists
2333. Pull company data and update contact
234 
235### Deal Health Check
2361. List deals in active stages
2372. Flag deals with no activity in 14+ days
2383. Flag deals past expected close date
2394. Present prioritized action list
240 
241## Important Notes
242 
243- Always use pagination for large datasets. Default limit is 10, max is 100.
244- HubSpot property names are lowercase with no spaces (e.g., `firstname`, `dealstage`, `closedate`).
245- Deal stages vary by pipeline. List pipeline stages via the Pipelines API if needed.
246- Rate limit: 100 requests per 10 seconds. Batch operations when possible.
247 

Discussion

Alternatives

⚡ NEXUS Quick-Start Guide> Get from zero to orchestrated multi-agent pipeline in 5 minutes.Business & ops · MIT🎯 NEXUS Agent Activation Prompts> Ready-to-use prompt templates for activating any agent within the NEXUS pipeline. Copy, customize the [PLACEHOLDERS], and deploy.Business & ops · MITArbor — Autonomous Optimization via Hypothesis Tree RefinementAutonomously improve a real artifact (code, training recipe, agent harness, data pipeline, prompt) against an objective and an evaluator, using Hypothesis Tree Refinement (HTR) from the Arbor paper. Use this whenever someone wants to iteratively optimize something over many experiments without overfitting — e.g. "get my model's eval score up", "improve this agent/harness", "tune this pipeline", "beat the baseline on this benchmark", "run a search over approaches and keep the best", "do an MLE-bench / Kaggle-style optimization", or any long-horizon "make this artifact better and don't just memorize the dev set" task. Trigger it even when the user doesn't say "Arbor" or "hypothesis tree" but describes repeated experiment-and-evaluate loops, branching exploration of competing ideas, or worries about a dev/test gap. Runs Claude itself as the coordinator with subagent executors in isolated git worktrees; for the standalone `arbor` CLI tool see references/arbor-upstream.md.Science · MIT/cs:cro-review — CRO Forcing Questions/cs:cro-review <plan> — Pipeline-paranoid interrogation of revenue, win rate, NRR, and ramp time. Use when the forecast misses pipeline coverage, win rates drop, or before scaling the sales team. · MIT