Connect a HubSpot resource
Learn how to connect HubSpot to Retool.
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.
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.
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.
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.
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.
|Scopes||The HubSpot scopes.|
|Client ID||The OAuth client ID.|
|Client secret||The 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.
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.
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.
Updated 5 days ago