<?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: Get emails sent to contacts associated with a deal in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/842881#M67048</link>
    <description>&lt;P&gt;Sounds like this should work, I'll try it. Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 31 Aug 2023 06:46:23 GMT</pubDate>
    <dc:creator>DWesterholm</dc:creator>
    <dc:date>2023-08-31T06:46:23Z</dc:date>
    <item>
      <title>Get emails sent to contacts associated with a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/841811#M66953</link>
      <description>&lt;P&gt;I'm trying to extract, through the API endpoint&amp;nbsp;&lt;SPAN&gt;/crm/v3/objects/emails, one-on-one sales emails sent to contacts that are associated with a deal. I would also like, if possible, to filter on date ranges. Alternatively choose a pagination order that allows me to extract the latest X days.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm receiving the emails, with info and all, but I'm not sure how to get the "contact must be associated with a deal" correctly, or the date range.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Note, I'm not trying to extract marketing emails. Only one-on-one emails.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Aug 2023 13:34:35 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/841811#M66953</guid>
      <dc:creator>DWesterholm</dc:creator>
      <dc:date>2023-08-29T13:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Get emails sent to contacts associated with a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/842769#M67043</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/623228"&gt;@DWesterholm&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; Thanks for your question. You've hit upon a limitation. You'll need to look at breaking this up into multiple calls.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The endpoint you are referring to lacks the filtering capabilities you want, as you noted. And the Search API endpoints can do some-but-not-all of this, namely handling returning the associations in a single call while filtering the way you want or need to filter.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ideas for workarounds might include:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use a two-step approach: first, get the contacts associated with a deal, and then use those contact IDs to filter emails&lt;/LI&gt;
&lt;LI&gt;Filter the results client-side by iterating over the returned data and only including those emails that fall within the needed date range(s)&lt;/LI&gt;
&lt;LI&gt;Create a back-end process that aggregates this data over time, updating a data store with relevant emails and contacts&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;These all add layers of complexity and a&lt;SPAN&gt;re not as straightforward as a single API call with a simple filter parameter.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Wed, 30 Aug 2023 22:40:10 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/842769#M67043</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-08-30T22:40:10Z</dc:date>
    </item>
    <item>
      <title>Re: Get emails sent to contacts associated with a deal</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/842881#M67048</link>
      <description>&lt;P&gt;Sounds like this should work, I'll try it. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2023 06:46:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Get-emails-sent-to-contacts-associated-with-a-deal/m-p/842881#M67048</guid>
      <dc:creator>DWesterholm</dc:creator>
      <dc:date>2023-08-31T06:46:23Z</dc:date>
    </item>
  </channel>
</rss>

