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

  1. Log in to your HubSpot account
  2. Navigate to Settings → Integrations → Private Apps
  3. Click Create a private app
  4. Under Scopes, grant at least:
    • crm.objects.companies.read
    • crm.objects.owners.read
  5. Copy the generated Access token — this is your HUBSPOT_API_KEY

Environment Variables

Add this to your .env file:

.env env
# 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 FieldOutpost FieldNotes
Company namenameFalls back to "HubSpot Company {id}" if blank
DomaindomainUsed as the match key; companies without a domain are skipped
Amount (deal)acvParsed as float for annual contract value
Close datecloseDateISO date parsed to Date object
Owner IDownerResolved 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:

How It Works

Under the hood, the integration follows this flow:

  1. The HubSpotClient authenticates with the HUBSPOT_API_KEY access token
  2. It fetches companies from the HubSpot CRM API, requesting name, domain, amount, closedate, and hubspot_owner_id properties
  3. For each company, syncCompanyToAccount() maps HubSpot fields to the Outpost Account data model
  4. Owner IDs are resolved to display names via the HubSpot Owners API (with an in-memory cache)
  5. The HubSpotSyncService upserts each mapped account — matching by domain, creating or updating as needed
  6. A SyncReport is 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.