HubSpot CRM Integration
The HubSpot integration syncs account data — company name, domain, ACV, close dates, and deal owner — from HubSpot CRM into the Outpost Account model. This keeps your support dashboard enriched with up-to-date CRM context without manual data entry.
Overview
Outpost pulls company records from HubSpot and maps them to Outpost accounts. Each sync matches companies by domain, creating new accounts for first-seen domains and updating ACV, close date, and owner for existing ones. Companies without a domain are skipped.
Setup
- Log in to your HubSpot account
- Navigate to Settings → Integrations → Private Apps
- Click Create a private app
- Under Scopes, grant at least:
crm.objects.companies.readcrm.objects.owners.read
- Copy the generated Access token — this is your
HUBSPOT_API_KEY
Environment Variables
Add this to your .env file:
# HubSpot CRM
HUBSPOT_API_KEY=your-hubspot-private-app-access-token
Security note: Use a HubSpot private app access token, not a legacy API key. Private apps support granular scoping so you only grant the read permissions Outpost actually needs.
What Syncs
The integration maps HubSpot Company fields to the Outpost Account model:
| HubSpot Field | Outpost Field | Notes |
|---|---|---|
| Company name | name | Falls back to "HubSpot Company {id}" if blank |
| Domain | domain | Used as the match key; companies without a domain are skipped |
| Amount (deal) | acv | Parsed as float for annual contract value |
| Close date | closeDate | ISO date parsed to Date object |
| Owner ID | owner | Resolved to owner display name (first + last name, or email) |
Sync Modes
Outpost supports three ways to trigger a HubSpot sync:
Full Sync (Daily Scheduled)
A full sync fetches every company from HubSpot (paginating through the full list) and upserts them all into Outpost. This runs daily via the job queue and handles creates, updates, and skips. A sync report is generated with counts of each.
Single Account Sync
Searches HubSpot for a single company by domain and syncs just that record. Useful when a new account comes in and you want immediate CRM enrichment without waiting for the next full sync.
Manual Trigger
From the Settings page in the Outpost dashboard, the HubSpot card shows connection status and the last sync timestamp. Click "Sync Now" to trigger an immediate full sync on demand.
Settings Page
In the Outpost dashboard under Settings → Integrations, the HubSpot card displays:
- Connection status — whether the API key is configured and valid
- Last sync — timestamp and results (created/updated/skipped/errors) of the most recent sync
- "Sync Now" button — triggers an immediate full sync
How It Works
Under the hood, the integration follows this flow:
- The
HubSpotClientauthenticates with theHUBSPOT_API_KEYaccess token - It fetches companies from the HubSpot CRM API, requesting
name,domain,amount,closedate, andhubspot_owner_idproperties - For each company,
syncCompanyToAccount()maps HubSpot fields to the Outpost Account data model - Owner IDs are resolved to display names via the HubSpot Owners API (with an in-memory cache)
- The
HubSpotSyncServiceupserts each mapped account — matching by domain, creating or updating as needed - A
SyncReportis returned with counts of created, updated, skipped, and errored records
Note: Companies without a domain property are skipped
during sync because Outpost uses domain as the matching key between HubSpot companies
and Outpost accounts.