Skip to main content

HubSpot

This page provides information for connecting Appsmith to HubSpot and for reading and writing data in your applications.

Connection parameters

The following section is a reference guide that provides a complete description of all the parameters to connect to a HubSpot database.

Configuring a HubSpot datasource.
Configuring a HubSpot datasource.

Authentication Type

Options:
  • Bearer Token: An access token that authenticates your queries to HubSpot. For more information on finding your access token, follow HubSpot's Private App integration guide.

Query HubSpot

The following section is a reference guide that provides a description of the read and write operation commands with their parameters to create HubSpot queries.

Creating HubSpot queries.
Creating HubSpot queries.

HubDB

The following sections describe the parameters for connecting to HubDB type queries.

Get published tables

The HubDB - get published tables command fetches information for the HubDB tables associated with your HubSpot account. The following is a list of all the fields available for HubDB - get published tables:

Sort
The name of a field by which to sort the fetched tables, such as name or creation time (createdAt). Requires a single field.
Next Page Token
A token sent in the response to your query that is used in subsequent queries to fetch the next page of data:
{{ GetRowsQuery.data.paging?.next.after || "" }}
Limit
The maxiumum number of items that can be returned in a single query response.
Created at
Returns only records that were created at this given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Created after
Returns only records that were created after the given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Created before
Returns only records that were created before this given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Updated at
Returns only records that were updated at this given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Updated after
Returns only records that were updated after the given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Updated before
Returns only records that were updated before this given date/time. Format: YYYY-MM-DDThh:mm:ss.sZ.
Archive
A boolean value; when true, the query only returns table data for tables that are archived.

Create table

The HubDB - create table command creates a new HubDB table. The following is a list of all the fields available for HubDB - create table:

Name
The name of the new table.
Label
The label of the new table.
Use for pages
A boolean that, when true, allows the new table to be used for creating dynamic website pages.
Columns
A JSON array of column names to add to the new table: ["hello", "world", "apple"]
Allow Public API access
A boolean that, when true, allows the table to be read via public API without authorization.
Allow child tables
A boolean that, when true, allows the creation of related child tables.
Allow child table pages
A boolean that, when true, allows the creation of multi-level dynamic pages referencing the child table.
Foreign table ID
The ID of another table that is related to the new table as a Foreign Key.
Foreign table ID
The ID of a column from another table that is used as a Foreign Key.
Dynamic meta tags
Key/value pairs to use for setting which table columns map to which metadata types. For example, to set the **Meta description column** to be the column with an id of 3, use: { "DESCRIPTION": 3 }

Get details of a published table

The HubDB - get details of a published table command fetches data about a HubDB table. The following is a list of all the fields available for HubDB - get details of a published table:

Archived
A boolean value; when true, the query includes data for tables that are archived.
Include foreign IDs
A boolean value; when true, the details for related child/foreign tables are included in the results.
Table ID or name
The name of your HubDB table, or its numerical ID value.
Archive table

The HubDB - archive table archives a HubDB table. The following is a list of all the fields available for HubDB - archive table:

Table ID or name
The name of your HubDB table, or its numerical ID value.

Update existing table

The HubDB - update existing table command fetches rows from a HubDB table. The following is a list of all the fields available for HubDB - update existing table:

Archived
A boolean value; when true, the query returns data only for tables that are archived.
Include foreign IDs
A boolean value; when true, the details for related child/foreign tables are included in the results.
Table ID or name
The name of your HubDB table, or its numerical ID value.
Name
The name of the new table.
Label
The label of the new table.
Use for pages
A boolean that, when true, allows the new table to be used for creating dynamic website pages.
Columns
A JSON array of column names to add to the new table: ["hello", "world", "apple"]
Allow Public API access
A boolean that, when true, allows the table to be read via public API without authorization.
Allow child tables
A boolean that, when true, allows the creation of related child tables.
Allow child table pages
A boolean that, when true, allows the creation of multi-level dynamic pages referencing the child table.
Foreign table ID
The ID of another table that is related to the new table as a Foreign Key.
Foreign table ID
The ID of a column from another table that is used as a Foreign Key.
Dynamic meta tags
Key/value pairs to use for setting which table columns map to which metadata types. For example, to set the Meta description column to be the column with an id of 3, use: { "DESCRIPTION": 3 }
Clone table

