Transactional email and HUBL

juanchi-onlinua
Member

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

 

2 Accepted solutions
evaldas
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Hi @juanchi-onlinua,

 

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

 

https://knowledge.hubspot.com/marketing-email/create-programmable-emails

 

https://developers.hubspot.com/docs/cms/start-building/features/data-driven-content/emails-with-prog...

 

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. 

✔️ Did this post help answer your query? Help the community by marking it as a solution.

View solution in original post

GRajput
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

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 -
https://developers.hubspot.com/docs/cms/start-building/features/data-driven-content/emails-with-prog...

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

Thanks!





Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


View solution in original post

2 Replies 2
GRajput
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

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 -
https://developers.hubspot.com/docs/cms/start-building/features/data-driven-content/emails-with-prog...

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

Thanks!





Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


evaldas
Solution
Recognized Expert | Platinum Partner
Recognized Expert | Platinum Partner

Hi @juanchi-onlinua,

 

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

 

https://knowledge.hubspot.com/marketing-email/create-programmable-emails

 

https://developers.hubspot.com/docs/cms/start-building/features/data-driven-content/emails-with-prog...

 

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. 

✔️ Did this post help answer your query? Help the community by marking it as a solution.