<?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: Lists v3 in Workflow custom code in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Lists-v3-in-Workflow-custom-code/m-p/1012435#M75123</link>
    <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/304664"&gt;@Hkrewson&lt;/a&gt;&amp;nbsp;- when I ran up against such version issues (likely cause for a new API) with HubSpot libraries in the past, I simply dropped down to the use of Python requests() functionality, constructing the URLs using basic code. I haven't looked back since then, and do all my work at this basic call/response level. It also turns out to be easier to debug in many instances with fewer layers to interpret.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;response = requests.request("GET", propery_query_url, headers=headers)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best of luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 18 Jul 2024 22:00:46 GMT</pubDate>
    <dc:creator>SteveHTM</dc:creator>
    <dc:date>2024-07-18T22:00:46Z</dc:date>
    <item>
      <title>Lists v3 in Workflow custom code</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Lists-v3-in-Workflow-custom-code/m-p/1012350#M75119</link>
      <description>&lt;P&gt;Greetings. I have a custom object workflow that will enroll on a property being known. My end goal with the workflow is to use an email property on the custom object, locate a contact, and add that contact to a static list.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code (python 3.9) works for the search, and can return the ID just fine. When I add an import for the v3 lists endpoint&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;from hubspot.crm.lists import MembershipChangeRequest, ApiException&lt;/PRE&gt;&lt;P&gt;I receive the following lambda_warning.&lt;/P&gt;&lt;PRE&gt;Unable to import module 'hubspotHandler': cannot import name 'lists' from 'hubspot.crm' (/opt/python/hubspot/crm/__init__.py)&lt;/PRE&gt;&lt;P&gt;The private app in use has the scopes for crm.lists.read and crm.lists.write. Is this just not implimented in workflow custom code.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 19:08:21 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Lists-v3-in-Workflow-custom-code/m-p/1012350#M75119</guid>
      <dc:creator>Hkrewson</dc:creator>
      <dc:date>2024-07-18T19:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: Lists v3 in Workflow custom code</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Lists-v3-in-Workflow-custom-code/m-p/1012435#M75123</link>
      <description>&lt;P&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/304664"&gt;@Hkrewson&lt;/a&gt;&amp;nbsp;- when I ran up against such version issues (likely cause for a new API) with HubSpot libraries in the past, I simply dropped down to the use of Python requests() functionality, constructing the URLs using basic code. I haven't looked back since then, and do all my work at this basic call/response level. It also turns out to be easier to debug in many instances with fewer layers to interpret.&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;response = requests.request("GET", propery_query_url, headers=headers)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best of luck!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jul 2024 22:00:46 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Lists-v3-in-Workflow-custom-code/m-p/1012435#M75123</guid>
      <dc:creator>SteveHTM</dc:creator>
      <dc:date>2024-07-18T22:00:46Z</dc:date>
    </item>
  </channel>
</rss>

