Install
openclaw skills install @tomgranot/create-segment-listsCreate business segment lists in HubSpot for customers, partners, competitors, employees, ICP tiers, and industries. Enables segment-based targeting, suppression, and analytics.
openclaw skills install @tomgranot/create-segment-listsBuild a library of segment lists that enable targeted marketing, accurate reporting, and proper suppression. These lists form the foundation of segment-based operations.
.envhubspot-api-client installed via uv/create-icp-tiers first)/fix-lifecycle-stages first)Before executing, collect the following information from the user:
Q1: What are your key customer segments?
Q2: What engagement criteria define "active" for your business?
| List Name | Type | Criteria |
|---|---|---|
| All Customers | Active | Lifecycle stage = Customer |
| All Partners | Active | Contact type = Partner (or custom property) |
| Competitors | Static | Manually curated from known competitor domains |
| Internal Employees | Active | Email domain matches company domain |
| Suppressed Contacts | Active | Marketing status = non-marketing OR globally unsubscribed |
| List Name | Type | Criteria |
|---|---|---|
| ICP Tier 1 | Active | ICP tier property = Tier 1 |
| ICP Tier 2 | Active | ICP tier property = Tier 2 |
| ICP Tier 3 | Active | ICP tier property = Tier 3 |
| Non-ICP | Active | ICP tier property = Non-ICP or unknown |
| List Name | Type | Criteria |
|---|---|---|
| [Industry Name] | Active | Industry = [value] |
| (Create one per target industry) |
| List Name | Type | Criteria |
|---|---|---|
| Highly Engaged (90 days) | Active | Email open or click in last 90 days |
| Disengaged (6+ months) | Active | No email engagement in 180+ days |
| Never Engaged | Active | No email opens ever AND created 30+ days ago |
Use the Lists API to create active (smart) lists:
from hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# Example: Create "All Customers" list
api_client.crm.lists.lists_api.create(
list_create_request={
"name": "All Customers",
"objectTypeId": "0-1", # contacts
"processingType": "DYNAMIC",
"filterBranch": {
"filterBranchType": "OR",
"filters": [{
"filterType": "PROPERTY",
"property": "lifecyclestage",
"operation": {
"operationType": "ENUMERATION",
"operator": "IS_EQUAL_TO",
"value": "customer"
}
}]
}
}
)
Create each list, verify member count, and document the list ID.
For static lists (Competitors), create the list and manually add contacts or import from a CSV.
[Category] - Segment Name (e.g., [ICP] - Tier 1, [Industry] - Manufacturing).