<?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: Programable Email &amp;amp; Displaying Associated Deals in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194449#M84027</link>
    <description>&lt;P&gt;Hi Jaycee, yes that is what I am looking to accomplish!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Aug 2025 18:01:05 GMT</pubDate>
    <dc:creator>NCiprich</dc:creator>
    <dc:date>2025-08-28T18:01:05Z</dc:date>
    <item>
      <title>Programable Email &amp; Displaying Associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194360#M84021</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;(Not a developer, but tasked to develop)&lt;BR /&gt;&lt;BR /&gt;I'm trying to create a programble email module that displays all the associated deals to the recipient that meet a few filter criteria. It doesn't need to look super nice, but all I need is a table that shows the deal claim number in one column and a hyperlink to a form with some of the fields dyncamically filled in the other column.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This is what I have so far, but nothing is rendering in the email tests I send myself. The fallback message is not even displaying. Hoping someone can please tell me what is wrong/missing, or if this can't work in email. &lt;BR /&gt;&lt;BR /&gt;In the design manager I'm seeing this warning:&amp;nbsp;&lt;BR /&gt;Warning: 9:1 DEAL objects can only be retrieved on membership or password-restricted pages&lt;BR /&gt;&lt;BR /&gt;I asked support about this and they ensured it should work in email and my code is the issue.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;{% set deal_ids = crm_associations(contact.hs_object_id, "HUBSPOT_DEFINED", 4) %}&lt;/P&gt;
&lt;P&gt;{% set matching_deals = [] %}&lt;BR /&gt;{% set cutoff_date = 1745020800000 %} {# 2025-04-19 in ms since epoch #}&lt;/P&gt;
&lt;P&gt;{% for deal_id in deal_ids %}&lt;BR /&gt;{% set deal = crm_object("deal", deal_id, &lt;BR /&gt;"dealname,hubspot_auto_msa_trigger,referral_date,status,dyn365_opportunity_id,claim_number") &lt;BR /&gt;%}&lt;/P&gt;
&lt;P&gt;{# Ensure referral_date exists and is BEFORE cutoff #}&lt;BR /&gt;{% if deal.hubspot_auto_msa_trigger == "Auto-MSA Start"&lt;BR /&gt;and deal.status == "Open"&lt;BR /&gt;and deal.referral_date and deal.referral_date|int &amp;lt; cutoff_date %}&lt;BR /&gt;{% do matching_deals.append(deal) %}&lt;BR /&gt;{% endif %}&lt;/P&gt;
&lt;P&gt;{% if matching_deals|length &amp;gt;= 10 %}&lt;BR /&gt;{% break %}&lt;BR /&gt;{% endif %}&lt;BR /&gt;{% endfor %}&lt;/P&gt;
&lt;P&gt;{% if matching_deals|length &amp;gt; 0 %}&lt;BR /&gt;&amp;lt;table style="width:100%; border-collapse: collapse;"&amp;gt;&lt;BR /&gt;&amp;lt;thead&amp;gt;&lt;BR /&gt;&amp;lt;tr&amp;gt;&lt;BR /&gt;&amp;lt;th style="border: 1px solid #ccc; padding: 8px; text-align: left;"&amp;gt;Deal Name&amp;lt;/th&amp;gt;&lt;BR /&gt;&amp;lt;th style="border: 1px solid #ccc; padding: 8px; text-align: left;"&amp;gt;Case Update Link&amp;lt;/th&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;&amp;lt;/thead&amp;gt;&lt;BR /&gt;&amp;lt;tbody&amp;gt;&lt;BR /&gt;{% for deal in matching_deals %}&lt;BR /&gt;&amp;lt;tr&amp;gt;&lt;BR /&gt;&amp;lt;td style="border: 1px solid #ccc; padding: 8px;"&amp;gt;{{ deal.dealname }}&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;td style="border: 1px solid #ccc; padding: 8px;"&amp;gt;&lt;BR /&gt;&amp;lt;a href="&lt;A href="https://hubspotformplaceholder.com/case-update/?id=" target="_blank" rel="noopener"&gt;https://hubspotformplaceholder.com/case-update/?id=&lt;/A&gt;{{ deal.dyn365_opportunity_id }}&amp;amp;claim_number={{ deal.claim_number }}" target="_blank"&amp;gt;&lt;BR /&gt;Update Case&lt;BR /&gt;&amp;lt;/a&amp;gt;&lt;BR /&gt;&amp;lt;/td&amp;gt;&lt;BR /&gt;&amp;lt;/tr&amp;gt;&lt;BR /&gt;{% endfor %}&lt;BR /&gt;&amp;lt;/tbody&amp;gt;&lt;BR /&gt;&amp;lt;/table&amp;gt;&lt;BR /&gt;{% else %}&lt;BR /&gt;&amp;lt;p&amp;gt;No matching deals found.&amp;lt;/p&amp;gt;&lt;BR /&gt;{% endif %}&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 15:06:17 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194360#M84021</guid>
      <dc:creator>NCiprich</dc:creator>
      <dc:date>2025-08-28T15:06:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programable Email &amp; Displaying Associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194407#M84022</link>
      <description>&lt;P&gt;Are you sure the Association ID is 4?&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{% set deal_ids = crm_associations(contact.hs_object_id, "HUBSPOT_DEFINED", 4) %}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 16:23:00 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194407#M84022</guid>
      <dc:creator>Adesignl</dc:creator>
      <dc:date>2025-08-28T16:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Programable Email &amp; Displaying Associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194432#M84025</link>
      <description>&lt;P&gt;Everything i've read says 4 is the association id between the standard contacts and deals. I'm not sure how to confirm that, but I know we are using standard contacts and deals.&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 17:12:08 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194432#M84025</guid>
      <dc:creator>NCiprich</dc:creator>
      <dc:date>2025-08-28T17:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: Programable Email &amp; Displaying Associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194446#M84026</link>
      <description>&lt;P&gt;Hey, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/348539"&gt;@NCiprich&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Is this close to the outcome you are after?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG style="width:37.66%;" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/hubspot.response.lithium.com/RESPONSEIMAGE/6826533e-dde7-4f12-8d35-181fa8a5ea40.default/CleanShot%202025-08-28%20at%2011.33.27%402x.png" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Talk soon! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 17:55:22 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194446#M84026</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2025-08-28T17:55:22Z</dc:date>
    </item>
    <item>
      <title>Re: Programable Email &amp; Displaying Associated Deals</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194449#M84027</link>
      <description>&lt;P&gt;Hi Jaycee, yes that is what I am looking to accomplish!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Aug 2025 18:01:05 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Programable-Email-amp-Displaying-Associated-Deals/m-p/1194449#M84027</guid>
      <dc:creator>NCiprich</dc:creator>
      <dc:date>2025-08-28T18:01:05Z</dc:date>
    </item>
  </channel>
</rss>

