HubSpot CRM Hub

HubSpot is the primary CRM for all RERI acquisition and disposition deal pipelines. This hub is the canonical reference for HubSpot integrations, webhook handler, dual-pipeline architecture, and all KB doc pointers. Read before modifying any deal, contact, pipeline, or HubSpot-related automation. Owned by the acquisitions and dispo workflows; all agent deal writes must route through hubspot-deal-ingest.

Quick reference

FieldValue
VendorHubSpot
URLhttps://app.hubspot.com / https://api.hubapi.com
Portal ID6193101
KB docAPI
Auth methodBearer (Private App Access Token)
Auth credentialop://Aurora/hubspot/api-key
Cred-proxy portn/a (until B1-B6 ratified)
Webhook port:18790
Webhook handlerhubspot-handler (workspace/webhooks/hubspot-handler.js)
Webhook dedup tableprocessed_webhook_events (24h TTL)
Tunnel path/webhook/hubspot
Outbound API basehttps://api.hubapi.com
Rate limits10 concurrent requests; 100 events/batch
Rate-limit action429 → exp backoff (3 retries), Discord ops alert
Signature headerX-HubSpot-Signature (HMAC-SHA256: app_secret + request_body)
CostVaries by tier; ~$0 API calls; HubSpot subscription separate
Backup/recoveryHubSpot-owned (SaaS); Supabase bidirectional sync for deal state
Discord alert channelops
Drift cadenceweekly (security-audit-funnel.timer)
Statusproduction

Pipelines

Acquisition Pipeline — ID 877963314

The acquisition pipeline tracks inbound wholesale deal leads from contract holders (CH). All deals sourced from investorlift, direct SMS/OpenPhone inbound, or manual intake land here first.

FieldValue
Pipeline ID877963314
Pipeline nameAcquisitions
Entry stageNew Lead
Deal-to-deal associationLinks to dispo deal on acq approval
Stage syncBidirectional: HubSpot ↔ Supabase acquisition_deals table via stage-sync.js
Outreach triggersmart-outreach-worker.js + unified-outreach-engine.js (Stage 1 via acquisitions-outreach)
Follow-up triggerfollow-up-scheduler.js + follow-up-engine.js (Stages 2-4 via acquisitions-followup)
Primary agent_summary
Contact createfindContactByPhone()createContact() in hubspot-deal-creator.js

Key acquisition stages (from ACQUISITION_STAGES in hubspot-deal-creator.js):

  • New Lead → Contacted → Under Review → LOI Sent → Under Contract → Closed / Dead

Compliance gates enforced before any HubSpot acq write:

  1. gate-computer — prior contact check
  2. compliance-gate — TCPA quiet hours, opt-out
  3. blast-safety — daily blast cap
  4. thread-context — de-duplicate active threads
  5. response-generator — LLM quality gate

Disposition Pipeline — ID 816046

The dispo pipeline tracks outbound deal marketing to buyers and end-investors. Created automatically when an acquisition deal is approved, linked via deal-to-deal association.

FieldValue
Pipeline ID816046
Pipeline nameWholesale Deals (Disposition)
Entry stageNew Dispo Deal
Creation sourcecreateDispoDeal() in hubspot-deal-creator.js
Deal-to-deal linkassociateDealToDeal() — acq_deal_id ↔ dispo_deal_id
Stage syncsyncAcqStageToDispo() mirrors acq stage transitions
Blast triggerdispo-blast-engine.js (4-channel coordinator via dispo-blast)
Email triggerdispo-email-sender.js → BetterFiles TC emails via betterfiles-dispo-emails
Primary agentAtlas (dispo orchestrator)
Supporting agent_summary

Dispo stage flow: New Dispo Deal → Marketed → Showing → Under Contract → Closed / Back to Market


Components

  • workspace/webhooks/hubspot-handler.js — main webhook handler (port :18790); HMAC-SHA256 sig verify; Phase 2 workflow action handlers; deal router, TC assignment, deal evaluator, SMS consolidation
  • workspace/scripts/hubspot-deal-creator.js — universal deal creator (1006 lines, 11 exports); createDealFromParsed() is the single entry point for all sources
  • workspace/scripts/lib/hubspot-client.js — shared HubSpot API client (auth, retry, rate-limit)
  • workspace/scripts/lib/stage-sync.js — bidirectional stage sync HubSpot ↔ Supabase
  • workspace/integrations/hubspot/actions/deal-router.js — workflow action: route deal to pipeline
  • workspace/integrations/hubspot/actions/sms-consolidation.js — workflow action: consolidate SMS into CRM
  • workspace/integrations/hubspot/actions/tc-assignment.js — workflow action: assign TC
  • workspace/integrations/hubspot/actions/deal-evaluator.js — workflow action: LLM deal scoring
  • workspace/scripts/dispo-deal-enricher.js — enriches dispo deal from associated contacts
  • workspace/scripts/lib/gmail-label-matcher.js — auto-creates Gmail labels for new deals

