From hubspot-admin
Remove non-employee users from HubSpot and reassign their orphaned contacts, companies, and deals. Pairs with the assign-unowned-contacts skill for comprehensive ownership cleanup.
npx claudepluginhub tomgranot/hubspot-admin-skillsThis skill uses the workspace's default tool permissions.
Remove departed employees from HubSpot and reassign their CRM records. Orphaned records with no active owner fall through the cracks.
Reassign contacts and companies from deactivated team members to active owners. Fully automated via the HubSpot Owners API and Batch Update API. Includes territory analysis for informed reassignment decisions.
Interact with HubSpot CRM and CMS REST APIs to manage contacts, companies, deals, owners, and content via curl commands.
Implements HubSpot GDPR/CCPA contact deletion, data export for DSAR, and privacy ops using CRM APIs. For compliance in integrations.
Share bugs, ideas, or general feedback.
Remove departed employees from HubSpot and reassign their CRM records. Orphaned records with no active owner fall through the cracks.
.envhubspot-api-client installed via uvfrom hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# Get all owners including deactivated
active_owners = api_client.crm.owners.owners_api.get_page(limit=100)
deactivated_owners = api_client.crm.owners.owners_api.get_page(
limit=100, archived=True
)
Cross-reference with your current employee list. Flag:
For each flagged owner, count how many contacts, companies, and deals they own.
Reassign records owned by non-employees:
Deactivate users who are no longer employees (requires Super Admin in HubSpot Settings > Users & Teams).
Run /assign-unowned-contacts after reassignment to catch any records that ended up without an owner.
hubspot_owner_id matches any deactivated owner ID — count should be zero.hubspot_owner_id back to the original value./assign-unowned-contacts for comprehensive ownership hygiene.