Email Deliverability

kaleperez
Participant

Include HTML property value in the email

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

 

 

 

 

 

 

 

0 Upvotes
8 Replies 8
CDean
Contributor

Include HTML property value in the email

Yes.  Contact properties are available in all templates.

 

https://developers.hubspot.com/docs/cms/hubl/variables#variables-available-in-all-templates

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.



0 Upvotes
kaleperez
Participant

Include HTML property value in the email

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

 

 

 

 

 

 

 

 

0 Upvotes
CDean
Contributor

Include HTML property value in the email

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>"

0 Upvotes
CDean
Contributor

Include HTML property value in the email

You may also try using the safe filter.

 

https://developers.hubspot.com/docs/cms/hubl/filters#safe

0 Upvotes
CDean
Contributor

Include HTML property value in the email

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

0 Upvotes
kaleperez
Participant

Include HTML property value in the email

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

0 Upvotes
JValonda
Member

Include HTML property value in the email

Are you able to resolve this?

0 Upvotes
DianaGomez
Community Manager
Community Manager

Include HTML property value in the email

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


¿Sabías que la Comunidad está disponible en Español?
¡Participa hoy en conversaciones en el idioma de tu preferencia,cambiando el idioma en tus configuraciones!

Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !


0 Upvotes