Skip to content

Discovering the Power of Programmable Emails in HubSpot

Have you ever wished you could craft a perfectly tailored email for each recipient, taking into account their individual preferences, recent actions, or customer profile? The good news is: this is no longer just a pipe dream. Welcome to the world of programmable emails in HubSpot!

Developer blue

What are Programmable Emails?

Programmable emails are dynamic emails sent to specific individuals based on triggers or actions that they've taken. With the power of automation and a deep understanding of your audience, programmable emails are designed to be hyper-relevant to each recipient, leading to increased engagement and improved relationships.

Unlike traditional email marketing that often involves sending a generic email blast to a large list, programmable emails are personalised for each recipient based on a variety of factors. These can include user behaviour, preferences, data from HubDB databases, custom objects, deals, line items or anything else that lives inside of HubSpot.

Flexibility and Benefits of Programmable Emails

The beauty of programmable emails lies in their flexibility. They can adapt to a myriad of scenarios, making them an incredibly powerful tool in your marketing arsenal. While smart content rules in e-mails are powerful, they may not always provide enough flexibility and will not allow you to load in CRM data. 

Imagine this: you go to the HubSpot website and fill in a form saying you want to be in touch with their sales department. In the form it may ask which product you are interested in. You select Operations Hub.
And then you get not just any random thank you email that their sales team will contact you, but a beautiful personalised email with use-cases based on your industry. The industry can be fetched based on the company profile (which HubSpot auto-completes), the product will be based on your selection in the form. 

This is a basic example of how programmable emails can be used, but the potential is limitless. You can use any information stored in HubSpot, including HubDB data, but also blog articles, custom objects, deals, and line items to create an email that is unique to each recipient. The end result is an email that feels personal and relevant, leading to higher engagement rates.

The benefits of using programmable emails are plentiful. By providing content that is relevant and personalized, you're more likely to engage your audience and inspire action. Programmable emails also allow you to scale your email marketing efforts without sacrificing the personal touch that is often lost in traditional email campaigns.

Our basic demo

Even though we can easily write far more advanced logics, like the newsletter that makes a selection of blog articles based on interests, date of last sent and the max amount of articles per mail, on this site we would like to start off simple:

Someone is interested in books of a specific genre, selects that in a form and sends that over.
The selection is stored in a custom property and the submission of the form triggers a simple workflow that send out an email with the module as below.

The module does have a few options as in the JSON file, but basically loops through the available books in the table that we use in our HubSpot's HubDB demo page. And if the line matches it will show it in the email, including some of the properties like the image.
We could have done better with the way we included the image, but those are details.
Give the example a try yourself by filling out the form at the bottom of the page.

<p>
  Here are the books for your genre(s): {{contact.book_category_interest}}<br>
  {% if content_by_id(module.interest_pagelink) %}
  You can amend your interest <a href="{{ content_by_id(module.interest_pagelink) }}">here</a>.
  {% endif %}
</p>
<br>
{# setting query #}
{% set query = "&genres__in="~contact.book_category_interest %}
{# fetching HubDB based on tableID s set in module and query #}
{% set rows = hubdb_table_rows(module.hubdbtableID,query) %} 

{#rows#}
{% for row in rows %}

{# per row#}
<p style="clear:both; padding: 10px;">
  <a href="{{ row[9] }}">
    <img src="{{row[6].url}}" alt="Book cover {{ row.title }}" align="left" width="30%" height="30%" style="margin: 20px 20px 20px 0;">
    <h2>{{ row[2] }}</h2>     
   </a>
    <i>
      Genre: 
      {# loop through genres #}
      {% for genre in row[7] %}
        {{ genre.name }}{% if !loop.last %}, {% endif %}
      {% endfor %}
    </i>
  <br><br>
  <p> 
    {{ row[4]|safe|striptags }}
  </p>
</p>

{% endfor %}
[
 {
  "display_width": null,
  "id": "c2a24fe6-b26b-7d68-2872-6f0e21f89ab0",
  "label": "HubDB table",
  "locked": false,
  "name": "hubdbtableID",
  "required": false,
  "type": "hubdbtable"
 },
 {
  "default": 74221115020,
  "display_width": null,
  "id": "9fbf7db6-bd38-8fda-a111-cfa91f85813b",
  "label": "Interest Page",
  "locked": false,
  "name": "interest_pagelink",
  "required": false,
  "type": "page"
 }
]

Conclusion

In a world where consumers are bombarded with generic emails every day, programmable emails offer a refreshing alternative. With their ability to provide personalized and relevant content, they can help you stand out in the crowd and forge stronger relationships with your audience.

Harness the power of programmable emails today and experience the benefits of personalized, dynamic content. The possibilities are endless, and with HubSpot, creating programmable emails has never been easier or more flexible. The future of email marketing is here, and it's programmable.

Book lover