back to blog

HubDB: In-Depth Look at Hubspot’s Database Feature

9 min read • January 30, 2021

HubDB is Hubspot’s integrated database feature for building out data driven content. Often database management systems are left to be maintained by someone with expertise in the particular system. However, HubDB’s tables are built to have a feel similar to excel sheets so that anyone on the team could possibly create and update the tables. This way a developer can build out dynamic pages using the data and HubL and then hand the HubDB table off to a marketer to maintain the content.

Accessing HubDB

If you have the Hubspot CMS add-on you can get to the HubDB dashboard through the main menu by navigating to Marketing > Files and Templates > HubDB.

To give a user who is not a Super Admin access to create, delete, or edit tables there are two areas in the user permissions to set. Navigate to the settings by clicking the gear icon in the top right of Hubspot’s menu bar. Then in the left sidebar click User & Permissions

Hover over the user you want to give permissions to and click Actions > Edit. Under the Marketing there will be a row for HubDB where you can check to give Publish, Write, and Read access. Then under the Account tab check on Account Access. At the end of the list that appears will be a row to turn on permissions to Edit HubDB Tables. Click Save to submit your changes.

The HubDB Dashboard

You can navigate to the HubDB Dashboard from the menu under Marketing > Files & Templates > HubDB. When you enter the dashboard for the first time you’ll be welcomed by a little blurb telling you what the HubDB is. Once you have created tables this dashboard front is where you will see a list of all the ones you’ve created. In this list you’ll be able to see the name of your table, it’s status (draft or published), when it was last updated and by who, when the table was created, and how many rows your table has.

From the Actions dropdown button, to the far right of your table listing; you can choose to edit, publish or unpublish, clone, or delete your table.

Creating a Table

To get started making tables all you need to do is click the Create Table button in the top right corner of the dashboard. 

The popup that appears will ask you to input a Table label and a Table name. The label is what you will see under the Label column in your dashboard listing. The name is a variable used in development to make a call to your table. When you enter a label the name will automatically be filled in with your label but as all lowercase and the spaces replaced with underscores. You can change the name if you’d like, but leaving it as the default will help keep naming conventions consistent.

With your label and name filled out you can click the orange Create button to start building out your first table!

Table Dashboard

After creating your table you’ll immediately be taken to it’s dashboard where you’ll create your rows, columns, and add your content. You’ll see your table label up in the top left corner and to the right is a search bar, actions dropdown, and the publish button. 

The Search Bar allows you to search for any particular content in your table. So if you have a large amount of rows you can easily find rows you’re looking to update or delete by searching for any of their content.

From the Actions button you can add a new column or row, import data, export your data, revert to the last published version of your table, and manage table settings. The table settings is where you can see your table’s name as well as where you can enable API access, creation of dynamic pages from your data, and the use of child tables. 

API access can allow your developers to manipulate the data of your dashboard from an outside source. Dynamic pages is a unique feature that will allow you to create a template that will auto-create pages based on the content in your table. Child tables allow you to connect tables together if you have a robust amount of data to enter. For example, with an events table with a location column you can create a locations table to house all the location information and then in your events table just have a dropdown list of locations to choose from that is populated by the location table. 

Underneath your table name and you’ll see an Undo and Redo button. These buttons will let you undo changes you’ve made to the table and redo them if you decide you didn’t want to undo them after all. Once you leave your table dashboard you won’t be able to undo any of the changes you’ve made before leaving.

The rest of the dashboard is your rows listing. At the top of the listing are your column names and at the bottom of the listing is a button to add a new row. Your table starts out with an ID and Name column. The ID column is a unique identifier for each row and cannot be deleted or changed.

Columns and Their Types

To start building out your table you’ll want to create columns for each type of data you want to enter. Click Actions > Add Column to add a column. This will bring up a popup for you to fill out the Column label, Column name, and Column type. The label and name act in the same way as your table label and name do. The label is what you’ll visually see and the name is what’s used by your developer when accessing the table in code.

Currently there are 14 different custom column types to choose from and 4 built in column types. You’ll want to get to know what each one’s use is  so as to choose the one that best fits your column’s data.

Custom Column Types

 

Text A single line of text.
Rich Text Multi-line text that gives you the use of a WYSIWYG editor for formatting the content.
URL A website link.
Image Opens the Hubspot file manager for uploading or choosing an image.
Select A dropdown for selecting a single item.
Multi-select A dropdown for selecting multiple items.
Date Gives you a date picker.
Date and Time Gives you a date picker as well as a time picker.
Number For entering numerical values.
Currency For entering currency values.
Checkbox A boolean, for data that has a yes/no value.
Location Opens a map search to choose a location, values will be the latitude and longitude of the location.
Foreign ID Choose a column from another table to connect its information to your current table.
Video Opens the Hubspot file manager for uploading or choosing a video.

Built-In Column Types

 

hs_id A unique row identifier.
hs_created_at A hidden column showing the date the row was created. You’ll see this column in any export you download of your table.
hs_path A column specifically for dynamic pages. This column tells Hubspot what page url path to create from each row.
hs_name A column specifically for dynamic pages. This column tells Hubspot what page title to create from each row.

Once you’ve created all the columns you need you can click Add Row to start inputting your data. Or you can import data from a CSV file.

Import Data

To import data into your table you’ll first need a CSV file. From Google Sheets you can get a CSV file by clicking File > Download As > Comma-Separated Values (.csv, current sheet). To obtain a CSV file from Excel click File > Save As and in the save dialog box choose CSV (comma delimited) form the file type dropdown. Your Google Sheet or Excel sheet will need to have a header row that can be used to point Hubspot to which columns data should be entered to.

Now in your Hubspot HubDB table click Actions > Import and then the Choose file button. Choose your CSV file and upload. You’ll be taken to a page asking you to choose which HubDB column to associate with each column of the header row in your CSV. Once done, click Import

You’ll receive an Import Is Complete message once the import is complete. The time it takes for the import to finish depends on how much data is being imported. Once finished you can click Done and you’ll be taken back to your table that is now filled out with your imported data.

Limits of HubDB

Hubspot’s database feature is a robust tool but it does have some limits. You can have no more than 10,000 rows in a single table. When creating templates a call to hubdb_table_rows() can be made no more than 10 times. Then there’s the API limits if you plan on accessing your table through the API. Frankly, these are some pretty lenient limits. Unless you’re a large company wanting to store a list of over 10,000 products there’s plenty that you can use Hubspot’s HubDB for.

Utilizing Content in HubDB

To use the content from your HubDB will require the help of a developer. They can use either HubL directly in your Hubspot templates or access the table through the HubDB API if you want to use the data outside of Hubspot. 

Hubspot’s HubDB may seem a little daunting at first but once you find how easy it is to organize large, repetitive data for use in your pages you may find yourself using it all the time. You can use HubDB to create searchable directories, team pages, events, custom maps, and tons more.

Discussion