The HubDB - clone table command clones an existing HubDB table. The following is a list of all the fields available for HubDB - clone table:

Table ID or name

The name of your HubDB table, or its numerical ID value.
New name
The name of your new HubDB table.
New label
The label of your new HubDB table.
Copy rows
A boolean that, when true, copies the rows from the cloned table into the new table.

Export published version table

The HubDB - export published version table command returns the file data for a HubDB table in a given format. The following is a list of all the fields available for HubDB - export published version table:

Include foreign IDs
A boolean value; when true, the details for related child/foreign tables are included in the results.
Table ID or name
The name of your HubDB table, or its numerical ID value.
Unpublish table

The HubDB - unpublish table command unpublishes a given HubDB table. The following is a list of all the fields available for HubDB - unpublish table:

Include foreign IDs
The file format of the exported table data. Allows CSV, XLSX, or XLS.
Table ID or name
The name of your HubDB table, or its numerical ID value.
Get table rows

The HubDB - get table rows command fetches rows from a HubDB table. The following is a list of all the fields available for HubDB - get table rows:

Sort
The name of a field by which to sort the fetched records. Requires a single column name, such as name.
Next Page Token
A token sent in the response to your query that is used in subsequent queries to fetch the next page of data:
{{ GetRowsQuery.data.paging?.next.after || "" }}
Limit
The maxiumum number of rows that can be returned in a single query response.
Properties
A comma-separated list of columns that should be fetched for each returned record.
Table ID or name
The name of your HubDB table, or its numerical ID value.
Add new table row

The HubDB - add new table row command creates a new row in a HubDB table. The following is a list of all the fields available for HubDB - add new table row:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Path
If you're using HubSpot's dynamic pages, this field is the URL slug for the new page created for this table row.
Name
If you're using HubSpot's dynamic pages, this field is the page title for the new page created for this table row.
Child table ID
The ID for another HubDB table. This is used as a Foreign Key to create a relationship between records. To connect a specific record from the child table, pass its ID as a string value in the JSON object of your query's Values field.
Values
A JSON object with key/value pairs representing the new record. If you are creating a relationship using the Child table ID field, you can pass the ID of a corresponding record from the child table as a string value. For example, if you refer to a child table called buyer:
{
"name": "MyProduct",
"buyer": "121529803132"
}
Update existing row

The HubDB - update existing row command updates an existing row in a HubDB table. The following is a list of all the fields available for HubDB - update existing row:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Row ID
The ID of the table row that you'd like to update.
Path
If you're using HubSpot's dynamic pages, this field is the URL slug for the new page created for this table row.
Name
If you're using HubSpot's dynamic pages, this field is the page title for the new page created for this table row.
Child table ID
The ID for another HubDB table. This is used as a Foreign Key to create a relationship between records. To connect a specific record from the child table, pass its ID as a string value in the JSON object of your query's Values field.
Values
A JSON object with key/value pairs representing the new record. If you are creating a relationship using the Child table ID field, you can pass the ID of a corresponding record from the child table as a string value. For example, if you refer to a child table called buyer:
{
"name": "MyProduct",
"buyer": "121529803132"
}
Replace existing row

The HubDB - replace existing row command replaces an existing row in a HubDB table. The following is a list of all the fields available for HubDB - replace existing row:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Row ID
The ID of the table row that you'd like to replace.
Path
If you're using HubSpot's dynamic pages, this field is the URL slug for the new page created for this table row.
Name
If you're using HubSpot's dynamic pages, this field is the page title for the new page created for this table row.
Child table ID
The ID for another HubDB table. This is used as a Foreign Key to create a relationship between records. To connect a specific record from the child table, pass its ID as a string value in the JSON object of your query's Values field.
Values
A JSON object with key/value pairs representing the new record. If you are creating a relationship using the Child table ID field, you can pass the ID of a corresponding record from the child table as a string value. For example, if you refer to a child table called buyer:
{
"name": "MyProduct",
"buyer": "121529803132"
}

Permanently delete row

The HubDB - permanently delete row command deletes an existing row from a HubDB table. The following is a list of all the fields available for HubDB - permanently delete row:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Row ID
The ID of the table row that you'd like to delete.

Clone row

The HubDB - clone row command clones an existing row in a HubDB table. The following is a list of all the fields available for HubDB - clone row:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Row ID
The ID of the table row to clone.

