Skip to content

Install HubSpot integration

The HubSpot integration can be found here. Please install it in your environments before proceeding with the steps below.

Use your own HubSpot OAuth app

Truto connects HubSpot accounts through its own OAuth app, so this step is optional. To show your own app on the consent screen instead:

  1. Create an OAuth app in HubSpot and add https://api.truto.one/connect/hubspot/callback as its redirect URL. If you use a redirect URL on your own domain, add that URL instead.
  2. Enter the app's Client ID and Client Secret on the installed HubSpot integration. See Overriding OAuth credentials.

Connecting a HubSpot account

Warning
  • Administrator role is required to use this API
  • Role information is only available in Enterprise plan
  1. Click on Connect Account Click connect account

  2. Type in a value for the Tenant ID. This can be any ID of your choosing. And then click on Get connection link Get connection link

  3. A new link will be generated. Clicking on the link will open a new tab with the list of integrations. You can share this link with your customers too, and they will be able to connect their HubSpot account. Share connection link

  4. Select HubSpot Select HubSpot

  5. You'll now be asked to log in to your HubSpot account and allow access to Truto. Go through the steps.

  6. You should now see a connection successful message. You can now close this tab.

  7. Go to your Truto account, and you should see the new HubSpot integration under Integrated Accounts. Click on the Account ID to view the details and initiate API calls.

Setting up Unified Webhooks for HubSpot

Info

Needs to be done only once per environment

Setting up Webhooks in Truto

  1. Login to https://app.truto.one/ and navigate to Webhooks tab
  2. Click on the Create Webhook button and modal shows up.
  3. Enter your endpoint URL in the Endpoint input to which you would like to get the webhook events posted.
  4. Set the webhook to Active to start listening to the events.
  5. Choose record:created, record:updated, record:deleted to only get the events related to the Unified Webhooks or select “all” to receive all the events.
  6. Click on Create Webhook to save the webhook. Truto Webhooks Modal

Connecting Webhooks from HubSpot to Truto

Warning

HubSpot webhooks only work with your own HubSpot app. Set its Client ID and Client Secret on the installed HubSpot integration first — see Overriding OAuth credentials — and have your customers connect through it.

HubSpot signs each webhook with the Client Secret of the app that sends it, and Truto checks that signature against the Client Secret your environment uses for HubSpot. HubSpot also sends events only for accounts that installed the app the subscription lives in. If your environment uses Truto's default HubSpot app, the secrets don't match and the events are rejected.

  1. Go to your HubSpot Developer account and navigate to the OAuth app for which you would like to setup Unified Webhooks.
  2. Click on the Webhooks tab under the Features section.
  3. Enter the target URL in exactly this format, including https:// — the signature covers the full URL - https://api.truto.one/environment-integration-webhook/<your_environment_integration_id>
    1. You can find the environment_integration_id from the Truto UI by navigating to the following URL and select the environment for which you are setting up webhooks - https://app.truto.one/integrations/installed?search=hubspot
    2. You can also refer to the following GIF to find the environment_integration_id - Find environment_integration_id
  4. Once the Target URL is added, Click on Create Subscription
  5. Select the object types for which you would like to receive webhooks. Currently, Contact, Company, Deal are supported.
  6. Select the events for which you would like to receive webhooks.
  7. If you see below shown warning, click on Add these required scopes and select the scopes and Click on Update. Add required scopes
  8. Once the required scopes are added, come back to Webhook section and select object types and events again and click on Subscribe.
  9. You should now see the webhook subscription created successfully.
  10. Select all the Event subscriptions and Click on Activate Activate HubSpot Event Subscriptions

! You should now start receiving the Unified Webhook events to your endpoint URL .