# Passing code in a personalization token

**URL:** <https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230>\
**Category:** Email Marketing Tool\
**Tags:** enterprise\
**Created:** [March 28, 2023, 10:41pm UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230 "2023-03-28T22:41:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DLi4](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@DLi4](https://community.hubspot.com/u/DLi4)\
**Post date:** [March 28, 2023, 10:41pm UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230/1 "2023-03-28T22:41:43Z")

</div>

I have a multi-text type field that is storing a different piece of code for each of my contacts.  
That code is essentially HTML that I would like to drop into my emails that would load a different personalized message.

Problem I am running into is that the code doesn’t render. I’ve tried entering in the personalization token into the source code and also tried loading it into an HTML module… neither is leading to the code rendering. Instead, I get a block of code that shows up in my email.

Is what I’m trying to do feasible?

---

<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:** [March 29, 2023, 4:21am UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230/2 "2023-03-29T04:21:32Z")

</div>

Hi @DLi4,

Instead of a multi-line text property, can you try a property with the type ‘Rich text’? I’ve created emails using HTML personalization tokens and this property type.

Best regards

---

<div class="post-metadata">

**Author:** ![DLi4](https://avatars.discourse-cdn.com/v4/letter/d/b782af/32.png) [@DLi4](https://community.hubspot.com/u/DLi4)\
**Post date:** [March 29, 2023, 4:13pm UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230/3 "2023-03-29T16:13:18Z")

</div>

You nailed it! This works!  
Thank you so much.

---

<div class="post-metadata">

**Author:** ![Zayne](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zayne/32/85729_2.png) [@Zayne](https://community.hubspot.com/u/Zayne)\
**Post date:** [June 12, 2024, 4:32pm UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230/4 "2024-06-12T16:32:23Z")

</div>

I’m trying to get this right too, but no combination seems to be working. I’ve created a Rich text field and added content to it:

 ![Screenshot 2024-06-12 at 18.28.00.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/f/4/f445f9a49845ac81af7ab60779159188321a47dc.png)

I then created a mail and tried to insert this in both a Rich-text block as well as an HTML block:

 ![Screenshot 2024-06-12 at 18.30.16.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/6/a6cf408a7813c766fba185240118ae843b88cf4c.png)

However, it always just renders out the html in the preview:

 ![Screenshot 2024-06-12 at 18.31.47.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/2d5c7c0b0bb8164bdb3b0f2ab7ef13232bf1e2be.png)

So either I’m doing it wrong or you cannot add html into an email.

---

<div class="post-metadata">

**Author:** ![Zayne](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zayne/32/85729_2.png) [@Zayne](https://community.hubspot.com/u/Zayne)\
**Post date:** [June 12, 2024, 6:13pm UTC](https://community.hubspot.com/t/passing-code-in-a-personalization-token/78230/5 "2024-06-12T18:13:22Z")

</div>

It turns out that there is a bug - rich text fields work correctly for all normal HubSpot objects, such as contacts. However, they don’t work correctly for custom objects. They output the raw html and there’s no way to get them to render the real output!

HubSpot please fix!
