The Use Case

This tutorial will take you through how to use HubDB tables and Programmatic Email Modules to customise and personalise Google Review links. This solution will work best for businesses that have multiple locations, and is a great solution if you are looking to send multiple review links en masse. 

Before You Get Started

You will need a Marketing Enterprise or CMS Professional / Enterprise subscription in order to use the HubDB table. You will also need Marketing Hub Professional / Enterprise to use the programmatic email modules.  

You will also want to ensure you are tracking which location your customer is serviced at within HubSpot. The best way to do this is to create a Location Code property in HubSpot, and ensure it is populated in on the Contact object. 

Step by Step Instructions

1. Create a HubDB Table

HubDB tables are basically like an Excel Sheet, except cooler. If  this is your first time creating a HubDB table check out this article first, before moving on. 

Now, each table has multiple ID's you need to be aware of:

  • Table ID: This is the numerical ID of the table itself.
  • Column ID: Each column within the table has a corresponding alphanumerical ID.
  • Row ID: Each row within the table has a corresponding alphanumerical ID.

These ID's can be used in code to tell HubSpot what it needs to do. 

For this specific use case we want to create a table with the following columns: Location, Location Code and Google Review Link. I would recommend creating this in a Spreadsheet first and then importing it into HubSpot, especially if you have a bunch of locations.

After that, your table should look a little something like this:

Screenshot 2024-03-11 at 8.52.52 am

⚠️ Important Note: The location code or location name must match your contact's location property exactly. For example if you contact’s location is “Ashgrove” on their contact record, but HubDB says “Ashgroove” - it will not work.Screenshot 2024-03-11 at 9.04.34 am

2. Create a Programmatic Email Module 

I have some good news for you non-coders out there. I have created the code you will need for this so all you need to do is copy and paste! You will need to do a bit of replacing but I will take you through it. 

(a) First, let's create a programmatic email module. Go to Marketing → Files and Templates → Design Tools. 

(b) Now, in the design tools screen, select Create a new file → Module → Next. Give your module a name, select "Emails" in the list of where you would like to use this module and place it in a folder.





(c) We need to set this module to programmatic. On the right hand side you will see a toggle for the module to be used programmatic emails - toggle this on. 

Screenshot 2024-03-11 at 9.07.13 am

(d) Now, you are going to copy and paste the following code into the blank code document. But first we want to replace anything in red. The following guide is listing in order of the code. 

i) Replace 7586823 with the ID of your table. You can find this on the HubDB listing page.

Screenshot 2024-03-11 at 9.41.58 am

ii) Replace the first location_code with the ID of the column listed your location code. This is the column that needs to match the Location Code Property. You can find this ID within the HubDB table by selected the arrow next to the column name. 

Screenshot 2024-03-11 at 9.43.34 am

iii) Replace the second location_code with the ID of the Location Code property. You can find this in the property settings. 

Screenshot 2024-03-11 at 9.45.27 amiii) Replace both google_review_url with the ID of the column listing your Google Review URLs. You can find this ID within the HubDB table by selected the arrow next to the column name. 


{% if contact.location_code %}

<p style="padding-left:20px;">
  <a style="color: #3574e3; font-weight: bold;" href=""> Leave a review</a>. 


3. Publish and Use

That's it you've done it - click Publish!

Now when building you email, simply drag and drop the module into your email. You can test it is working by going into preview and selecting a random contact to ensure it is showing the correct Google Review Link.


Looking at starting a new project with Neighbourhood? Get in touch!