HubSpot Enrichment & Scoring skill

HubSpot CRM enrichment and lead scoring skill for Claude Code and Codex: pull companies from HubSpot, match and enrich them via Vibe Prospecting with firmographics, tech stack, funding history, and intent signals, compute an ICP fit score (0-100) and A/B/C tier, and write everything back to HubSpot as custom properties.

by explorium-ai·MIT license·★ 197 Stars on the repo·GitHub ↗

Use now

Inside this skill

SKILL.md · the author's own words
# HubSpot Enrichment & Scoring

Enrich your HubSpot CRM with Explorium data and write ICP fit scores directly back to your records. Claude runs the full pipeline: pull fro…

**What you'll end up with:**
- Enriched company records: firmographics, tech stack, funding history, intent signals
- An ICP fit score (0–100) and tier (A/B/C) on every company
- All of it written back to HubSpot as custom properties, ready for segmentation and sequencing

---

## Step 0 — Credential Check (Claude: always do this first)

Do not touch Phase 1 until both checks pass.

### Vibe Prospecting

Word-for-word excerpt, not a result. Read the full SKILL.md ↓

Files of HubSpot Enrichment & Scoring

explorium-ai/main1 file shown
SKILL.md
Show the full text346 lines

HubSpot Enrichment & Scoring

Enrich your HubSpot CRM with Explorium data and write ICP fit scores directly back to your records. Claude runs the full pipeline: pull from HubSpot → match & enrich via Vibe Prospecting → score → push back.

What you'll end up with:

  • Enriched company records: firmographics, tech stack, funding history, intent signals
  • An ICP fit score (0–100) and tier (A/B/C) on every company
  • All of it written back to HubSpot as custom properties, ready for segmentation and sequencing

Step 0 — Credential Check (Claude: always do this first)

Do not touch Phase 1 until both checks pass.

Vibe Prospecting

Cowork mode: look for a tool matching mcp__*__fetch-entities in your tool list.

  • ✅ Found → proceed
  • ❌ Missing → tell the user: "Please connect the Vibe Prospecting connector from the connector store, then let me know when it's done." Wait. Do not continue until the tool appears.

Claude Code / terminal:

npx @vibeprospecting/vpai@latest --help
  • ✅ Lists tools → proceed
  • ❌ Error → run: npx @vibeprospecting/vpai@latest config --api-key "YOUR_VP_API_KEY" (get key from vibeprospecting.com → Settings → API Keys)
HubSpot Token

Ask the user: "Please paste your HubSpot Private App token (starts with pat-). I'll verify it and we'll get started."

Don't have one yet? Create it in HubSpot → Settings → Integrations → Private Apps → Create a private app. Enable scopes: crm.objects.companies.read, crm.objects.companies.write. Click Create and copy the token.

Once the user provides the token, verify it:

export HUBSPOT_TOKEN="<token-from-user>"

curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=1" \
  -H "Authorization: Bearer $HUBSPOT_TOKEN" \
  | python3 -c "
import json, sys
d = json.load(sys.stdin)
print('✅ Connected') if d.get('results') is not None else print('❌ Failed:', d.get('message','unknown error'))
"
  • ✅ Connected → tell the user "Both credentials verified — let's go." Proceed to Phase 1.
  • ❌ Failed → tell the user the token didn't work, ask them to check the scopes and try again. Do not proceed.

The token lives only in the session environment variable. It is never stored or logged.


Phase 1 — Pull Companies from HubSpot

Export your HubSpot company records. The match keys are name and domain — domain is the more reliable one.

For up to 100 companies:

curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=100&properties=name,domain,hs_object_id,lifecyclestage,numberofemployees,annualrevenue,industry" \
  -H "Authorization: Bearer $HUBSPOT_TOKEN" \
  | python3 -c "
import json, sys, csv

data = json.load(sys.stdin)
fields = ['hs_object_id','name','domain','lifecyclestage','numberofemployees','annualrevenue','industry']
w = csv.DictWriter(sys.stdout, fieldnames=fields, extrasaction='ignore')
w.writeheader()
for r in data['results']:
    row = {'hs_object_id': r['id']}
    row.update(r['properties'])
    w.writerow(row)
