# HubL code in HTML

**URL:** <https://community.hubspot.com/t/hubl-code-in-html/69366>\
**Category:** Email Marketing Tool\
**Tags:** marketing-email\
**Created:** [November 16, 2022, 11:32am UTC](https://community.hubspot.com/t/hubl-code-in-html/69366 "2022-11-16T11:32:59Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![msaez](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@msaez](https://community.hubspot.com/u/msaez)\
**Post date:** [November 16, 2022, 11:32am UTC](https://community.hubspot.com/t/hubl-code-in-html/69366/1 "2022-11-16T11:32:59Z")

</div>

Hi!

We have created an e-mail with a QR code in de HTML area.

Everything is working ok, but when I try to send them, appears a warning:

`HTML is an HTML module and cannot contain HubL code`

This is the code that we are using:

 ![msaez_0-1668598173558.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/8/1/817e897b64636c34613038abc35e12192680f0a2.png)

Could you please help me? Do you know if it’s relevant? Because, apparently, I can send the e-mail with any problems but I’m worried by the warning and his impact.

Thank you all

---

<div class="post-metadata">

**Author:** ![albertsg](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/albertsg/32/99473_2.png) [@albertsg](https://community.hubspot.com/u/albertsg)\
**Post date:** [November 16, 2022, 4:40pm UTC](https://community.hubspot.com/t/hubl-code-in-html/69366/2 "2022-11-16T16:40:19Z")

</div>

Hello @msaez, the error is quite self explanatori. You are using HubL in your module and that’s not allowed as the error says.

I see in your HTML that HubL is being used in the src property of your image:

`{{contact.hs_object_id}}`

Anyway, if you can send the email, did you try sending it first to some test accounts for example? If it works, I don’t think the error will prevent anything **BUT** I would recommend you to **test it as much as you can** since I’m not an email expert, I’m a CMS developer 🙂

---

<div class="post-metadata">

**Author:** ![karstenkoehler](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/karstenkoehler/32/68554_2.png) [@karstenkoehler](https://community.hubspot.com/u/karstenkoehler)\
**Post date:** [November 16, 2022, 6:22pm UTC](https://community.hubspot.com/t/hubl-code-in-html/69366/3 "2022-11-16T18:22:36Z")

</div>

Hi @msaez,

Have you tried using a rich text module instead of a HTML module? It could be a quick workaround.

If that doesn’t work either, the so-called programmable email feature might be needed, available in Marketing Hub Professional and Enterprise, allowing you to use advanced HubL syntax to fully personalize the content of your emails: [Create programmable emails](https://knowledge.hubspot.com/email/create-programmable-emails)

(It would be a matter of cloning an existing module and enabling the programmable email beta for this module. All default modules cannot be enabled that way, so cloning a default module should do the trick.)

Hope this helps!

---

<div class="post-metadata">

**Author:** ![msaez](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@msaez](https://community.hubspot.com/u/msaez)\
**Post date:** [November 22, 2022, 7:17am UTC](https://community.hubspot.com/t/hubl-code-in-html/69366/4 "2022-11-22T07:17:54Z")

</div>

Finally we are going to send them anyway because it seems that everything is working ok despite of the error.

Thank you for your help!😄

---

<div class="post-metadata">

**Author:** ![SLiVecchi8](https://avatars.discourse-cdn.com/v4/letter/s/8797f3/32.png) [@SLiVecchi8](https://community.hubspot.com/u/SLiVecchi8)\
**Post date:** [May 20, 2025, 11:42pm UTC](https://community.hubspot.com/t/hubl-code-in-html/69366/5 "2025-05-20T23:42:47Z")

</div>

hi, did everything work ok when you sent this? the field pops up for me in the preview tests, but im worried it wont work in the live email
