# Lists v3 in Workflow custom code

**URL:** <https://community.hubspot.com/t/lists-v3-in-workflow-custom-code/112365>\
**Category:** APIs & Integrations\
**Tags:** professional\
**Created:** [July 18, 2024, 7:07pm UTC](https://community.hubspot.com/t/lists-v3-in-workflow-custom-code/112365 "2024-07-18T19:07:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hkrewson](https://avatars.discourse-cdn.com/v4/letter/h/9dc877/32.png) [@Hkrewson](https://community.hubspot.com/u/Hkrewson)\
**Post date:** [July 18, 2024, 7:07pm UTC](https://community.hubspot.com/t/lists-v3-in-workflow-custom-code/112365/1 "2024-07-18T19:07:40Z")

</div>

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.

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

`from hubspot.crm.lists import MembershipChangeRequest, ApiException`

I receive the following lambda\_warning.

`Unable to import module 'hubspotHandler': cannot import name 'lists' from 'hubspot.crm' (/opt/python/hubspot/crm/ __init__.py)`

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.

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [July 18, 2024, 10:00pm UTC](https://community.hubspot.com/t/lists-v3-in-workflow-custom-code/112365/2 "2024-07-18T22:00:46Z")

</div>

@Hkrewson - 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.

`response = requests.request("GET", propery_query_url, headers=headers)`

Best of luck!

Steve