How it’s used

  • Trigger: Inbound webhook from HubSpot (deal.propertyChange, deal.creation, contact.creation) → Express handler on :18790 → HMAC verify → route to action handler
  • Outbound write: Agent dispatches (Aurora, Acq, Atlas) → createDealFromParsed() in hubspot-deal-creator.js → dual-pipeline write (acq 877963314 + dispo 816046) + contact find-or-create + deal-to-deal association
  • Agents involved: _summary (ingest + stage), _summary (outreach dispatch), Atlas (dispo), _summary (TC email)
  • Failure mode: Webhook HMAC mismatch → 401 discard; Stage sync failure → Supabase fallback write + Discord ops alert; Rate-limit 429 → 3-retry exp backoff
  • Success criteria: Deal visible in both pipelines with correct stage, contact linked, deal-to-deal association present, infra_config_changes row written for any config mutation

HubSpot KB — 13 files (largest KB in fleet)

FilePurpose
APICore CRM objects, auth, rate limits, common operations
WEBHOOKSSubscription types, HMAC-SHA256 sig, batch limits
ASSOCIATIONS-APIv4 associations, typeIds, deal↔contact↔deal links
CALLS-APICall logging, recordings, transcripts
CALLING-SDKEmbed calling app in HubSpot UI, inbound caller ID
COMMUNICATIONS-APILog SMS/WhatsApp/LinkedIn as CRM timeline activities
CONVERSATIONS-APIThreads, messages, live chat, inbox webhooks
ENGAGEMENTS-APIAll engagement types: calls, emails, notes, tasks, meetings
TIMELINE-EVENTS-APICustom app activities on timeline (app 33237015)
APPS-REGISTRYPortal 6193101 app inventory (5 apps); OpenClaw Main PAT ID 30738541
DEVELOPER-PLATFORM-20262026.03 platform migration, CLI commands, app-hsmeta.json
COMMISSION-FIELDSDeal commission field schema
ENGAGEMENTS-APIFull engagement schema reference

Agents that touch this

  • _summary — deal ingestion, stage management, outreach dispatch
  • _summary — inbound SMS routing, deal routing decisions
  • _summary — TC email automation on dispo deals
  • _summary — dispo blast coordination, buyer management

Skills that invoke this

  • hubspot-deal-ingest — universal source-agnostic entry point; calls createDealFromParsed(); handles dedup, contact find-or-create, dual-pipeline writes (877963314 + 816046). ALWAYS use this — never reimplement.
  • acquisitions-outreach — Stage 1 SMS via OpenPhone/SalesMsg after deal created in acq pipeline
  • acquisitions-followup — Stages 2-4 cadence triggered by acq deal stage changes
  • dispo-blast — 4-channel buyer blast triggered by dispo deal stage
  • betterfiles-dispo-emails — TC email on dispo deal close

Plans that govern this

Feedback rules

KB / source docs

  • API — core auth + CRM object reference
  • WEBHOOKS — webhook subscription types + sig verification
  • ASSOCIATIONS-API — v4 association schema + typeIds

System maps

Peer hubs in the deal-source CRM cluster:

HubSpot is a primary webhook producer. See co-members:

  • cloudflare — Tunnel + WAF; FUNNEL-REGISTRY.md governance; DocuSign IP allowlist 90-day rotation
  • openphone-quo — SMS inbound from contact holders flows through Quo handler (:18792) then into HubSpot deal context
  • salesmsg — SalesMsg SMS inbound (:18793) cross-references HubSpot deal for reply routing
  • twilio — voice calls logged back to HubSpot as call engagements

Open issues / TODOs

  • PF-C deferred split: If this hub exceeds 400 lines in Wave 2, split to hubspot-acq.md + hubspot-dispo.md with this file becoming a redirect stub
  • OpenClaw BetterFiles OAuth redirect still on Tailscale — cutover to webhook.reri.co deferred; see APPS-REGISTRY
  • Timeline Events API: app 33237015 has timeline scope but Marketplace Tech Partner gating verification pending Phase 1 re-research
  • Granular Permission Migration: review at https://app.hubspot.com/developer-apps/33237015/auth

Recent activity

  • 2026-05-03: hub created (Wave 1 W1-S3)