Skip to content

HubSpot Setup

Create a HubSpot app for CRM, marketing, and sales automation.

  1. Create HubSpot Developer Account

    Sign up at HubSpot Developers.

  2. Create an App

    In your developer account, go to “Apps” and create a new app.

  3. Configure OAuth Settings

    In the Auth tab, add the redirect URL:

    https://api.switchboard.fpdigital.ai/oauth/hubspot/callback
  4. Select Scopes

    Add the required scopes for CRM and marketing access:

    crm.objects.contacts.read
    crm.objects.contacts.write
    crm.objects.companies.read
    crm.objects.companies.write
    crm.objects.deals.read
    crm.objects.deals.write
  5. Get Client Credentials

    Copy the Client ID and Client Secret from the Auth tab.

  6. Create Test Portal (Optional)

    Create a test portal for development and testing before connecting production accounts.

Terminal window
npx wrangler secret put HUBSPOT_CLIENT_ID
npx wrangler secret put HUBSPOT_CLIENT_SECRET
VariableDescription
HUBSPOT_CLIENT_IDOAuth Client ID from HubSpot App settings
HUBSPOT_CLIENT_SECRETOAuth Client Secret from HubSpot App settings
https://api.switchboard.fpdigital.ai/oauth/hubspot/callback
  • Test with a sandbox portal before connecting production data
  • API rate limits vary by subscription tier
  • Contact, Company, and Deal objects are available on all plans
  • Rate limits: HubSpot rate limits vary by tier (100 calls/10s for free, 150 for Starter, 200 for Pro/Enterprise). Switchboard handles retry automatically.
  • Record IDs: HubSpot uses numeric string IDs (e.g., “12345”), not integers. Always pass IDs as strings.
  • Association types: Linking contacts to companies/deals requires association type IDs. Common types: contact_to_company (1), contact_to_deal (3).
  • Custom properties: Custom properties must be created in HubSpot before they can be set via the API.
  1. Create a test portal at HubSpot Developer Sandbox
  2. Connect using test portal credentials
  3. Click Test Connection to verify
  4. Try: “List my HubSpot contacts” or “Create a new contact”