Skip to main content

Why connect HubSpot?

  • Import your existing contacts into Audience
  • Keep Audience up‑to‑date as contacts change in HubSpot (via webhooks)
  • Optionally map HubSpot properties to Audience Categories for precise targeting

Prerequisites

  • A HubSpot Developer Account with a Public App
  • Your Fluxomail workspace URL (https://app.fluxomail.com) is live
  • In Fluxomail (admin only): HubSpot client ID/secret configured in the environment

1) Create a HubSpot Public App

  1. In HubSpot Developer Account → Apps → Create App
  2. In Auth settings:
    • Redirect URL: https://app.fluxomail.com/api/integrations/hubspot/callback
    • Scopes (required): oauth, crm.objects.contacts.read
    • Optional scope: offline (refresh tokens). If your app can’t enable it, Fluxomail will connect without it; you may need to reconnect periodically.
  3. Save
Further reading: In the same app → Webhooks:
  • Target URL: https://app.fluxomail.com/api/integrations/hubspot/webhook
  • Subscriptions:
    • contact.creation
    • contact.propertyChange for email, firstname, lastname
    • Optional: contact.deletion
Fluxomail verifies HubSpot’s v2 signatures when your app secret is set.

3) Set environment in Fluxomail

  • HUBSPOT_CLIENT_ID=...
  • HUBSPOT_CLIENT_SECRET=...
  • NEXT_PUBLIC_APP_URL=https://app.fluxomail.com
  • Optional: HUBSPOT_OFFLINE_SCOPE=false (omit the offline scope if not available)
Redeploy your app after changing env.

4) Connect from Fluxomail

Go to Settings → Audience Import → HubSpot → Connect HubSpot. You’ll see an OAuth consent page, then be redirected back. Tokens and the hubId are stored securely. You can now click “Run Backfill” to import existing contacts. Backfill is idempotent and safe to re‑run.

5) Keep data fresh

  • Webhooks keep Audience in sync on contact creation/updates
  • If you didn’t enable offline scope, tokens expire after hours; reconnect HubSpot or re‑run backfill to reconcile

Troubleshooting

  • “Redirect URL invalid” → Ensure the app has the exact callback URL above
  • “Invalid scope [offline]” → Remove offline from the app’s scopes or set HUBSPOT_OFFLINE_SCOPE=false in Fluxomail
  • Not seeing updates → Verify webhooks are active and pointing to the Fluxomail webhook URL