<?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: How to send list of objects using single send APi in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/226677#M5573</link>
    <description>&lt;P&gt;Welcome, &lt;A class="mention" href="https://community.hubspot.com/u/bharat_challapally"&gt;@Bharat_Challapally&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;At this time, custom properties passed via the &lt;A href="https://developers.hubspot.com/docs/methods/email/transactional_email/single-send-overview"&gt;single send API&lt;/A&gt; &lt;EM&gt;cannot&lt;/EM&gt; be used in &lt;A href="https://designers.hubspot.com/docs/hubl/for-loops"&gt;HubL &lt;CODE&gt;for&lt;/CODE&gt; loops&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The reasoning is the same as it is for &lt;A href="https://designers.hubspot.com/docs/hubl/if-statements"&gt;&lt;CODE&gt;if&lt;/CODE&gt; statements&lt;/A&gt; — all HubL logic executes &lt;EM&gt;before&lt;/EM&gt; custom properties and tokens are populated.&lt;/P&gt;
&lt;P&gt;Here are some related topics:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://integrate.hubspot.com/t/if-statement-contact-property/1911"&gt;If statement contact property&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://integrate.hubspot.com/t/adding-external-data-to-create-a-company-property/3835"&gt;Adding external data to create a company property&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The team understands this is a pain point and hopes to support greater HubL flexibility in email templates in the future.&lt;/P&gt;
&lt;P&gt;In the meantime, the best way to surface multiple property values in the same template is to pre-render the values in an HTML table and pass the HTML into the custom token.&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;{{custom.Table}}

