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
- In HubSpot Developer Account → Apps → Create App
- 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.
- Redirect URL:
- Save
- Fluxomail categories mapping: https://docs.fluxomail.com/guides/audience-categories-from-hubspot
2) Configure Webhooks (recommended)
In the same app → Webhooks:- Target URL:
https://app.fluxomail.com/api/integrations/hubspot/webhook - Subscriptions:
contact.creationcontact.propertyChangeforemail,firstname,lastname- Optional:
contact.deletion
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 theofflinescope if not available)
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 thehubId 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
offlinescope, 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
offlinefrom the app’s scopes or setHUBSPOT_OFFLINE_SCOPE=falsein Fluxomail - Not seeing updates → Verify webhooks are active and pointing to the Fluxomail webhook URL
