<?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 Can I Get Notes and Tasks from Deals in a Specific Pipeline? in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/734158#M59886</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/494647"&gt;@ColinFM&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; I have some thoughts, but no solutions. But I hope this will help you get moving.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One place to start is the &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank" rel="noopener"&gt;Search API endpoints&lt;/A&gt;. Based on similar posts and requests in the community, there is not a way to accomplish this in a single API call. I've seen examples where the approach is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;one call to get all companies currently in a specific pipeline&lt;/LI&gt;
&lt;LI&gt;one call to use the above returned companies and get their associated Notes (and use the&amp;nbsp;&lt;SPAN&gt;pseudo-property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;associations.{objectType}&lt;/CODE&gt;&amp;nbsp;as a filter group to get the associated Deals) –&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/search#search-through-associations" target="_blank" rel="noopener"&gt;Search through associations&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;one call to use the above returned companies and get their associated Tasks&amp;nbsp;(and use the&amp;nbsp;&lt;SPAN&gt;pseudo-property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;associations.{objectType}&lt;/CODE&gt;&amp;nbsp;as a filter group to get the associated Deals)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;My example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I created a Pipeline&lt;/LI&gt;
&lt;LI&gt;added two Deals to it&lt;/LI&gt;
&lt;LI&gt;one Deal has a Note&lt;/LI&gt;
&lt;LI&gt;one Deal has a Task&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Request to get Deals in that pipeline&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/deals/search

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "pipeline",
            "operator": "EQ",
            "value": "9877278"
          }
        ]
      }
    ]
  }&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "total": 2,
    "results": [
        {
            "id": "10937123156",
            "properties": {
                "amount": null,
                "closedate": "2022-11-30T22:22:15.603Z",
                "createdate": "2022-11-14T22:22:37.043Z",
                "dealname": "Bob's deal",
                "dealstage": "28363048",
                "hs_lastmodifieddate": "2022-11-14T22:23:40.579Z",
                "hs_object_id": "10937123156",
                "pipeline": "9877278"
            },
            "createdAt": "2022-11-14T22:22:37.043Z",
            "updatedAt": "2022-11-14T22:23:40.579Z",
            "archived": false
        },
        {
            "id": "11444440333",
            "properties": {
                "amount": null,
                "closedate": "2022-12-31T18:04:21.943Z",
                "createdate": "2022-12-22T18:05:04.754Z",
                "dealname": "Linda's Deal",
                "dealstage": "28363049",
                "hs_lastmodifieddate": "2022-12-22T18:05:08.627Z",
                "hs_object_id": "11444440333",
                "pipeline": "9877278"
            },
            "createdAt": "2022-12-22T18:05:04.754Z",
            "updatedAt": "2022-12-22T18:05:08.627Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Request to get Notes and associated Deals&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/notes/search
{
    "filters": [
        {
            "propertyName": "associations.deal",
            "operator": "IN",
            "values": [
                "10937123156", "11444440333"
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Response:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "total": 1,
    "results": [
        {
            "id": "27878348629",
            "properties": {
                "hs_createdate": "2022-11-14T22:23:39.457Z",
                "hs_lastmodifieddate": "2022-11-14T22:23:39.457Z",
                "hs_object_id": "27878348629"
            },
            "createdAt": "2022-11-14T22:23:39.457Z",
            "updatedAt": "2022-11-14T22:23:39.457Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;The same works for Tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Issues to work on — the response returns the hs_object_id of the Engagement and not the Associated Object. Perhaps there is a different way to filter and get that property returned instead of or in-addition-to the engagement ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sure there are other ways to tackle this, and hopefully the community will have additional suggestions as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
    <pubDate>Thu, 22 Dec 2022 18:58:28 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2022-12-22T18:58:28Z</dc:date>
    <item>
      <title>How Can I Get Notes and Tasks from Deals in a Specific Pipeline?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/733891#M59875</link>
      <description>&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to working with HubSpot's API's (relatively early on in my coding/developer journey, too, for what it's worth) and would love some help strategizing how to get specific information from the CRM. I'm using Python, FYI.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The info I want to grab via API: any/all&amp;nbsp;&lt;STRONG&gt;notes&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;tasks&lt;/STRONG&gt; associated with&amp;nbsp;&lt;STRONG&gt;deals&lt;/STRONG&gt; that are in specific&amp;nbsp;&lt;STRONG&gt;pipelines&lt;/STRONG&gt;&amp;nbsp;in a HubSpot account - and transform those results into .csv format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The current strategy we're using calls the &lt;A href="https://developers.hubspot.com/docs/api/crm/notes" target="_blank" rel="noopener"&gt;notes&lt;/A&gt; and &lt;A href="https://developers.hubspot.com/docs/api/crm/tasks" target="_blank" rel="noopener"&gt;tasks&lt;/A&gt; API's, using the basic "list" endpoints, then uses a conditional statement to filter for notes or tasks that are associated with deals, and then writes those filtered records to a .csv file. From there, our team can use the .csv to manually identify/match the deal ID's to those in the desired pipeline(s).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This method could work for our purpose here - but this particular CRM has a ton of notes and tasks in the account (both associated to deals and not), so this current strategy certainly doesn't feel efficient or ideal (since it first sifts through ALL notes / tasks, and then filters it down to only notes / tasks associated with deals before writing to .csv)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Long story short: I would love any advice or suggestions you may have on different (or similar) ways you would go about retrieving this specific data. The end goal is having two separate csv files - one that features any/all notes from all deals in a specific pipeline, and another that features any/all tasks from deals in a specific pipeline.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are there different endpoints to call, parameters to include in our GET request, or conditional statements in Python we should use to get these results in a more effecient and/or effective way?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance for any feedback or assistance any of you are willing to provide!&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 01:56:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/733891#M59875</guid>
      <dc:creator>ColinFM</dc:creator>
      <dc:date>2022-12-22T01:56:25Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Get Notes and Tasks from Deals in a Specific Pipeline?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/734158#M59886</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/494647"&gt;@ColinFM&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; I have some thoughts, but no solutions. But I hope this will help you get moving.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;One place to start is the &lt;A href="https://developers.hubspot.com/docs/api/crm/search" target="_blank" rel="noopener"&gt;Search API endpoints&lt;/A&gt;. Based on similar posts and requests in the community, there is not a way to accomplish this in a single API call. I've seen examples where the approach is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;one call to get all companies currently in a specific pipeline&lt;/LI&gt;
&lt;LI&gt;one call to use the above returned companies and get their associated Notes (and use the&amp;nbsp;&lt;SPAN&gt;pseudo-property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;associations.{objectType}&lt;/CODE&gt;&amp;nbsp;as a filter group to get the associated Deals) –&amp;nbsp;&lt;A href="https://developers.hubspot.com/docs/api/crm/search#search-through-associations" target="_blank" rel="noopener"&gt;Search through associations&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;one call to use the above returned companies and get their associated Tasks&amp;nbsp;(and use the&amp;nbsp;&lt;SPAN&gt;pseudo-property&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;CODE&gt;associations.{objectType}&lt;/CODE&gt;&amp;nbsp;as a filter group to get the associated Deals)&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;My example:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;I created a Pipeline&lt;/LI&gt;
&lt;LI&gt;added two Deals to it&lt;/LI&gt;
&lt;LI&gt;one Deal has a Note&lt;/LI&gt;
&lt;LI&gt;one Deal has a Task&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Request to get Deals in that pipeline&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/deals/search

{
    "filterGroups":[
      {
        "filters":[
          {
            "propertyName": "pipeline",
            "operator": "EQ",
            "value": "9877278"
          }
        ]
      }
    ]
  }&lt;/LI-CODE&gt;
&lt;P&gt;Response&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "total": 2,
    "results": [
        {
            "id": "10937123156",
            "properties": {
                "amount": null,
                "closedate": "2022-11-30T22:22:15.603Z",
                "createdate": "2022-11-14T22:22:37.043Z",
                "dealname": "Bob's deal",
                "dealstage": "28363048",
                "hs_lastmodifieddate": "2022-11-14T22:23:40.579Z",
                "hs_object_id": "10937123156",
                "pipeline": "9877278"
            },
            "createdAt": "2022-11-14T22:22:37.043Z",
            "updatedAt": "2022-11-14T22:23:40.579Z",
            "archived": false
        },
        {
            "id": "11444440333",
            "properties": {
                "amount": null,
                "closedate": "2022-12-31T18:04:21.943Z",
                "createdate": "2022-12-22T18:05:04.754Z",
                "dealname": "Linda's Deal",
                "dealstage": "28363049",
                "hs_lastmodifieddate": "2022-12-22T18:05:08.627Z",
                "hs_object_id": "11444440333",
                "pipeline": "9877278"
            },
            "createdAt": "2022-12-22T18:05:04.754Z",
            "updatedAt": "2022-12-22T18:05:08.627Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Request to get Notes and associated Deals&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;https://api.hubapi.com/crm/v3/objects/notes/search
{
    "filters": [
        {
            "propertyName": "associations.deal",
            "operator": "IN",
            "values": [
                "10937123156", "11444440333"
            ]
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;Response:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{
    "total": 1,
    "results": [
        {
            "id": "27878348629",
            "properties": {
                "hs_createdate": "2022-11-14T22:23:39.457Z",
                "hs_lastmodifieddate": "2022-11-14T22:23:39.457Z",
                "hs_object_id": "27878348629"
            },
            "createdAt": "2022-11-14T22:23:39.457Z",
            "updatedAt": "2022-11-14T22:23:39.457Z",
            "archived": false
        }
    ]
}&lt;/LI-CODE&gt;
&lt;P&gt;The same works for Tasks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Issues to work on — the response returns the hs_object_id of the Engagement and not the Associated Object. Perhaps there is a different way to filter and get that property returned instead of or in-addition-to the engagement ID.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am sure there are other ways to tackle this, and hopefully the community will have additional suggestions as well.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Thu, 22 Dec 2022 18:58:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/734158#M59886</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2022-12-22T18:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: How Can I Get Notes and Tasks from Deals in a Specific Pipeline?</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/943581#M71913</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074"&gt;@Jaycee_Lewis&lt;/a&gt;&amp;nbsp;This is really very helpful.&amp;nbsp;&lt;BR /&gt;Further I want to extend the filter by name as well. Do you have any idea how to do that?&lt;/P&gt;&lt;P&gt;For Example: Task under deal with task name or by it's status&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2024 05:41:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/How-Can-I-Get-Notes-and-Tasks-from-Deals-in-a-Specific-Pipeline/m-p/943581#M71913</guid>
      <dc:creator>RSingh9885</dc:creator>
      <dc:date>2024-03-14T05:41:46Z</dc:date>
    </item>
  </channel>
</rss>

