Integrating your application with HubSpot brings CRM data into your Aha! Builder application. With this integration in place, you can pull contact, deal, and company records from HubSpot and combine them with the rest of your application's data — and create or update HubSpot records directly from your application.
Click any of the following links to skip ahead:
Prerequisites
Action |
Requirement |
|---|---|
Integration direction |
Read and write |
Credential type |
Private app access token |
Aha! Builder plans |
All Aha! Builder plans |
Required Aha! Builder permissions |
Application owner |
HubSpot plans |
All HubSpot plans, including the Free tier |
HubSpot permissions |
Super Admin permissions to create private apps |
HubSpot enforces access control at the scope level. Select only the scopes your application needs. If you do not add a write scope for an object type, the integration cannot create or update records of that type.
Create a HubSpot private app and get your access token
You will need a private app access token from HubSpot to connect it to your Aha! Builder application.
Log in to HubSpot with a Super Admin account.
Click the Settings gear icon in the top navigation bar.
In the left sidebar, navigate to Integrations -> Legacy Apps.
Click Create a legacy app.
On the Basic Info tab, enter a Name, such as "Aha! Builder."
Click the Scopes tab.
-
Search for and select the scopes for each object type your application needs to access:
crm.objects.contacts.read: Read contacts.
crm.objects.companies.read: Read companies.
crm.objects.deals.read: Read deals.
crm.objects.contacts.write: Create or update contacts.
crm.objects.companies.write: Create or update companies.
crm.objects.deals.write: Create or update deals.
Select only the Read checkbox for object types your application should not modify.
Click Create app in the upper-right corner.
In the confirmation dialog, click Continue creating.
Click the Auth tab. Then click Show token and click Copy.
Copy your access token now and store it somewhere safe. You can re-display it from the private app's page in HubSpot settings if needed.
Scopes are per-object. If your application needs data from an object type that was not scoped during setup — such as tickets or custom objects — edit your private app in HubSpot and add the matching scopes.
HubSpot support resources |
|---|
Add your secret in Aha! Builder
Once you have your access token, add it to your application in Aha! Builder:
Navigate to your application in Aha! Builder.
Click Configuration in the top navigation bar.
Click the Integrations tab.
Click Add a new secret.
In the Secret name field, enter a descriptive name, such as
HUBSPOT\_ACCESS\_TOKEN.In the Secret value field, paste your access token.
Click Ask Elle to integrate.
Your access token is now available to your application code. Secrets are encrypted and stored securely — they are never exposed in your application's frontend code.
Secrets are environment-specific. If you have both a Preview and a Production environment, you will need to add the secret to each one separately.
Use the integration
With your secret saved, you can ask Elle to build features that read from or write to HubSpot. Elle generates the code to connect to the HubSpot API using your secret.
Read data from HubSpot:
"Add a dashboard that shows my HubSpot deals with their stage, amount, and close date."
"Create a contact lookup page that searches HubSpot contacts by company name."
"Show a list of HubSpot companies with their industry and number of associated deals."
Write data to HubSpot:
"Create a new HubSpot contact when someone completes the onboarding form in this application."
"Update the deal stage in HubSpot when a milestone is reached in this application."
"Log a new company in HubSpot when a partner record is created here."
Write operations require the corresponding write scope in your HubSpot private app. If you only added read scopes during setup, edit your private app in HubSpot to add the write scopes for the object types your application needs to update.
Update a secret
You can update a secret's value at any time. For example, update it when you rotate your API token:
Navigate to your application in Aha! Builder.
Click Configuration in the top navigation bar.
Click the Integrations tab.
Click Edit next to the secret you want to update.
Enter the new value and click Save.
Remove a secret
To remove an integration secret from your application:
Navigate to your application in Aha! Builder.
Click Configuration in the top navigation bar.
Click the Integrations tab.
Click the More options button (...) next to the secret you want to remove.
Click Delete.
Click OK to confirm.
Removing a secret breaks any features in your application that depend on it. Review your application after removing a secret to confirm it still functions correctly.