Skip to main content

HubSpot

Extractor

HubSpot is a CRM platform that provides tools for marketing, sales and customer service. This connector syncs your HubSpot CRM records, such as contacts, companies, deals, engagements and support tickets, along with optional custom CRM objects and associations between object types.

At a glance​

PropertyValue
AuthenticationPrivate App access token
Sync typeMixed: some streams incremental, some full table
StreamsFixed list, plus optional custom object and association streams you configure
Custom queriesNot specified in the plugin definition

What you can sync​

This connector brings in your HubSpot CRM records and the definitions around them:

  • Core CRM records: contacts, companies, deals, leads, tickets, quotes, products and line items
  • Engagements: calls, communications, emails, meetings, notes, postal mail and tasks
  • Users, owners and teams
  • Pipelines, property definitions, email subscription types, goals and feedback submissions
  • Custom CRM objects (Enterprise plan) and associations between object types, when configured

Prerequisites​

  • Access Token: a HubSpot Private App access token. Grant the scopes required for the streams you want to sync (see Required scopes).
    • How to get it:
      1. In your HubSpot account, go to Settings → Integrations → Private Apps.
      2. Create a new private app and grant the scopes required for the streams you want to sync.
      3. Copy the generated access token.
  • A HubSpot Enterprise plan, only if you want to sync custom CRM objects.

Setup​

In HubSpot​

  1. Go to Settings → Integrations → Private Apps and create a new private app.
  2. Grant the scopes for the streams you want to sync (see Required scopes).
  3. Copy the generated access token.

In Meltano​

  1. Enter your HubSpot Access Token.
  2. Set a Start Date for the initial extraction.
  3. Optionally set Custom Object Types to sync HubSpot custom CRM objects (Enterprise plan required).
  4. Optionally set Associations to sync associations between CRM object types.

Available streams​

StreamReplicationDescription
contactsIncrementalPeople in your HubSpot CRM
companiesIncrementalCompany records in your CRM
dealsIncrementalSales opportunities and pipeline deals
leadsIncrementalIndividual sales leads (objectTypeId: 0-136)
line_itemsIncrementalProducts attached to deals
goal_targetsIncrementalSales and activity goal records
callsIncrementalCall engagement records
communicationsIncrementalCommunication engagement records
emailsIncrementalEmail engagement records
meetingsIncrementalMeeting engagement records
notesIncrementalNote engagement records
postal_mailIncrementalPostal mail engagement records
tasksIncrementalTask engagement records
ownersFull TableHubSpot users who own CRM records
usersFull TableUsers in your HubSpot account
teamsFull TableHubSpot Teams and their member user IDs
productsFull TableProduct library items
ticketsFull TableCustomer support tickets
quotesFull TableSales quotes
feedback_submissionsFull TableCustomer feedback survey responses
ticket_pipelinesFull TableTicket pipeline and stage definitions
deal_pipelinesFull TableDeal pipeline and stage definitions
email_subscriptionsFull TableEmail subscription type definitions
propertiesFull TableProperty definitions for all CRM object types

Custom CRM object streams and association streams are only created when configured (see Advanced configuration).

teams fields​

FieldDescription
idUnique HubSpot ID for the team
nameDisplay name of the team
userIdsArray of HubSpot user IDs who are primary members of the team
secondaryUserIdsArray of HubSpot user IDs who are secondary members of the team

Required scopes​

StreamRequired scope
contactscrm.objects.contacts.read
companiescrm.objects.companies.read
dealscrm.objects.deals.read
leadscrm.objects.leads.read
ownerscrm.objects.owners.read
userssettings.users.read
teamssettings.users.teams.read
feedback_submissionscrm.objects.feedback_submissions.read
callscrm.objects.calls.read
communicationscrm.objects.communications.read
emailssales-email-read
meetingscrm.objects.meetings.read
notescrm.objects.notes.read
postal_mailcrm.objects.postal_mail.read
taskscrm.objects.tasks.read
line_itemse-commerce
productse-commerce
ticketstickets
ticket_pipelinestickets
deal_pipelinescrm.objects.deals.read
quotescrm.objects.quotes.read
goal_targetscrm.objects.goals.read
email_subscriptionscontent
propertiesSame scopes as the corresponding object type
Custom objectscrm.objects.custom.read and crm.schemas.custom.read (Enterprise only)
AssociationsThe read scope of both object types in each configured pair

Settings​

SettingTypeRequired / DefaultDescription
access_token— (sensitive)requiredHubSpot Private App access token
start_datedaterequiredEarliest record date to sync
end_datedateoptionalLatest record date to sync
custom_object_typesarrayoptionalList of HubSpot custom CRM object type names to sync (e.g. ['p12345_patches']). Use the fullyQualifiedName from HubSpot Settings → Objects → Custom objects. Requires a HubSpot Enterprise plan and the crm.objects.custom.read and crm.schemas.custom.read scopes
associationsobjectoptionalMapping of a HubSpot object type to the object types to sync associations with (e.g. {"contact": ["company", "deal"]}). No association streams are created unless this is set
flattening_enabledbooleanoptionalWhether to flatten the response data
flattening_max_depthintegeroptionalThe maximum depth to flatten the response data

Advanced configuration​

  • Custom CRM objects. Each object type listed in Custom Object Types becomes its own stream, named after the object's fullyQualifiedName (e.g. p12345_patches). Schemas are discovered automatically at sync time. Incremental replication uses hs_lastmodifieddate, falling back to a full-table refresh if the property is absent.
  • Associations. Association streams are opt-in: none exist until you set Associations. The value maps a HubSpot object type to the object types you want its associations with, for example {"contact": ["company", "deal"]}.
    • Each from/to pair creates one full-table stream named <from_object_type>_<to_object_type>_associations (e.g. contact_company_associations).
    • Records come from the CRM v4 associations batch/read endpoint and contain from_id, to_id, association_type_id, association_type_category and association_type_label.
    • HubSpot doesn't update hs_lastmodifieddate when an association changes, so these streams always do a full resync.
    • Use HubSpot object type names, not the stream names above: contact, company, deal, lead, line_item, product, ticket, quote, call, communication, email, meeting, note, postal_mail, task, feedback_submission, goal. Any other standard or custom object type name is also valid, including a custom object's fullyQualifiedName.
  • Flattening. Flattening Enabled controls whether the response data is flattened, and Flattening Max Depth sets the maximum depth to flatten it to.

Need help?​

If a stream or field you need isn't listed here or the connector doesn't work as expected, file it through the usual Meltano support channel.