" > hs-companies-raw.csv

echo "Exported $(wc -l < hs-companies-raw.csv) rows"

For larger exports (paginated):

import csv, os, requests

TOKEN = os.environ["HUBSPOT_TOKEN"]
HEADERS = {"Authorization": f"Bearer {TOKEN}"}
PROPS = "name,domain,hs_object_id,lifecyclestage,numberofemployees,annualrevenue,industry"
FIELDS = ['hs_object_id','name','domain','lifecyclestage','numberofemployees','annualrevenue','industry']

rows, params = [], {"limit": 100, "properties": PROPS}
while True:
    resp = requests.get("https://api.hubapi.com/crm/v3/objects/companies", headers=HEADERS, params=params)
    resp.raise_for_status()
    data = resp.json()
    for r in data["results"]:
        row = {"hs_object_id": r["id"]}
        row.update(r["properties"])
        rows.append(row)
    after = data.get("paging", {}).get("next", {}).get("after")
    if not after:
        break
    params["after"] = after

with open("hs-companies-raw.csv", "w", newline="") as f:
    w = csv.DictWriter(f, fieldnames=FIELDS, extrasaction="ignore")
    w.writeheader()
    w.writerows(rows)

print(f"Exported {len(rows)} companies")

Tips:

  • If many records are missing domain, clean those in HubSpot before running this skill — domain is the primary match key and missing domains won't match.
  • To enrich only a subset (e.g. leads and MQLs), filter lifecyclestage after export before passing to Phase 2.

Output: hs-companies-raw.csv

Starting from scratch with no existing HubSpot records? Skip to Phase 2 and use fetch-entities to build a net-new account list from your ICP, then push those as new HubSpot companies in Phase 5.


Phase 2 — Match to Vibe Prospecting IDs

Resolve company names and domains to Explorium business IDs. These IDs are required for all enrichment steps.

# Always check schema before first use
npx @vibeprospecting/vpai@latest match-business --all-parameters

# Match from the exported CSV
npx @vibeprospecting/vpai@latest match-business \
  --file-path hs-companies-raw.csv \
  --schema '{"name":"name","domain":"domain"}' \
  --tool-reasoning 'Match HubSpot companies to Vibe Prospecting IDs for enrichment'

Note the session_id and table_name from the JSON output — you'll pass these to every subsequent step.

Drop any matches with confidence < 0.7 before proceeding.

Output: matched companies in session DB (vp-matched table)


Phase 3 — Enrich

Pull firmographic, technographic, funding, and intent data for every matched company.

npx @vibeprospecting/vpai@latest enrich-business --all-parameters

npx @vibeprospecting/vpai@latest enrich-business \
  --args '{
    "enrichments": ["firmographics", "technographics", "funding-and-acquisitions"]
  }' \
  --session-id <SESSION_ID> \
  --table-name <TABLE_NAME_FROM_MATCH_STEP> \
  --tool-reasoning 'Enrich HubSpot companies with Vibe Prospecting data' \
  --csv

Available enrichment categories:

Category What you get
firmographics Revenue, headcount, industry, HQ location, founding year
technographics Full tech stack — CRM, marketing automation, data tools, infra
funding-and-acquisitions Total raised, last round type/date/amount, investors
intent Topics the company is actively researching (requires intent add-on)

Output: vp-enriched.csv


Phase 4 — Score on ICP Fit

Ask the user for their ICP criteria if not already provided:

"To score these companies, I need to know your ideal customer profile. What industry, company size, revenue range, and tech stack signals matter most? And how would you weight them?"

Then read vp-enriched.csv and score each row. Add three columns:

Column Description
icp_score 0–100 fit score
icp_tier A (80–100), B (60–79), C (40–59), Disqualified (<40)
icp_score_reason One-line explanation

