Skip to content
Last updated

HubSpot Marketing integration

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


Prerequisites

  • A HubSpot account with developer access
  • A HubSpot Marketing Hub subscription with access to the features you plan to use (forms, email, landing pages, social, etc.)

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, Marketing, etc.). Use the search field to find specific scopes quickly.

HubSpot scope picker

Step 8: Select the Marketing scopes

Select the following scopes:

ScopeDescription
formsRead and write HubSpot forms
contentRead and write marketing content — emails, landing pages, and campaigns
socialRead and write social media posts and channels
crm.lists.readRead contact lists
crm.lists.writeCreate and update contact lists
crm.objects.contacts.readRead contact records (used for list members and email recipients)
crm.objects.contacts.writeCreate and update contact records
crm.objects.marketing_events.readRead marketing events (webinars, conferences, etc.) and event participation breakdowns
crm.objects.marketing_events.writeCreate, update, and complete marketing events
marketing-emailRead aggregate marketing-email statistics (sends, opens, clicks, bounces, unsubscribes) and time-bucketed histograms
marketing.campaigns.readRead aggregate campaign performance metrics across associated assets
marketing.campaigns.revenue.readRead campaign revenue attribution data (required alongside marketing.campaigns.read for revenue reports)
automationList and read workflows, and enroll or unenroll contacts in workflows

Minimum required scopes

For basic Marketing Hub functionality, you need at least forms, content, and crm.objects.contacts.read. Add marketing-email and marketing.campaigns.read for reporting and analytics, marketing.campaigns.revenue.read for revenue attribution, and automation for workflow enrollments.

After selecting all required scopes, click Update. The selected scopes appear under Required scopes on the Auth page, alongside the always-required oauth scope.

HubSpot scopes selected

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.

Additional resources