<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can you reference custom properties in hubspot emails (source code) in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248765#M21558</link>
    <description>&lt;P&gt;Sorry for the later reply &lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;. Thank you so much for taking the time to answer my question!!!&lt;/P&gt;</description>
    <pubDate>Tue, 15 Jan 2019 22:59:09 GMT</pubDate>
    <dc:creator>a_ayodeji</dc:creator>
    <dc:date>2019-01-15T22:59:09Z</dc:date>
    <item>
      <title>Can you reference custom properties in hubspot emails (source code)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248763#M21556</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;
&lt;P&gt;In order to get started with product reviews in Trustpilot, I need to BCC or send directly to our Trustpilot email address with the following script in the header html of the email:&lt;/P&gt;
&lt;P&gt;&amp;lt;script type="application/json+trustpilot"&amp;gt;&lt;BR /&gt;
{&lt;BR /&gt;
"recipientName": "Name MacNameson",&lt;BR /&gt;
"recipientEmail": "&lt;A href="mailto:customer@email.com"&gt;customer@email.com&lt;/A&gt;",&lt;BR /&gt;
"referenceId": "1234abcd",&lt;BR /&gt;
"productSkus": ["ABC-1234","ABC-4321"]&lt;/P&gt;
&lt;P&gt;}&lt;BR /&gt;
&amp;lt;/script&amp;gt;&lt;/P&gt;
&lt;P&gt;These values will need to by dynamic based on custom properties for each contact. I have already et up the custom properties. So i am just wondering how to reference the custom properties in the code editor&lt;/P&gt;</description>
      <pubDate>Fri, 28 Dec 2018 19:20:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248763#M21556</guid>
      <dc:creator>a_ayodeji</dc:creator>
      <dc:date>2018-12-28T19:20:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can you reference custom properties in hubspot emails (source code)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248764#M21557</link>
      <description>&lt;P&gt;Welcome, &lt;A class="mention" href="https://community.hubspot.com/u/a.ayodeji"&gt;@a.ayodeji&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Yes, this is possible. I just confirmed the following method populates a contact's property values:&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;To modify a HubSpot marketing email's &lt;CODE&gt;&amp;lt;head&amp;gt;&lt;/CODE&gt; source code, you must clone a template to HTML. (The screenshots in &lt;A href="https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-do-i-get-an-html-version-of-my-hubspot-template" rel="nofollow noopener"&gt;this article&lt;/A&gt; are outdated, so I have included another below.)&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;/P&gt;&lt;DIV class="lightbox-wrapper"&gt;&lt;A class="lightbox" href="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/62a92f11ad0ece9a64eb209f1f96f469f5bb8a1c.jpeg" data-download-href="/legacyfs/online/uploads/default/62a92f11ad0ece9a64eb209f1f96f469f5bb8a1c" title="Clone to HTML.jpg" rel="nofollow noopener"&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/6/62a92f11ad0ece9a64eb209f1f96f469f5bb8a1c.jpeg" alt="Clone%20to%20HTML" width="366" height="500" data-small-upload="/uploads/default/optimized/2X/6/62a92f11ad0ece9a64eb209f1f96f469f5bb8a1c_2_10x10.png" /&gt;&lt;DIV class="meta"&gt;
&lt;SPAN class="filename"&gt;Clone to HTML.jpg&lt;/SPAN&gt;&lt;SPAN class="informations"&gt;401×547 41.5 KB&lt;/SPAN&gt;&lt;SPAN class="expand"&gt;&lt;/SPAN&gt;
&lt;/DIV&gt;&lt;/A&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;
&lt;OL start="2"&gt;
&lt;LI&gt;In the &lt;CODE&gt;&amp;lt;head&amp;gt;&lt;/CODE&gt;, add the following code containing HubL tokens (&lt;A href="https://knowledge.hubspot.com/articles/kcs_article/cos-general/how-to-use-personalization-with-your-content" rel="nofollow noopener"&gt;"personalization tokens"&lt;/A&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/LI&gt;
&lt;/OL&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;&amp;lt;script type="application/json+trustpilot"&amp;gt;
  {
    "recipientName": "{{ contact.firstname }} {{ contact.lastname }}",
    "recipientEmail": "{{ contact.email }}",
    "referenceId": "{{ contact.your_custom_property's_internal_name }}",
    "productSkus": ["{{ contact.your_custom_property's_internal_name }}","{{ contact.your_custom_property's_internal_name }}"]
  }
&amp;lt;/script&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;OL start="3"&gt;
&lt;LI&gt;The HubL tokens will populate each recipient's corresponding property values in the final email. My test produced the following:&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;IMG src="https://community.hubspot.com/legacyfs/online/uploads/default/original/2X/0/0063e2d531b1f46322684c3e8b0a7ec2299e6a05.jpeg" alt="My%20test" width="527" height="205" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Dec 2018 16:04:14 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248764#M21557</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-12-31T16:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Can you reference custom properties in hubspot emails (source code)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248765#M21558</link>
      <description>&lt;P&gt;Sorry for the later reply &lt;A class="mention" href="https://community.hubspot.com/u/isaac_takushi"&gt;@Isaac_Takushi&lt;/A&gt;. Thank you so much for taking the time to answer my question!!!&lt;/P&gt;</description>
      <pubDate>Tue, 15 Jan 2019 22:59:09 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Can-you-reference-custom-properties-in-hubspot-emails-source/m-p/248765#M21558</guid>
      <dc:creator>a_ayodeji</dc:creator>
      <dc:date>2019-01-15T22:59:09Z</dc:date>
    </item>
  </channel>
</rss>

