Skip to main content

Hubspot

This connector captures data from a Hubspot account.

Estuary offers a in-house real time version of this connector. For more information take a look at our HubSpot Real-Time docs.

It is available for use in the Flow web application. For local development or open-source workflows, ghcr.io/estuary/source-hubspot:dev provides the latest version of the connector as a Docker image. You can also follow the link in your browser to see past image versions.

This connector is based on an open-source connector from a third party, with modifications for performance in the Flow system. You can find their documentation here, but keep in mind that the two versions may be significantly different.

Supported data resources

By default, each resource associated with your Hubspot account is mapped to a Flow collection through a separate binding.

The following data resources are supported for all subscription levels:

The following data resources are supported for pro accounts (set Subscription type to pro in the configuration):

Prerequisites

There are two ways to authenticate with Hubspot when capturing data: using OAuth2 or with a private app access token. Their prerequisites differ.

OAuth is recommended for simplicity in the Flow web app; the access token method is the only supported method using the command line.

Using OAuth2 to authenticate with Hubspot in the Flow web app

  • A Hubspot account

Configuring the connector specification manually

  • A Hubspot account

  • The access token for an appropriately configured private app on the Hubspot account.

Setup

To create a private app in Hubspot and generate its access token, do the following.

  1. Ensure that your Hubspot user account has super admin privileges.

  2. In Hubspot, create a new private app.

    1. Name the app "Estuary Flow," or choose another name that is memorable to you.

    2. Grant the new app Read access for all available scopes.

    3. Copy the access token for use in the connector configuration.

Configuration

You configure connectors either in the Flow web app, or by directly editing the catalog specification file. See connectors to learn more about using connectors. The values and specification sample below provide configuration details specific to the Hubspot source connector.

Properties

Endpoint

The following properties reflect the access token authentication method.

PropertyTitleDescriptionTypeRequired/Default
/credentialsPrivate ApplicationAuthenticate with a private app access tokenobjectRequired
/credentials/access_tokenAccess TokenHubSpot Access token.stringRequired
/credentials/credentials_titleCredentialsName of the credentials setstringRequired, "Private App Credentials"
/start_dateStart DateUTC date and time in the format 2017-01-25T00:00:00Z. Any data before this date will not be replicated.stringRequired
/subscription_typeYour HubSpot account subscription typeSome streams are only available to certain subscription packages, we use this information to select which streams to pull data from.string"starter"

Bindings

PropertyTitleDescriptionTypeRequired/Default
/streamData resourceName of the data resource.stringRequired
/syncModeSync ModeConnection methodstringRequired

Sample

captures:
${PREFIX}/${CAPTURE_NAME}:
endpoint:
connector:
image: ghcr.io/estuary/source-hubspot:dev
config:
credentials:
credentials_title: Private App Credentials
access_token: <secret>
bindings:
- resource:
stream: companies
syncMode: incremental
target: ${PREFIX}/${COLLECTION_NAME}

Your configuration will have many more bindings representing all supported resources in your Hubspot account.

Learn more about capture definitions.