Skip to main content

HubSpot

HubSpot is a cloud-based CRM designed to help align sales and marketing teams, promote sales, increase ROI, and improve your inbound marketing strategy to produce more qualified leads. In simple words, it's a software platform created to assist your business with marketing and sales.

info

To integrate HubSpot with Appsmith, you should understand the basics of connecting to datasource on Appsmith.

Appsmith provides an easy way to integrate with HubSpot, and enables you to perform different operations using a custom UI built with minimal configurations.

Create HubSpot Datasource

To add a HubSpot API, navigate to Explorer >> Click on the + icon (next to Datasources) >> Select HubSpot under APIs.

Create HubSpot Datasource

Connection Settings

Configure the HubSpot API as illustrated below:

Authentication Type

Appsmith allows you to select from the available authentication types to integrate with an HubSpot database:

Bearer Token

Bearer Tokens are the predominant access token used with OAuth 2.0. You can authenticate to the API by providing your access token in the HTTP authorization bearer token header.

Let's see how you can fetch your Bearer Token:

Fetching Access Token
  • Open HubSpot.
  • You can create a new account or select an existing one.
  • Click on the settings icon on top-right corner, and select integrations.
  • Create a private app (or open an existing one).
  • Navigate to Scopes.
  • Allow necessary permissions for CMS, CRM, and Settings.
  • Navigate to the auth page of your app settings.
  • Here you'll be able to find the app's client ID and access token.

Access token looks something like this:

pat-na1-217ee**-****-****-****-***

Create Queries

You can add queries to the newly created HubSpot datasource in one of the below ways:

Datasource Page

You can add queries to HubSpot datasource by selecting the New API + button available on the datasource page.

Query/JS page

By navigating to Explorer >> Click plus sign (+) next to Queries/JS >> Select the HubSpot datasource.

Query

You can create queries to fetch, update and delete data from a datasource using the Appsmith query editor. HubSpot integration supports the following query methods:

Query NameDescription
HubDB - Get Published TablesFetches all the published table from the database.
HubDB - Create TableCreates a new table in the HubDB database.
HubDB - Get Details of a Published TableRetrieve details of an existing table.
HubDB - Archive TableArchive or delete an existing table.
HubDB - Update Existing TableUpdate a few fields in a table.
HubDB - Clone TableClone an existing HubDB table.
HubDB - Export Published Version TableExport table data.
HubDB - Unpublish TableUnpublish table or unpublish multiple pages
HubDB - Get Table RowsGet the rows for a specific HubDB table.
HubDB - Add New Table RowAdd a new row to a HubDB table.
HubDB - Get Table RowGet the rows for a specific HubDB table.
HubDB - Update Existing RowUpdate a specific row in a HubDB table.
HubDB - Replace Existing RowReplace a specific row in a HubDB table.
HubDB - Permanently Delete RowDelete a specific row in a HubDB table.
HubDB - Clone RowDuplicate/clone a specific row.
HubDB - Get Set RowsGet set of rows from the table.
HubDB - Permanently Delete RowsDelete a set of rows from a HubDB table.
Domains - Get Current DomainsReturns all existing domains that have been created.
Domains - Get Single DomainReturns a single domain with the id specified.
URL Redirects - Get Current RedirectsReturns all existing URL redirects.
URL Redirects - Create RedirectCreates and configures a new URL redirect.
URL Redirects - Get Details RedirectReturns the details for a single existing URL redirect by ID.
URL Redirects - Update RedirectUpdates the settings for an existing URL redirect.
URL Redirects - Delete RedirectDelete one existing redirect.
CRM - List ObjectsFetches all the object from the database.
CRM - Create ObjectCreates a new object in the database.
CRM - Read ObjectRetrieve a particular object.
CRM - Update ObjectUpdate a few fields in a object.
CRM - Archive ObjectArchive or delete an existing object.
CRM - Search ObjectSearch any object.
CRM - GDPR DeleteDeletes the record and any associations.
Files - Import FileImports CRM records into your HubSpot account.
Files - Delete FileDeletes the file at the specified path in the specified environment.
Files - Get FileGets the file at the specified path in the specified environment.
Files - Create FolderCreate a folder in the specified environment.
Files - Search FileSearch for any file in the specified environment.
Files - Search FolderSearch for any folder in the specified environment.
Files - Update Folder PropertiesPerform a partial update of a property.
Files - Check Folder Update StatusCheck the status of a batch file access update task.
Files - Get FolderGet the details for a specific folder.
Files - Delete FolderDelete a specific folder.
Settings - Retrieve List of UsersGet a list of authorized users.
Settings - Add UserAdd users to your HubSpot account.
Settings - Retrieve UserRetrieve an existing user.
Settings - Modify UserUpdate user details.
Settings - Remove UserRemove set of user.
Settings - Retrieve Roles AccountView users in your HubSpot account.
Settings - See Details Account's TeamsObtain information about the team's account.

You can check the Query Settings Guide to learn more about queries.

Using Queries in Applications

Once you have successfully run a Query, you can use it in your app to: