Skip to content
Last updated

HubSpot Marketing integration

HubSpot Marketing Hub is the marketing automation product within the HubSpot platform — it powers forms, marketing emails, landing pages, marketing events, contact lists, and workflows. Integrating HubSpot Marketing with Frontegg allows your application to read and write Marketing Hub data — including forms, emails, landing pages, marketing events, contact lists, and workflow enrollments — on behalf of your users through OAuth 2.0 authentication.


Prerequisites

  • A HubSpot developer account to create the app — free to sign up at developers.hubspot.com
  • A HubSpot Marketing Hub subscription with access to the features you plan to use (forms, email, landing pages, marketing events, etc.)
  • For campaigns and marketing analytics, a Marketing Hub Professional subscription or higher — the campaign and email-statistics scopes are not granted on the Free tier

Connect HubSpot Marketing

Step 1: Open the developer portal

Go to developers.hubspot.com and sign in with your HubSpot account.

HubSpot developer portal homepage

Step 2: Go to Legacy Apps

Once signed in, you will be in your HubSpot developer account. In the left sidebar, navigate to DevelopmentLegacy Apps. This page lists all existing applications in your account.

Click Create legacy app in the top right corner.

HubSpot Legacy Apps list

Step 3: Choose Public app type

In the Create Legacy App dialog that appears, select Public (for apps that can be installed by any HubSpot account).

HubSpot Create Legacy App dialog

Step 4: Fill in the app name

On the App Info tab, enter a name for your application in the Public app name field (for example, "Frontegg Marketing Integration"). This name appears in HubSpot tools when users install your app.

HubSpot app name form

Step 5: Open auth settings

Click the Auth tab to open the authentication configuration page. The App credentials, Redirect URLs, and Scopes sections all live here.

HubSpot Auth settings tab

Step 6: Add the redirect URL

Scroll down to the Redirect URLs section. Enter your Frontegg redirect URL:

https://YOUR_MCP_GATEWAY_URL/integration-callback

HubSpot redirect URL configuration

Step 7: Open the scope picker

Scroll down to the Scopes section and click Add new scope. The scope picker dialog opens, grouped by category (CRM, CMS, Automation, etc.). Use the search field to find specific scopes quickly.

HubSpot scope picker

Step 8: Select the Marketing scopes

HubSpot Marketing scopes fall into two groups. The core scopes are granted on every Marketing Hub tier, including Free. The Professional+ scopes are tier-gated — HubSpot only grants them on Marketing Hub Professional or higher.

Core scopes (all tiers)

ScopeDescription
formsRead and write HubSpot forms
contentRead and write marketing content — marketing emails and landing pages
crm.lists.readRead contact lists and their members
crm.objects.marketing_events.readRead marketing events (webinars, conferences, etc.) and their participation analytics
crm.objects.marketing_events.writeCreate and update marketing events
automationList and read workflows, and enroll or unenroll contacts in workflows

Marketing Hub Professional+ scopes (optional, tier-gated)

Add these scopes only if you plan to use the Campaigns, email statistics, and campaign analytics (metrics and revenue) tools. HubSpot grants them only on Marketing Hub Professional or higher — on the Free tier, OAuth consent fails with a "lacks access to required scopes" error if any of them are requested.

ScopeDescription
marketing.campaigns.readList and read campaigns, and read campaign metrics
marketing.campaigns.writeCreate campaigns
marketing.campaigns.revenue.readRead campaign revenue
marketing-emailRead marketing email send statistics (list, histogram, and per-email)

Minimum required scopes

For basic Marketing Hub functionality on any tier, the core scopes are enough: forms and content cover forms, emails, and landing pages; add crm.lists.read for contact lists, crm.objects.marketing_events.* for marketing events, and automation for workflow enrollments. The Professional+ scopes are needed only for the Campaigns, email-statistics, and campaign-analytics tools.

For each scope, the picker lets you choose Required, Conditionally required, or Optional — this controls whether HubSpot requests the scope on every install or only when an enabled tool needs it.

Tier-gated scopes must be Conditionally required

Set the four tier-gated scopes — marketing.campaigns.read, marketing.campaigns.write, marketing.campaigns.revenue.read, marketing-email — to Conditionally required, never Required. A Required scope is requested on every install regardless of which tools the customer enabled, so a Required tier-gated scope makes OAuth consent fail for every Free-tier customer — even when the Campaigns and analytics tools are turned off. Conditionally required scopes are only requested when an enabled tool needs them. Only oauth should be Required — HubSpot adds it automatically.

After selecting your scopes, click Update.

HubSpot scopes selected

Tier compatibility

On a Free Marketing Hub account, all core tools work — including the event-participation analytics tools, which run on the core crm.objects.marketing_events.read scope. Only the Campaigns, email statistics, and campaign analytics (metrics and revenue) tools require Marketing Hub Professional or higher. If a customer on the Free tier installs the integration with the Professional+ scopes requested, HubSpot rejects the OAuth consent.

Step 9: Create the app and copy your credentials

Click Create app at the bottom of the page. Once the app is created, the App credentials section at the top of the Auth page displays your credentials:

  • Client ID — Your app's unique identifier used to initiate OAuth.
  • Client secret — Click Show to reveal the secret. Used to exchange authorization codes for access tokens.

Copy both values and store them securely.

Keep your credentials secure

Never share or commit your Client secret to version control.

HubSpot app credentials page

Configure the Frontegg portal

Once you have obtained your Client ID and Client secret from the steps above, enter them in the integration configuration page of the Frontegg portal:

  1. Open the Frontegg portal and navigate to [ENVIRONMENT] → Connectors → HubSpot Marketing.
  2. Enter the Client ID and Client secret in the corresponding fields.
  3. Select the required scopes.
  4. Click Save.

Managing tools by tier

The tier-gated tools — Campaigns (list, get, create), Email Statistics (×3), Campaign Metrics, and Campaign Revenue — should be kept disabled in the connector's tool list for tenants on a Free Marketing Hub. With those tools off, their scopes are excluded from the OAuth consent and the installation completes cleanly. On Marketing Hub Professional or higher, you can enable them.

Additional resources