hubspot-revops-skill

v2026.09.24

Use when building revenue analytics on HubSpot — SQL warehouse queries, API enrichment pipelines, lead scoring models, pipeline forecasting, competitive intelligence. Triggers on "hubspot analytics", "revops dashboard", "lead scoring", "pipeline forecast", "ICP analysis", "hubspot SQL".

GitHub
安装命令
npx skhub add scientiacapital/hubspot-revops-skill
Markdown
SKILL.md
<objective> Build revenue analytics infrastructure on HubSpot API + SQL data warehouse. Covers ICP validation, ML lead scoring, competitive intelligence, activity analysis, and pipeline forecasting — bridging CRM data into actionable intelligence products. </objective>

<quick_start>

  1. Create a HubSpot Private App with required CRM scopes (contacts, companies, deals, owners, timeline)
  2. Confirm SQL replica access and schema prefix for your data warehouse
  3. Run ICP validation query (UC1) to segment conversion rates
  4. Build pipeline forecast (UC5) using stage-specific historical win rates </quick_start>

<success_criteria>

  • HubSpot Private App authenticated with all required scopes
  • SQL warehouse connected and data freshness validated (sync lag < 24h)
  • At least one use case (ICP, scoring, competitive, activity, forecast) producing results
  • Lead scoring model trained on 200+ historical closed deals with measurable AUC
  • Enrichment pipeline writing scores back to HubSpot without duplicates </success_criteria>

HubSpot RevOps Analytics

Revenue analytics infrastructure on HubSpot API + SQL data warehouse. Bridges CRM data → analytics → intelligence products → revenue impact.

Scope: HubSpot-specific analytics stack. For basic CRM CRUD, use crm-integration-skill. For generic dashboards, use data-analysis-skill.


Setup Checklist

1. HubSpot Private App

Note: Tim's HubSpot is accessed via the Epiphan CRM MCP connector — no Private App setup needed. All hubspot_* tools are available directly.

Create at Settings → Integrations → Private Apps:

ScopePermissionWhy
crm.objects.contacts.read/writeRead/WriteContact enrichment
crm.objects.companies.readReadCompany data
crm.objects.deals.read/writeRead/WritePipeline analytics
crm.schemas.custom.readReadCustom objects
crm.objects.owners.readReadRep attribution
timelineReadActivity data

2. SQL Replica Access

Discovery questions for your data warehouse:

QuestionOptions
Where is HubSpot data replicated?Snowflake / BigQuery / Postgres / Redshift
What ETL tool syncs it?Fivetran / Airbyte / Stitch / HubSpot Data Sync
Sync frequency?Real-time / Hourly / Daily
Schema prefix?hubspot. / raw_hubspot. / custom

3. Python Environment

pip install hubspot-api-client pandas scikit-learn requests
# SDK initialization
from hubspot import HubSpot
client = HubSpot(access_token="pat-na1-xxxxx")

# Or raw requests
import requests
HEADERS = {"Authorization": "Bearer pat-na1-xxxxx", "Content-Type": "application/json"}
BASE = "https://api.hubapi.com"

Core Use Cases

#Use CaseInputOutputTools
1ICP ValidationContact + company dataSegment conversion ratesSQL + Clay
2Lead ScoringHistorical dealsWin probability per leadSQL + ML + API
3Competitive IntelDeal close reasonsWin/loss by competitorSQL + webhook
4Activity AnalysisEngagement dataActivity→outcome correlationSQL
5Pipeline ForecastOpen deals + stage historyWeighted revenue forecastSQL

Use Case Details

UC1 — ICP Validation: Join contacts + companies + deals in SQL, segment by industry/size/geo, compute conversion rates per segment. Feed results to Clay MCP waterfall for enrichment:

  1. find-and-enrich-company or find-and-enrich-contacts-at-company to identify target contacts
  2. add-contact-data-points / add-company-data-points to queue enrichment jobs
  3. get-task to poll for results and check state: completed
  4. Write enriched data back to HubSpot via API or Epiphan CRM integration

Alternative: Use Apollo MCP (apollo_people_match) for direct enrichment without waterfall wait.

UC2 — Lead Scoring: Train GradientBoostingClassifier on historical won/lost deals. Features: company size, industry, engagement score, days in pipeline. Deploy scores back to HubSpot as custom property.

UC3 — Competitive Intel: Extract competitor mentions from deal closed_lost_reason. Build win/loss matrix by competitor. Trigger webhook alerts on competitive displacement patterns.

UC4 — Activity Analysis: Correlate email opens, meetings booked, calls logged with deal outcomes. Identify which activities actually move deals forward.

UC5 — Pipeline Forecast: Calculate weighted forecast using stage-specific win rates from historical data. Factor in deal age, velocity, and rep performance.

Reference: See reference/sql-analytics.md for complete SQL templates per use case.


Golden Rules for Prospect Quality

Tim's BDR targeting criteria (as of March 2026) — Apply these filters before outreach:

-- Exclude existing customers and channels
WHERE lifecyclestage NOT IN ('customer')
  AND custom.first_conversion NOT LIKE '%Pearl%' 
  AND custom.first_conversion NOT LIKE '%setup%'
  AND custom.first_conversion NOT LIKE '%Connect%'
  AND custom.first_conversion NOT LIKE '%signup%'
  AND device_count < 1
  AND is_channel = false

-- Target only AE territories (Lex Evans, Ron Epstein, Phillip Sandler)
  AND hubspot_owner_id IN (82625923, 423155215, 190030668)