Default weights (adjust to the user's ICP):

  • Industry match: 25%
  • Headcount match: 25%
  • Tech stack match: 30%
  • Revenue/funding match: 20%

Save output to vp-scored.csv.


Phase 5 — Push Back to HubSpot

Step 1 — Create custom properties (one-time)

Run this once to create the Vibe Prospecting properties in HubSpot. Skip any that already exist.

for PROP_JSON in \
  '{"name":"vp_icp_score","label":"ICP Score (Vibe)","type":"number","fieldType":"number"}' \
  '{"name":"vp_icp_tier","label":"ICP Tier (Vibe)","type":"string","fieldType":"text"}' \
  '{"name":"vp_icp_score_reason","label":"ICP Score Reason (Vibe)","type":"string","fieldType":"text"}' \
  '{"name":"vp_headcount","label":"Headcount (Vibe)","type":"number","fieldType":"number"}' \
  '{"name":"vp_annual_revenue","label":"Annual Revenue (Vibe)","type":"number","fieldType":"number"}' \
  '{"name":"vp_tech_stack","label":"Tech Stack (Vibe)","type":"string","fieldType":"textarea"}' \
  '{"name":"vp_total_funding","label":"Total Funding (Vibe)","type":"number","fieldType":"number"}' \
  '{"name":"vp_last_funding_type","label":"Last Funding Type (Vibe)","type":"string","fieldType":"text"}' \
  '{"name":"vp_last_funding_date","label":"Last Funding Date (Vibe)","type":"string","fieldType":"text"}'; do
  curl -s -X POST "https://api.hubapi.com/crm/v3/properties/companies" \
    -H "Authorization: Bearer $HUBSPOT_TOKEN" \
    -H "Content-Type: application/json" \
    -d "$PROP_JSON" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('name','?'), '—', 'created' if 'name' in d else d.get('message','error'))"
done
Step 2 — Batch update company records
import csv, json, os, requests, time

TOKEN = os.environ["HUBSPOT_TOKEN"]
HEADERS = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}

with open("vp-scored.csv") as f:
    rows = list(csv.DictReader(f))

def build_batch(chunk):
    return [
        {
            "id": row["hs_object_id"],
            "properties": {
                "vp_icp_score":        row.get("icp_score", ""),
                "vp_icp_tier":         row.get("icp_tier", ""),
                "vp_icp_score_reason": row.get("icp_score_reason", ""),
                "vp_headcount":        row.get("employee_count", ""),
                "vp_annual_revenue":   row.get("annual_revenue", ""),
                "vp_tech_stack":       row.get("tech_stack", ""),
                "vp_total_funding":    row.get("total_funding", ""),
                "vp_last_funding_type":row.get("last_funding_type", ""),
                "vp_last_funding_date":row.get("last_funding_date", ""),
            }
        }
        for row in chunk
    ]

# Batch in groups of 100
for i in range(0, len(rows), 100):
    chunk = rows[i:i+100]
    resp = requests.post(
        "https://api.hubapi.com/crm/v3/objects/companies/batch/update",
        headers=HEADERS,
        json={"inputs": build_batch(chunk)}
    )
    print(f"Batch {i//100 + 1}: {resp.status_code}")
    if resp.status_code == 429:
        print("Rate limited — waiting 10s")
        time.sleep(10)

Output: HubSpot company records updated with enriched fields + ICP scores


Phase 6 (Optional) — Enrich Contacts at Top Accounts

Scope to A-tier accounts only (ICP score ≥ 80) before fetching contacts — keeps the batch focused and cost-efficient.

# Fetch key contacts at top-scored companies
npx @vibeprospecting/vpai@latest fetch-entities \
  --args '{
    "entity_type": "prospects",
    "filters": {
      "job_level": {"values": ["vice president", "director", "c_suite"]},
      "job_department": {"values": ["sales", "revenue_operations", "marketing"]},
      "has_email": true
    }
  }' \
  --businesses-table-name <TABLE_NAME_FROM_ENRICH_STEP> \
  --session-id <SESSION_ID> \
  --number-of-results 200 \
  --tool-reasoning 'Fetch key contacts at top ICP accounts for HubSpot'

