SOP: Build a Resource Library in HubSpot Using HubDB
Time: ~15 minutes (first build); 2 minutes per resource after
Before You Start
[] Content organized in a CSV (one row per resource, one column per field)
[] Field names finalized — must match between CSV, HubDB table, and module code exactlySteps
1
Design your fields first.
Map every card element to a field name. Example: card_name, card_desc, card_type, card_format, card_tag, card_access, card_url. Finalize before creating the table — adding columns later is difficult.
2
Prepare the CSV.
One row per resource. Column headers match field names exactly. Choice values are case-sensitive.
3
Create the HubDB table.
Marketing > Files and Templates > HubDB > Create table. Name it. Note the variable name in table properties.
4
Import CSV and map columns.
Verify field types match (Text, Choice, URL). Double-check mapping before saving.
5
Build the module.
Use Gemini (or equivalent) to generate the HTML that loops through
hubdb_table_rows() and renders one card per row. Paste HTML, CSS, JS into Design Manager. Publish.
6
Add module to page and refresh.
Note If cards are blank: Check that the HubDB variable name in table properties matches the variable name in the module code. This is the #1 issue. Screenshot the blank page and drop it into your AI tool for a fast diagnosis
♾️
Adding a New Resource
Open HubDB table → Add row → Fill fields → Publish. Page updates automatically.
Key Rules
- Field names must match exactly between CSV, table, and code
- Finalize table structure before building — schema changes later are hard
- Always refresh the page after publishing changes
- Choice field values are case-sensitive (
shield≠Shield)
%201.png?width=250&height=83&name=ACTsights%20Logo%20(500%20x%20100%20px)%201.png)