Transactional email and HUBL

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 %}

Hi @juanchi-onlinua,

Yes, HubL can be used in email in particular when the “programmable email” feature is turned on.

However, the “programmable email” feature is in beta (it has been in beta for at least a few years now), so there have been issues mentioned with this functionality where HubL is not working 100% like it would be in website modules.

Hi @juanchi-onlinua

Yes, you can do this, but the feature is still in beta. Here is the doc link, which can guide you better -

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.

Thanks!