Get set rows

The HubDB - get set rows command gets a batch of specific rows from a HubDB table. The following is a list of all the fields available for HubDB - get set rows:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Inputs
A JSON array with the IDs of the rows to get.

Permanently delete rows

The HubDB - permanently delete rows command deletes a batch of specific rows from a HubDB table. The following is a list of all the fields available for HubDB - permanently delete rows:

Table ID or name
The name of your HubDB table, or its numerical ID value.
Inputs
A JSON array with the IDs of the rows to get.

CRM

The following sections describe the parameters for connecting to CRM type queries.

List objects

The CRM - list objects command returns a list of entries for a given type of CRM objects. The following is a list of all the fields available for CRM - list objects:

Objects
The name of a type of CRM object to fetch, such as contacts.

Create object

The CRM - create objects command creates a new object of the given type. The following is a list of all the fields available for CRM - create objects:

Objects
The name of a type of CRM object to fetch, such as contacts.
Properties
A JSON object with key/value pairs that define the properties for the created CRM object.

Read object

The CRM - read object command returns the details for a specific CRM object. The following is a list of all the fields available for CRM - read object:

Properties
A comma-separated list of columns that should be fetched for the object.
Properties with history
A comma-separated list of columns that should be fetched along with their history of previous values.
Associations
A comma-separated list of related CRM object types whose IDs should be returned.
Archive
A boolean value; when true, the query only returns entries that are archived.
Object type
The name of a type of CRM object to fetch, such as contacts.
Object ID
The ID of the CRM object to fetch.
Update object

The CRM - create objects command updates a given CRM object. The following is a list of all the fields available for CRM - create objects:

Object type
The name of a type of CRM object to fetch, such as contacts.
Object ID
The ID of the CRM object to fetch.
Properties
A JSON object with key/value pairs that define the properties for the created CRM object.
Archive object

The CRM - Archive object command archives a given CRM object. The following is a list of all the fields available for CRM - Archive object:

Object type
The name of a type of CRM object to fetch, such as contacts.
Object ID
The ID of the CRM object to fetch.

Search object

Object type
The name of a type of CRM object to fetch, such as contacts.
Property name
The name of a property by which to filter results
Value
The value that returned records should have for the property specified in Property name.
Operator
The logical operator that should be used to compare the object's actual property value to the value specified in Value.
Sorts
A sorting rule in the request body to list results in ascending or descending order. Only one sorting rule can be applied to any search. For example:
{[
{
"propertyName": "createdate",
"direction": "DESCENDING"
}
]}
Query
A word to search for in the default text property of all CRM objects.
Properties
A comma-separated list of columns that should be fetched for each returned record.
Limit
The maxiumum number of rows that can be returned in a single query response.
After
A token sent in the response to your query that is used in subsequent queries to fetch the next page of data:
{{ SearchObjectQuery.data.paging?.next.after || "" }}

Additional commands

In addition to HubDB and CRM command types, Appsmith also provides the following commands:

Query NameDescription
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 redirectsReturns the details for a single existing URL redirect by ID.
URL Redirects - update redirectsUpdates the settings for an existing URL redirect.
URL Redirects - delete redirectsDeletes one existing redirect.
Files - import fileImports CRM records into your HubSpot account.
Files - delete fileDeletes the file at the specified path in the specified environment.
Files - get fileFetches the file at the specified path in the specified environment.
Files - create folderCreates a folder in the specified environment.
Files - search fileSearches for any file in the specified environment.
Files - search folderSearches for any folder in the specified environment.
Files - update folder propertiesPerforms a partial update of a property.
Files - check folder update StatusChecks the status of a batch file access update task.
Files - get folderFetches the details for a specific folder.
Files - delete folderDeletes a specific folder.
Settings - retrieve list of usersFetches a list of authorized users.
Settings - add userAdds users to your HubSpot account.
Settings - retrieve userRetrieves an existing user.
Settings - modify userUpdates user details.
Settings - remove userRemoves a set of users.
Settings - retrieve roles accountFetches users in your HubSpot account.
Settings - see details account's teamsFetches information about the team's account.

Troubleshooting

If you are experiencing difficulties, you can refer to the Datasource troubleshooting guide or contact the support team using the chat widget at the bottom right of this page.