Reassign Contacts From Deactivated Owners
Purpose
When team members leave an organization, their HubSpot-owned contacts and companies become orphaned. Leads are not being worked, accounts are not being managed, and any automation that relies on Contact owner or Company owner routes to dead ends. This skill identifies deactivated owners, analyzes their contact portfolios, and batch-reassigns ownership via the API.
Prerequisites
- A HubSpot service key (
HUBSPOT_ACCESS_TOKENin.env; an existing legacy private app token also works) withcrm.objects.contacts.read,crm.objects.contacts.write,crm.objects.companies.read,crm.objects.companies.write, andcrm.objects.owners.readscopes - Python 3.10+ with
uvfor package management - A
.envfile containingHUBSPOT_ACCESS_TOKEN - A decision from team leadership on the reassignment strategy (see Plan stage)
Scripts
Script 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/reassign-deactivated-owners/ in a clone of the repo).
| Stage | Script | Run with |
|-------|--------|----------|