Skip to main content

Connect to HubSpot

note

The HubSpot integration is in beta. Navigate to your organization's Beta settings to enable.

You can connect to HubSpot and make it available as a resource in Retool. Once complete, your users can write queries that interact with HubSpot data.

Requirements

All users for Retool organizations on Free or Team plans have global Edit permissions and can add, edit, and remove resources. If your organization manages user permissions for resources, you must be a member of a group with Edit all permissions.

To create a HubSpot resource, you need:

  • A HubSpot app that is configured with OAuth authentication, or a HubSpot private app.
  • The client ID and secret for your HubSpot app, if using OAuth on self-hosted Retool.
  • Super admin privileges to access private apps, if using private apps.

1. Create a new resource

Sign in to your Retool organization and navigate to the Resources tab. Click Create new, then select Resource.

Create a new resource

2. Select the resource type

Retool can connect to almost any API or database, and has built-in integrations for popular data sources. Select the HubSpot resource type.

Select the resource type

3. Configure the resource

Specify a name and location for the HubSpot resource. Retool displays the resource name and type in query editors to help users identify them. Next, configure the required settings.

OAuth on Retool Cloud

On Retool Cloud, configure OAuth by selecting OAuth as the authentication method and click the Connect with OAuth button. This begins HubSpot's authorization flow.

Configure the HubSpot resource on Cloud

OAuth on self-hosted Retool

When you self-host Retool, you need to create your own application on HubSpot. After registering, you can find your client ID and client secret on your HubSpot app settings page.

On the resource settings page, select OAuth as the authentication method and provide the required OAuth client information. Configure the following settings for the resource.

SettingDescription
ScopesThe HubSpot scopes.
Client IDThe OAuth client ID.
Client secretThe OAuth client secret.

By default, Retool requests a limited set of common OAuth scopes when you connect your workspace. These scopes determine the operations you can perform. If you update the Scopes field in your resource settings, you have to reconnect with OAuth for the changes to take effect.

You must also configure your app with an OAuth callback URL. Copy the OAuth callback URL on the Resource settings page and add it as a redirect URL in HubSpot in your app's authentication settings.

Configure the HubSpot resource on self-hosted

Share credentials between users

For resources using OAuth 2.0 authentication scheme, Retool provides the option to share credentials between users or to require each user to authenticate using their own credentials. The HubSpot resource defaults to sharing credentials between users. If you would like each app user to log in with their own account, uncheck Share HubSpot credentials between users in the Advanced section.

To learn more about how OAuth 2.0 credentials work in Retool, refer to our API Authentication docs.

Private app token

If you use HubSpot private apps, select Private app token and enter your token to authenticate with Retool.

4. Save the resource

Click Create resource to complete the setup. You can then click either Create app to immediately start building a Retool app or Back to resources to return to the list of resources.

Save the resource

Wrap up

Your HubSpot resource is now ready to use. To interact with HubSpot data, select the resource in the query editor. You can specify the API endpoint to use when writing a query.