Hi, can HUBL be used in transactional email templates (via a custom module)? I can’t find any information about it, and it’s not recognizing my conditionals, e.g.:
custom mod: test-hubl
{% set monto_raw = personalization_token('custom.monto_descuento', '') %}
{% set monto_str = (monto_raw ~ '')|trim %}
{% if monto_str == '' %}
No vino monto_descuento
{% else %}
{% set monto_num = monto_str
|replace(',', '.')
|regex_replace('[^0-9.-]', '')
|float
%}
{% if monto_num > 1 %}
Mayor a 1
{% else %}
No es mayor a 1
{% endif %}
{% endif %}
Yes, HubL is supported in HubSpot email templates and custom modules. For advanced HubL that works with CRM data and more complex dynamic content, use HubSpot’s Programmable Email feature and enable the template for Email V3 rendering.
Programmable Email is currently still in beta and has some email-specific limitations, so not every HubL capability behaves exactly as it does in CMS website templates.
The email being transactional doesn’t by itself prevent HubL from rendering. If your conditionals still aren’t evaluating as expected, I’d check whether the template/module is configured for programmable email and then test the value returned by personalization_token() before applying the additional filters and conditional logic.
It’s also worth checking the current HubL function limits if your final module uses CRM, HubDB, file, or other HubL data functions.
Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 29, 2026. Thank you for your contributions to the HubSpot Community!