/hubspot-admin:assign-unowned-contactsfrom hubspot-admin
Assigns an owner to unowned marketing contacts in HubSpot, enabling proper lead routing, accountability, and accurate owner-based reporting.
Ships in hubspot-admin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Assign an owner to all marketing contacts that currently have no owner. Unowned contacts create gaps in reporting, prevent proper lead routing, and mean no one is accountable for follow-up on marketing-generated responses.
Marketing contacts without an owner are a blind spot. They receive campaigns but no one sees their responses. They appear in aggregate metrics but not in individual pipeline views. In owner-based dashboards and reports, they simply do not exist. For teams using round-robin or territory-based routing, unowned contacts bypass the entire system.
HUBSPOT_ACCESS_TOKEN in .env; an existing legacy private app token also works) with contact read/write and owners read scopesuvScript paths are relative to this skill's directory. Run them from your project directory so .env, data/, and reports/ resolve there: prefix each path with wherever this skill is installed (skills/assign-unowned-contacts/ in a clone of the repo).
| Stage | Script | Run with |
|---|---|---|
| Before | scripts/before.py | uv run scripts/before.py |
| Execute | scripts/execute.py | uv run scripts/execute.py |
| After | scripts/after.py | uv run scripts/after.py |
before.py counts unowned marketing contacts and lists available owners. execute.py batch-assigns them to HUBSPOT_TARGET_OWNER_ID (set in .env; safety threshold 50,000 — high because owner assignment is fully reversible). after.py verifies the count dropped to zero.
Before executing, collect the following information from the user:
Q1: Who should unowned contacts be assigned to?
Q2: Should we use territory-based routing, round-robin, or a single catch-all owner?
CLEANUP: Unowned Marketing ContactsRun uv run scripts/before.py. The core query:
resp = requests.post(f"{BASE}/crm/v3/objects/contacts/search", headers=HEADERS, json={
"filterGroups": [{"filters": [
{"propertyName": "hs_marketable_status", "operator": "EQ", "value": "true"},
{"propertyName": "hubspot_owner_id", "operator": "NOT_HAS_PROPERTY"},
]}],
"limit": 1,
})
print(f"Unowned marketing contacts: {resp.json()['total']}")
Choose one of these approaches (requires team lead approval):
Option A: Catch-All User (Simplest)
Option B: Territory/Region Rules
Option C: Round-Robin
For the catch-all strategy, this is fully scripted: set HUBSPOT_TARGET_OWNER_ID in .env (run before.py to see available owner IDs) and run uv run scripts/execute.py.
# What execute.py does:
# 1. POST /crm/v3/objects/contacts/search — unowned marketing contacts (paginated)
# 2. Build batch payload: {"inputs": [{"id": ..., "properties": {"hubspot_owner_id": OWNER_ID}}]}
# 3. POST /crm/v3/objects/contacts/batch/update in batches of 100
# For territory-based routing (extend the script):
# 1. Search for unowned marketing contacts with country/state/industry properties
# 2. Map each contact to an owner via your territory matrix
# 3. Batch update with the appropriate owner per contact
API notes:
GET /crm/v3/owners?limit=100emailWait 5-10 minutes for HubSpot to finish processing, then verify: uv run scripts/after.py (re-runs the before-state query and compares against the baseline; the count should be 0).
Verification checklist:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
40 skills in this plugin
/audit-api-usageInventory the integrations, service keys, legacy private apps, and internal tooling that call HubSpot APIs, and flag anything on legacy v1-v4 endpoints or legacy app architecture ahead of HubSpot's 2027 cutoffs. Produces a migration checklist to date-based API versions and service keys./backfill-geo-dataEnrich missing geographic data (country, state, city) on contacts and companies using HubSpot workflows, external data providers, or IP-based geolocation./bounce-monitoring-workflowBuild a workflow to protect sender reputation through automated bounce monitoring. Auto-suppresses contacts above a configurable bounce threshold, alerts on hard bounces, and flags high-bounce contacts for weekly manual review.npx claudepluginhub tomgranot/hubspot-admin-skills --plugin hubspot-adminOther plugins' skills for the same job