HubSpot

Configuring HubSpot with Polytomic On Premises

Polytomic connects to HubSpot with OAuth, so you must create a HubSpot app that uses OAuth.

ℹ️

Existing HubSpot apps

HubSpot stopped allowing new legacy public apps on June 23, 2026. A legacy public app you already use keeps working. Make sure it has the scopes listed below.

Create the app

HubSpot creates these apps with its command-line tool. See HubSpot's app creation guide for details.

  1. Install the HubSpot CLI and sign in with hs account auth.

  2. Run hs project create. Select App as the base contents, choose the distribution that limits installation to specific accounts, and choose OAuth as the authentication method.

  3. Edit auth in the project's app-hsmeta.json:

    "auth": {
      "type": "oauth",
      "redirectUrls": ["https://polytomic.mycompany.com/connect/hubspot"],
      "requiredScopes": ["..."],
      "optionalScopes": ["..."],
      "conditionallyRequiredScopes": []
    }
  4. Add the scopes below to requiredScopes and optionalScopes.

  5. Run hs project upload.

  6. Run hs project open, click your app under Project Components, and open the Auth tab. Copy the Client ID and Client secret.

  7. On the Distribution tab, install the app in the HubSpot accounts you want to connect.

Scopes

Polytomic requests all of these scopes when you connect HubSpot.

Required scopes

  • oauth
  • crm.import
  • crm.lists.read
  • crm.lists.write
  • crm.objects.companies.read
  • crm.objects.companies.write
  • crm.objects.contacts.read
  • crm.objects.contacts.write
  • crm.objects.custom.read
  • crm.objects.custom.write
  • crm.objects.deals.read
  • crm.objects.deals.write
  • crm.objects.line_items.read
  • crm.objects.line_items.write
  • crm.objects.owners.read
  • crm.schemas.companies.read
  • crm.schemas.contacts.read
  • crm.schemas.custom.read
  • crm.schemas.deals.read
  • crm.schemas.line_items.read

Optional scopes

These scopes turn on additional objects. HubSpot drops any scope that the account can't grant.

  • analytics.behavioral_events.send
  • automation
  • behavioral_events.event_definitions.read_write
  • business-intelligence
  • content
  • crm.objects.invoices.read
  • crm.objects.leads.read
  • crm.objects.marketing_events.read
  • crm.objects.services.read
  • crm.objects.services.write
  • crm.schemas.services.read
  • crm.schemas.services.write
  • e-commerce
  • forms
  • marketing.campaigns.read
  • sales-email-read
  • tickets

Set the credentials in Polytomic

Set these credentials in your Polytomic deployment:

  • HUBSPOT_CLIENT_ID
  • HUBSPOT_CLIENT_SECRET