# Enrich with verified contact info
npx @vibeprospecting/vpai@latest enrich-prospects \
  --args '{"enrichments": ["contacts", "profiles"]}' \
  --session-id <SESSION_ID> \
  --table-name <FETCH_PROSPECTS_TABLE> \
  --csv \
  --tool-reasoning 'Enrich contact info for HubSpot push'

Then upsert contacts into HubSpot using /crm/v3/objects/contacts/batch/upsert, matching on email. Set hs_additional_domains or associate to the parent company using the associations API.


Full Checklist

[ ] Step 0  — Vibe Prospecting connected, HubSpot token verified
[ ] Phase 1 — Companies exported to hs-companies-raw.csv
[ ] Phase 2 — Matched to Vibe Prospecting IDs
[ ] Phase 3 — Enriched (firmographics, tech stack, funding)
[ ] Phase 4 — ICP scores computed and tiered (A/B/C)
[ ] Phase 5 — HubSpot properties created; company records updated
[ ] Phase 6 — (optional) Contacts enriched and pushed to HubSpot

HubSpot Custom Properties Written

Property Type Description
vp_icp_score Number ICP fit score 0–100
vp_icp_tier Text A / B / C / Disqualified
vp_icp_score_reason Text One-line score rationale
vp_headcount Number Employee count from Explorium
vp_annual_revenue Number Estimated annual revenue
vp_tech_stack Text Comma-separated tech stack
vp_total_funding Number Total funding raised (USD)
vp_last_funding_type Text Series A / Seed / PE / etc.
vp_last_funding_date Text Date of most recent round

Troubleshooting