-- Optionally segment by company size, industry, location

Use this filter in:

  • ICP Validation queries (UC1) before Clay enrichment
  • Lead scoring model (UC2) training data
  • Prospect research cadence (prospect-research-to-cadence-skill)

Note: See phone-verification-waterfall-skill for full Golden Rules implementation with Clay MCP integration.


Quick Reference: HubSpot API Endpoints

ObjectEndpointKey Operations
Contacts/crm/v3/objects/contactsSearch, create, update, batch
Companies/crm/v3/objects/companiesSearch, associate to contacts
Deals/crm/v3/objects/dealsPipeline, stage history
Engagements/crm/v3/objects/engagementsEmails, calls, meetings
Properties/crm/v3/properties/{object}Custom property CRUD
Associations/crm/v4/associations/{from}/{to}Object linking
Search/crm/v3/objects/{object}/searchFilter + sort (max 10k)

Reference: See reference/api-guide.md for auth, SDK patterns, batch operations.


Quick Reference: SQL Object Model

HubSpot ObjectSQL Table (typical)Key ColumnsJoin Key
Contactshubspot.contactsemail, lifecycle_stage, lead_scorecontact_id
Companieshubspot.companiesdomain, industry, employee_countcompany_id
Dealshubspot.dealsamount, stage, close_date, pipelinedeal_id
Deal Stageshubspot.deal_stage_historystage, timestamp, durationdeal_id
Engagementshubspot.engagementstype, created_at, contact_idengagement_id
Ownershubspot.ownersemail, first_name, teamowner_id

Join pattern: contacts → associations → companies/deals (via association tables)


Integration Points

SkillRelationship
crm-integration-skillBase CRUD patterns, auth setup
data-analysis-skillVisualization, Streamlit dashboards
sales-revenue-skillPipeline metrics, MEDDIC context, forecasting
research-skillMarket/competitive research methodology
cost-metering-skillTrack API calls + Clay enrichment spend
prospect-research-to-cadence-skillAutomated deal flow, Golden Rules filter
deal-momentum-analyzer-skillPipeline health scoring

MCP Integration Points

MCP ConnectorTools Available
Epiphan CRMhubspot_search_companies, hubspot_search_contacts, hubspot_search_deals, hubspot_get_company, hubspot_get_contact, hubspot_get_deal, crm_search_customers, crm_get_customer, crm_get_order, crm_get_customer_orders, analytics_get_device, analytics_search_by_email, ask_agent (AI queries)
Clay MCPfind-and-enrich-company, find-and-enrich-contacts-at-company, find-and-enrich-list-of-contacts, add-contact-data-points, add-company-data-points, get-task
Apolloapollo_people_match, apollo_contacts_create, apollo_contacts_search, apollo_organizations_enrich, apollo_mixed_companies_search, apollo_emailer_campaigns_*

Common Mistakes

MistakeFix
Exceeding 100 requests/10s rate limitUse batch endpoints, add exponential backoff
Using Search API for >10k resultsSwitch to SQL warehouse for bulk analytics
Hardcoded property internal namesFetch property definitions first: GET /crm/v3/properties/{object}
Missing association API for object linksUse v4 associations: POST /crm/v4/associations/{from}/{to}/batch/read
SQL DATEDIFF in PostgresUse AGE() or EXTRACT(EPOCH FROM ...) — see dialect notes
Not handling HubSpot's hs_object_idAlways include hs_object_id in property requests
Missing phone numbers after enrichmentUse Clay waterfall after Apollo: Apollo first (fast, free), then Clay MCP (find-and-enrich-contacts-at-company → add-contact-data-points → get-task) for phone verification. Clay aggregates 50+ data providers for high match rates.
Scoring model trained on small datasetNeed 200+ closed deals minimum for reliable ML scores
Apollo-only enrichment missing dataClay MCP as fallback: Create taskId with find-and-enrich-company, then add-contact-data-points for Email/phone/work history, poll results with get-task

Workflow Phases

Phase 1: Foundation

  1. Set up Private App with required scopes
  2. Confirm SQL replica access and schema
  3. Run schema discovery queries
  4. Validate data freshness (sync lag)

Phase 2: Analytics

  1. Build ICP validation queries (UC1)
  2. Create pipeline velocity dashboard (UC2, UC5)
  3. Set up competitive intelligence tracking (UC3)

Phase 3: Intelligence

  1. Train lead scoring model on historical deals
  2. Deploy scores to HubSpot via API
  3. Build enrichment pipelines (Clay → HubSpot)
  4. Set up automated alerts and webhooks

Reference: See reference/enrichment-pipelines.md for ML scoring and Clay integration. Reference: See reference/architecture.md for deployment patterns and cost estimates.

Emit Outcome Sidecar

As the final step, write to ~/.claude/skill-analytics/last-outcome-hubspot-revops.json:

{"ts":"[UTC ISO8601]","skill":"hubspot-revops","version":"1.0.0","variant":"default",
 "status":"[success|partial|error]","runtime_ms":[estimated ms from start],
 "metrics":{"queries_executed":[n],"reports_generated":[n],"insights_found":[n]},
 "error":null,"session_id":"[YYYY-MM-DD]"}

Use status "partial" if some stages failed but results were produced. Use "error" only if no output was generated.

发现
标签

此技能尚未发布标签。

版本
最新版本元数据

版本

v2026.09.24

发布时间

2026年9月24日

分类

未分类

许可证

未指定

源路径

active/hubspot-revops-skill

默认分支

main

最新提交

9e03af3

Tree SHA

5b28287