{
     "emailId":"XXXXXX",
     "message": {"to":"XXXXXXXXXX@XXXX.xxx"},
     "contactProperties":[],
     "customProperties":[
          {"name":"Table", "value": "&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;TopicNameABC&amp;lt;\/li&amp;gt;&amp;lt;li&amp;gt;TopicNameXYZ&amp;lt;\/li&amp;gt;&amp;lt;\/ul&amp;gt;&amp;lt;\/div&amp;gt;"
          }
     ]
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;While this method works, I recognize it isn't an ideal solution and places the burden on you as the developer.&lt;/P&gt;</description>
    <pubDate>Tue, 27 Nov 2018 15:57:33 GMT</pubDate>
    <dc:creator>IsaacTakushi</dc:creator>
    <dc:date>2018-11-27T15:57:33Z</dc:date>
    <item>
      <title>How to send list of objects using single send APi</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/226676#M5572</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;How to send list of objects to email template using custom property in single send api. Please go through below example template.&lt;/P&gt;
&lt;P&gt;{{custom.RecommendationSteps }}&lt;/P&gt;
&lt;DIV&gt;{% for item in custom.RecommendationSteps %}
&lt;P&gt;&lt;STRONG&gt;Topic Name: &lt;/STRONG&gt;{{item.TopicName}}&lt;/P&gt;
{% endfor %}&lt;/DIV&gt;
&lt;P&gt;{"emailId":"XXXXXX","message":{"to":"XXXXXXXXXX@XXXX.xxx"},"contactProperties":&lt;SPAN class="chcklst-box fa fa-square-o fa-fw"&gt;&lt;/SPAN&gt;,"customProperties":[&lt;BR /&gt;
{"name":"RecommendationSteps", "value":[{"name":"TopicName", "value":"TopicNamexyz"},{"name":"TopicName", "value":"xyz"}]&lt;BR /&gt;
}]&lt;BR /&gt;
}&lt;/P&gt;</description>
      <pubDate>Fri, 23 Nov 2018 08:10:04 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/226676#M5572</guid>
      <dc:creator>Bharat_Challapa</dc:creator>
      <dc:date>2018-11-23T08:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to send list of objects using single send APi</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/226677#M5573</link>
      <description>&lt;P&gt;Welcome, &lt;A class="mention" href="https://community.hubspot.com/u/bharat_challapally"&gt;@Bharat_Challapally&lt;/A&gt;!&lt;/P&gt;
&lt;P&gt;At this time, custom properties passed via the &lt;A href="https://developers.hubspot.com/docs/methods/email/transactional_email/single-send-overview"&gt;single send API&lt;/A&gt; &lt;EM&gt;cannot&lt;/EM&gt; be used in &lt;A href="https://designers.hubspot.com/docs/hubl/for-loops"&gt;HubL &lt;CODE&gt;for&lt;/CODE&gt; loops&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;The reasoning is the same as it is for &lt;A href="https://designers.hubspot.com/docs/hubl/if-statements"&gt;&lt;CODE&gt;if&lt;/CODE&gt; statements&lt;/A&gt; — all HubL logic executes &lt;EM&gt;before&lt;/EM&gt; custom properties and tokens are populated.&lt;/P&gt;
&lt;P&gt;Here are some related topics:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://integrate.hubspot.com/t/if-statement-contact-property/1911"&gt;If statement contact property&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A href="https://integrate.hubspot.com/t/adding-external-data-to-create-a-company-property/3835"&gt;Adding external data to create a company property&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;The team understands this is a pain point and hopes to support greater HubL flexibility in email templates in the future.&lt;/P&gt;
&lt;P&gt;In the meantime, the best way to surface multiple property values in the same template is to pre-render the values in an HTML table and pass the HTML into the custom token.&lt;/P&gt;
&lt;P&gt;Something like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="lang-auto"&gt;{{custom.Table}}

{
     "emailId":"XXXXXX",
     "message": {"to":"XXXXXXXXXX@XXXX.xxx"},
     "contactProperties":[],
     "customProperties":[
          {"name":"Table", "value": "&amp;lt;div&amp;gt;&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;TopicNameABC&amp;lt;\/li&amp;gt;&amp;lt;li&amp;gt;TopicNameXYZ&amp;lt;\/li&amp;gt;&amp;lt;\/ul&amp;gt;&amp;lt;\/div&amp;gt;"
          }
     ]
}
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;While this method works, I recognize it isn't an ideal solution and places the burden on you as the developer.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Nov 2018 15:57:33 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/226677#M5573</guid>
      <dc:creator>IsaacTakushi</dc:creator>
      <dc:date>2018-11-27T15:57:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to send list of objects using single send APi</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/326454#M31551</link>
      <description>&lt;P&gt;In regards to this:&lt;/P&gt;&lt;PRE&gt;The team understands this is a pain point and hopes to support&lt;BR /&gt;greater HubL flexibility in email templates in the future.&lt;/PRE&gt;&lt;P&gt;Some questions:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Has any work been done to improve the HubL flexibility in email templates since this post was made in 2018?&lt;/LI&gt;&lt;LI&gt;Is any&amp;nbsp;work to improve the HubL flexibility in email templates planned for the next month? 6 months?&lt;/LI&gt;&lt;/UL&gt;</description>
      <pubDate>Wed, 18 Mar 2020 14:21:42 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/326454#M31551</guid>
      <dc:creator>webmaestro</dc:creator>
      <dc:date>2020-03-18T14:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to send list of objects using single send APi</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/425512#M42276</link>
      <description>&lt;P&gt;I am also wondering if any work has been done to resolve this problem?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Same questions as above:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Has any work been done to improve the HubL flexibility in email templates since this post was made in 2018?&lt;/LI&gt;&lt;LI&gt;Is any&amp;nbsp;work to improve the HubL flexibility in email templates planned for the next month? 6 months?&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;This puts the burden on the developer to write custom html and send it via custom properties to the email template. This is especially burdensome to work across marketing/development departments any time a small change needs to made to an email template. I greatly appreciate any response in regards to this.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 14:09:03 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-to-send-list-of-objects-using-single-send-APi/m-p/425512#M42276</guid>
      <dc:creator>DMorrison7</dc:creator>
      <dc:date>2021-04-07T14:09:03Z</dc:date>
    </item>
  </channel>
</rss>