Problem Solution
Vibe Prospecting tools missing in Cowork Open connector store → connect Vibe Prospecting → wait for tools to appear
HubSpot 401 Unauthorized Token is wrong or scopes missing — recreate the Private App with correct scopes
Low match rate Ensure domain is populated on HubSpot records — it's the primary match key
HubSpot 429 Rate Limit Batch update allows 100 records/call; script already handles this with time.sleep
Property already exists error on Step 1 Safe to ignore — the property is already there
Contacts not linking to companies Use the HubSpot associations API after upsert to link contacts to their parent company
1---
2name: hubspot-enrichment-scoring
3description: "HubSpot CRM enrichment and lead scoring skill for Claude Code and Codex: pull companies from HubSpot, match and enrich them via Vibe Prospecting with firmographics, tech stack, funding history, and intent signals, compute an ICP fit score (0-100) and A/B/C tier, and write everything back to HubSpot as custom properties. Use for CRM enrichment, account scoring, and segmentation prep. Triggers on 'enrich my HubSpot', 'score my HubSpot companies', 'CRM enrichment', 'write ICP scores to HubSpot'. Works in Claude Code, Codex, Grok, and Claude Cowork."
4compatibility: "Requires: Vibe Prospecting CLI (npx @vibeprospecting/vpai@latest) or connector, HubSpot Private App token with crm.objects.companies.read/write scopes"
5---
6 
7# HubSpot Enrichment & Scoring
8 
9Enrich your HubSpot CRM with Explorium data and write ICP fit scores directly back to your records. Claude runs the full pipeline: pull from HubSpot → match & enrich via Vibe Prospecting → score → push back.
10 
11**What you'll end up with:**
12- Enriched company records: firmographics, tech stack, funding history, intent signals
13- An ICP fit score (0–100) and tier (A/B/C) on every company
14- All of it written back to HubSpot as custom properties, ready for segmentation and sequencing
15 
16---
17 
18## Step 0 — Credential Check (Claude: always do this first)
19 
20Do not touch Phase 1 until both checks pass.
21 
22### Vibe Prospecting
23 
24**Cowork mode:** look for a tool matching `mcp__*__fetch-entities` in your tool list.
25- ✅ Found → proceed
26- ❌ Missing → tell the user: *"Please connect the Vibe Prospecting connector from the connector store, then let me know when it's done."* Wait. Do not continue until the tool appears.
27 
28**Claude Code / terminal:**
29```bash
30npx @vibeprospecting/vpai@latest --help
31```
32- ✅ Lists tools → proceed
33- ❌ Error → run: `npx @vibeprospecting/vpai@latest config --api-key "YOUR_VP_API_KEY"` (get key from vibeprospecting.com → Settings → API Keys)
34 
35### HubSpot Token
36 
37Ask the user: *"Please paste your HubSpot Private App token (starts with `pat-`). I'll verify it and we'll get started."*
38 
39**Don't have one yet?** Create it in HubSpot → Settings → Integrations → Private Apps → Create a private app. Enable scopes: `crm.objects.companies.read`, `crm.objects.companies.write`. Click Create and copy the token.
40 
41Once the user provides the token, verify it:
42```bash
43export HUBSPOT_TOKEN="<token-from-user>"
44 
45curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=1" \
46 -H "Authorization: Bearer $HUBSPOT_TOKEN" \
47 | python3 -c "
48import json, sys
49d = json.load(sys.stdin)
50print('✅ Connected') if d.get('results') is not None else print('❌ Failed:', d.get('message','unknown error'))
51"
52```
53- ✅ Connected → tell the user *"Both credentials verified — let's go."* Proceed to Phase 1.
54- ❌ Failed → tell the user the token didn't work, ask them to check the scopes and try again. Do not proceed.
55 
56> The token lives only in the session environment variable. It is never stored or logged.
57 
58---
59 
60## Phase 1 — Pull Companies from HubSpot
61 
62Export your HubSpot company records. The match keys are `name` and `domain` — domain is the more reliable one.
63 
64**For up to 100 companies:**
65```bash
66curl -s "https://api.hubapi.com/crm/v3/objects/companies?limit=100&properties=name,domain,hs_object_id,lifecyclestage,numberofemployees,annualrevenue,industry" \
67 -H "Authorization: Bearer $HUBSPOT_TOKEN" \
68 | python3 -c "
69import json, sys, csv
70 
71data = json.load(sys.stdin)
72fields = ['hs_object_id','name','domain','lifecyclestage','numberofemployees','annualrevenue','industry']
73w = csv.DictWriter(sys.stdout, fieldnames=fields, extrasaction='ignore')
74w.writeheader()
75for r in data['results']:
76 row = {'hs_object_id': r['id']}
77 row.update(r['properties'])
78 w.writerow(row)
79" > hs-companies-raw.csv
80 
81echo "Exported $(wc -l < hs-companies-raw.csv) rows"
82```
83 
84**For larger exports (paginated):**
85```python
86import csv, os, requests
87 
88TOKEN = os.environ["HUBSPOT_TOKEN"]
89HEADERS = {"Authorization": f"Bearer {TOKEN}"}
90PROPS = "name,domain,hs_object_id,lifecyclestage,numberofemployees,annualrevenue,industry"
91FIELDS = ['hs_object_id','name','domain','lifecyclestage','numberofemployees','annualrevenue','industry']
92 
93rows, params = [], {"limit": 100, "properties": PROPS}
94while True:
95 resp = requests.get("https://api.hubapi.com/crm/v3/objects/companies", headers=HEADERS, params=params)
96 resp.raise_for_status()
97 data = resp.json()
98 for r in data["results"]:
99 row = {"hs_object_id": r["id"]}
100 row.update(r["properties"])
101 rows.append(row)
102 after = data.get("paging", {}).get("next", {}).get("after")
103 if not after:
104 break
105 params["after"] = after
106 
107with open("hs-companies-raw.csv", "w", newline="") as f:
108 w = csv.DictWriter(f, fieldnames=FIELDS, extrasaction="ignore")
109 w.writeheader()
110 w.writerows(rows)
111 
112print(f"Exported {len(rows)} companies")
113```
114 
115**Tips:**
116- If many records are missing `domain`, clean those in HubSpot before running this skill — domain is the primary match key and missing domains won't match.
117- To enrich only a subset (e.g. leads and MQLs), filter `lifecyclestage` after export before passing to Phase 2.
118 
119**Output:** `hs-companies-raw.csv`
120 
121> **Starting from scratch with no existing HubSpot records?** Skip to Phase 2 and use `fetch-entities` to build a net-new account list from your ICP, then push those as new HubSpot companies in Phase 5.
122 
123---
124 
125## Phase 2 — Match to Vibe Prospecting IDs
126 
127Resolve company names and domains to Explorium business IDs. These IDs are required for all enrichment steps.
128 
129```bash
130# Always check schema before first use
131npx @vibeprospecting/vpai@latest match-business --all-parameters
132 
133# Match from the exported CSV
134npx @vibeprospecting/vpai@latest match-business \
135 --file-path hs-companies-raw.csv \
136 --schema '{"name":"name","domain":"domain"}' \
137 --tool-reasoning 'Match HubSpot companies to Vibe Prospecting IDs for enrichment'
138```
139 
140Note the `session_id` and `table_name` from the JSON output — you'll pass these to every subsequent step.
141 
142Drop any matches with confidence < 0.7 before proceeding.
143 
144**Output:** matched companies in session DB (`vp-matched` table)
145 
146---
147 
148## Phase 3 — Enrich
149 
150Pull firmographic, technographic, funding, and intent data for every matched company.
151 
152```bash
153npx @vibeprospecting/vpai@latest enrich-business --all-parameters
154 
155npx @vibeprospecting/vpai@latest enrich-business \
156 --args '{
157 "enrichments": ["firmographics", "technographics", "funding-and-acquisitions"]
158 }' \
159 --session-id <SESSION_ID> \
160 --table-name <TABLE_NAME_FROM_MATCH_STEP> \
161 --tool-reasoning 'Enrich HubSpot companies with Vibe Prospecting data' \
162 --csv
163```
164 
165**Available enrichment categories:**
166 
167| Category | What you get |
168|----------|-------------|
169| `firmographics` | Revenue, headcount, industry, HQ location, founding year |
170| `technographics` | Full tech stack — CRM, marketing automation, data tools, infra |
171| `funding-and-acquisitions` | Total raised, last round type/date/amount, investors |
172| `intent` | Topics the company is actively researching (requires intent add-on) |
173 
174**Output:** `vp-enriched.csv`
175 
176---
177 
178## Phase 4 — Score on ICP Fit
179 
180Ask the user for their ICP criteria if not already provided:
181> *"To score these companies, I need to know your ideal customer profile. What industry, company size, revenue range, and tech stack signals matter most? And how would you weight them?"*
182 
183Then read `vp-enriched.csv` and score each row. Add three columns:
184 
185| Column | Description |
186|--------|-------------|
187| `icp_score` | 0–100 fit score |
188| `icp_tier` | A (80–100), B (60–79), C (40–59), Disqualified (<40) |
189| `icp_score_reason` | One-line explanation |
190 
191**Default weights (adjust to the user's ICP):**
192- Industry match: 25%
193- Headcount match: 25%
194- Tech stack match: 30%
195- Revenue/funding match: 20%
196 
197Save output to `vp-scored.csv`.
198 
199---
200 
201## Phase 5 — Push Back to HubSpot
202 
203### Step 1 — Create custom properties (one-time)
204 
205Run this once to create the Vibe Prospecting properties in HubSpot. Skip any that already exist.
206 
207```bash
208for PROP_JSON in \
209 '{"name":"vp_icp_score","label":"ICP Score (Vibe)","type":"number","fieldType":"number"}' \
210 '{"name":"vp_icp_tier","label":"ICP Tier (Vibe)","type":"string","fieldType":"text"}' \
211 '{"name":"vp_icp_score_reason","label":"ICP Score Reason (Vibe)","type":"string","fieldType":"text"}' \
212 '{"name":"vp_headcount","label":"Headcount (Vibe)","type":"number","fieldType":"number"}' \
213 '{"name":"vp_annual_revenue","label":"Annual Revenue (Vibe)","type":"number","fieldType":"number"}' \
214 '{"name":"vp_tech_stack","label":"Tech Stack (Vibe)","type":"string","fieldType":"textarea"}' \
215 '{"name":"vp_total_funding","label":"Total Funding (Vibe)","type":"number","fieldType":"number"}' \
216 '{"name":"vp_last_funding_type","label":"Last Funding Type (Vibe)","type":"string","fieldType":"text"}' \
217 '{"name":"vp_last_funding_date","label":"Last Funding Date (Vibe)","type":"string","fieldType":"text"}'; do
218 curl -s -X POST "https://api.hubapi.com/crm/v3/properties/companies" \
219 -H "Authorization: Bearer $HUBSPOT_TOKEN" \
220 -H "Content-Type: application/json" \
221 -d "$PROP_JSON" | python3 -c "import json,sys; d=json.load(sys.stdin); print(d.get('name','?'), '—', 'created' if 'name' in d else d.get('message','error'))"
222done
223```
224 
225### Step 2 — Batch update company records
226 
227```python
228import csv, json, os, requests, time
229 
230TOKEN = os.environ["HUBSPOT_TOKEN"]
231HEADERS = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}
232 
233with open("vp-scored.csv") as f:
234 rows = list(csv.DictReader(f))
235 
236def build_batch(chunk):
237 return [
238 {
239 "id": row["hs_object_id"],
240 "properties": {
241 "vp_icp_score": row.get("icp_score", ""),
242 "vp_icp_tier": row.get("icp_tier", ""),
243 "vp_icp_score_reason": row.get("icp_score_reason", ""),
244 "vp_headcount": row.get("employee_count", ""),
245 "vp_annual_revenue": row.get("annual_revenue", ""),
246 "vp_tech_stack": row.get("tech_stack", ""),
247 "vp_total_funding": row.get("total_funding", ""),
248 "vp_last_funding_type":row.get("last_funding_type", ""),
249 "vp_last_funding_date":row.get("last_funding_date", ""),
250 }
251 }
252 for row in chunk
253 ]
254 
255# Batch in groups of 100
256for i in range(0, len(rows), 100):
257 chunk = rows[i:i+100]
258 resp = requests.post(
259 "https://api.hubapi.com/crm/v3/objects/companies/batch/update",
260 headers=HEADERS,
261 json={"inputs": build_batch(chunk)}
262 )
263 print(f"Batch {i//100 + 1}: {resp.status_code}")
264 if resp.status_code == 429:
265 print("Rate limited — waiting 10s")
266 time.sleep(10)
267```
268 
269**Output:** HubSpot company records updated with enriched fields + ICP scores
270 
271---
272 
273## Phase 6 (Optional) — Enrich Contacts at Top Accounts
274 
275Scope to A-tier accounts only (ICP score ≥ 80) before fetching contacts — keeps the batch focused and cost-efficient.
276 
277```bash
278# Fetch key contacts at top-scored companies
279npx @vibeprospecting/vpai@latest fetch-entities \
280 --args '{
281 "entity_type": "prospects",
282 "filters": {
283 "job_level": {"values": ["vice president", "director", "c_suite"]},
284 "job_department": {"values": ["sales", "revenue_operations", "marketing"]},
285 "has_email": true
286 }
287 }' \
288 --businesses-table-name <TABLE_NAME_FROM_ENRICH_STEP> \
289 --session-id <SESSION_ID> \
290 --number-of-results 200 \
291 --tool-reasoning 'Fetch key contacts at top ICP accounts for HubSpot'
292 
293# Enrich with verified contact info
294npx @vibeprospecting/vpai@latest enrich-prospects \
295 --args '{"enrichments": ["contacts", "profiles"]}' \
296 --session-id <SESSION_ID> \
297 --table-name <FETCH_PROSPECTS_TABLE> \
298 --csv \
299 --tool-reasoning 'Enrich contact info for HubSpot push'
300```
301 
302Then upsert contacts into HubSpot using `/crm/v3/objects/contacts/batch/upsert`, matching on email. Set `hs_additional_domains` or associate to the parent company using the associations API.
303 
304---
305 
306## Full Checklist
307 
308```
309[ ] Step 0 — Vibe Prospecting connected, HubSpot token verified
310[ ] Phase 1 — Companies exported to hs-companies-raw.csv
311[ ] Phase 2 — Matched to Vibe Prospecting IDs
312[ ] Phase 3 — Enriched (firmographics, tech stack, funding)
313[ ] Phase 4 — ICP scores computed and tiered (A/B/C)
314[ ] Phase 5 — HubSpot properties created; company records updated
315[ ] Phase 6 — (optional) Contacts enriched and pushed to HubSpot
316```
317 
318---
319 
320## HubSpot Custom Properties Written
321 
322| Property | Type | Description |
323|----------|------|-------------|
324| `vp_icp_score` | Number | ICP fit score 0–100 |
325| `vp_icp_tier` | Text | A / B / C / Disqualified |
326| `vp_icp_score_reason` | Text | One-line score rationale |
327| `vp_headcount` | Number | Employee count from Explorium |
328| `vp_annual_revenue` | Number | Estimated annual revenue |
329| `vp_tech_stack` | Text | Comma-separated tech stack |
330| `vp_total_funding` | Number | Total funding raised (USD) |
331| `vp_last_funding_type` | Text | Series A / Seed / PE / etc. |
332| `vp_last_funding_date` | Text | Date of most recent round |
333 
334---
335 
336## Troubleshooting
337 
338| Problem | Solution |
339|---------|----------|
340| Vibe Prospecting tools missing in Cowork | Open connector store → connect Vibe Prospecting → wait for tools to appear |
341| HubSpot 401 Unauthorized | Token is wrong or scopes missing — recreate the Private App with correct scopes |
342| Low match rate | Ensure `domain` is populated on HubSpot records — it's the primary match key |
343| HubSpot 429 Rate Limit | Batch update allows 100 records/call; script already handles this with `time.sleep` |
344| Property already exists error on Step 1 | Safe to ignore — the property is already there |
345| Contacts not linking to companies | Use the HubSpot associations API after upsert to link contacts to their parent company |
346 

Discussion

Alternatives

AI Sales Team — Main OrchestratorYou are a comprehensive AI sales intelligence and outreach system for Claude Code. You help founders, sales teams, agency owners, and…Sales & ecommerce · MITAuto research publicAutonomous cold email campaign launcher. Takes one target company domain, scrapes their website, generates an ICP with Claude, pulls matching leads via Prospeo, enriches emails + company descriptions, personalizes each lead with parallel Claude Code Task sub-agents (A/B/C variants), and uploads as a live Smartlead campaign. Uses local JSON files for state (no database required). Use for automated daily campaign launches after you have an initial `client-profile.yaml` from /icp-onboarding. Triggers on "auto-research", "launch an automated campaign", "daily campaign", "run the research loop".Sales & ecommerce · MITABM Campaign — DIY PlaybookABM campaign skill for Claude Code: run a full Account-Based Marketing campaign end-to-end — from ICP definition to live LinkedIn Ads. Builds targeted account lists with Vibe Prospecting, enriches and scores companies with real-time B2B data, generates personalized ad creatives with Claude Code and Figma, pushes matched audiences to LinkedIn Ads, and monitors campaigns daily at scale. The complete GTM skill for AI-driven account-based marketing in Claude Code, Codex, Hermes-Agent, and OpenClaw. No agency needed.Sales & ecommerce · MITAccount contact shortlistContact data skill for Claude Code and Codex: build a ranked shortlist of decision-makers and contacts at a target company for outbound prospecting, deal acceleration, or renewal/expansion plays. Returns verified contact data including email, phone, LinkedIn profile, title, seniority, and department. Provide a company name or domain plus optional seniority focus or use case. Use for contact data enrichment, LinkedIn profile lookup, and building outbound contact lists. Works in Claude Code, Codex, Hermes-Agent, and OpenClaw.Business & ops · MIT