SOP: Build a Resource Library in HubSpot Using HubDB
Build a resource library in HubSpot using HubDB with this step-by-step guide, ensuring accurate field mapping & efficient updates for your client's resources.
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 exactly Time: ~15 minutes (first build); 2 minutes per resource afterSteps
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.