# Include HTML property value in the email

**URL:** <https://community.hubspot.com/t/include-html-property-value-in-the-email/57073>\
**Category:** Email Deliverability\
**Created:** [May 16, 2022, 9:59pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073 "2022-05-16T21:59:22Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaleperez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaleperez/32/69256_2.png) [@kaleperez](https://community.hubspot.com/u/kaleperez)\
**Post date:** [May 16, 2022, 9:59pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/1 "2022-05-16T21:59:22Z")

</div>

Hi,

Right Now, we run a process to send out an email for our free trial subscriptions including the top 5 updated reports.

We want to include this same process in HubSpot using a contact property where we will include the html code with report information.

The test email showed the html code, instead of the email with the correct format.

Is there a way that we can solve this. The html code will be a dinamic value that will update on daily basis. I tested including only “\<p\>Hello\</p\>” and in the email that I received, it showed exactly this code, instead of just “Hello”.

If I used the HTML - Email Content, I can’t associate a value with the existing contact property.

Thanks in advance,

Kale

---

<div class="post-metadata">

**Author:** ![CDean](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cdean/32/76463_2.png) [@CDean](https://community.hubspot.com/u/CDean)\
**Post date:** [May 17, 2022, 12:53pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/2 "2022-05-17T12:53:22Z")

</div>

If you are using a template, you can edit or clone the template so that it renders the HTML properly.

---

<div class="post-metadata">

**Author:** ![kaleperez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaleperez/32/69256_2.png) [@kaleperez](https://community.hubspot.com/u/kaleperez)\
**Post date:** [May 17, 2022, 2:00pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/3 "2022-05-17T14:00:41Z")

</div>

Hi,

I can use a template, but in this template, how can I include a session for the dinamic HTML code.

The HTML code that I need to include change by contacts and by email. I need to include the dinamic HTML code, can I do that?

Thanks

---

<div class="post-metadata">

**Author:** ![JValonda](https://avatars.discourse-cdn.com/v4/letter/j/97f17d/32.png) [@JValonda](https://community.hubspot.com/u/JValonda)\
**Post date:** [August 26, 2022, 12:13am UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/4 "2022-08-26T00:13:46Z")

</div>

Are you able to resolve this?

---

<div class="post-metadata">

**Author:** ![DianaGomez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dianagomez/32/48035_2.png) [@DianaGomez](https://community.hubspot.com/u/DianaGomez)\
**Post date:** [August 27, 2022, 3:02am UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/5 "2022-08-27T03:02:52Z")

</div>

Hello @JValonda, happy Friday!

Thank you for posting here!

Could you please share more details of your objective, I would like to tag some experts that might help you 🙂

Best,

Diana

---

<div class="post-metadata">

**Author:** ![CDean](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cdean/32/76463_2.png) [@CDean](https://community.hubspot.com/u/CDean)\
**Post date:** [May 17, 2022, 2:04pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/6 "2022-05-17T14:04:12Z")

</div>

Yes. Contact properties are available in all templates.

> **[HubL variables - HubSpot docs](https://developers.hubspot.com/docs/cms/reference/hubl/variables)**
>
> HubSpot templates can use a host of predefined variables that can be used to render useful website and email elements. This page is a reference listing of those variables.

contact

> This variable is a dictionary that stores contact personalization properties for a known contact. Properties can be accessed from this dict, by adding a period and the property name. For example, contact.firstname would print the first name of a contact.

> * * *

---

<div class="post-metadata">

**Author:** ![kaleperez](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/kaleperez/32/69256_2.png) [@kaleperez](https://community.hubspot.com/u/kaleperez)\
**Post date:** [May 17, 2022, 2:19pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/7 "2022-05-17T14:19:56Z")

</div>

Right, I did that. I included a Text object and I associated this with a contact property, but the value of this property is the HTML code. I supposed that HubSpot convertes this HTML code in the plain format when the email is sending, but not. In the email you can see the HTML code.

For example: the property value is:

“\<div class=“bcmessage”\> \<p\>Hi Harper,\</p\>\<p\>ConstructionWire has added/updated \<b\>new projects\</b\> matching your coverage. The free trial gives you access to up to five reports which are included below. \</p\>”

and in the email looks like this, when I supposed to receive something like:

Hi Harper,

ConstructionWire has added/updated **new projects …**

Make sense. There is any way to do this?

When I included in my template the “HTML - Email” object I can copy and paste the html inside of the HTML box and looks fine, but I need something automatically, because the content of the HTML is dinamic not static information.

Thanks again for your time

---

<div class="post-metadata">

**Author:** ![CDean](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cdean/32/76463_2.png) [@CDean](https://community.hubspot.com/u/CDean)\
**Post date:** [May 17, 2022, 8:05pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/8 "2022-05-17T20:05:27Z")

</div>

Rather than making the email template accept HTML, I recommend adding all of the HTML to the template and only fill in the dynamic fields with the dynamic data.

Template Before:

“\<div\>{value.emailHTML}\</div\>”

Template After:

"\<div\>

\<p\>Hello, my name is {value.name}.\</p\>

\<p\>I am interested in {value.project}.\</p\>

\</div\>"

---

<div class="post-metadata">

**Author:** ![CDean](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/cdean/32/76463_2.png) [@CDean](https://community.hubspot.com/u/CDean)\
**Post date:** [May 17, 2022, 8:19pm UTC](https://community.hubspot.com/t/include-html-property-value-in-the-email/57073/9 "2022-05-17T20:19:53Z")

</div>

You may also try using the safe filter.

> **[HubL filters - HubSpot docs](https://developers.hubspot.com/docs/cms/reference/hubl/filters)**
>
> HubL filter list and examples for HubSpot CMS developers.
