Install
openclaw skills install @tomgranot/enrich-company-namePopulate missing contact company name fields from associated company records using a HubSpot workflow with optional API backfill. Ensures contacts inherit their company name for segmentation, personalization, and ICP classification.
openclaw skills install @tomgranot/enrich-company-namePopulate missing contact-level company name fields by copying the value from the associated company record. Uses a HubSpot workflow for ongoing enrichment and optionally an API backfill script for immediate results.
Contacts missing a company name cannot be matched to ICP-classified companies, break email personalization tokens, and are invisible to company-based segmentation. In a typical neglected CRM, 40-60% of contacts may be missing this field even though the vast majority have a company association.
Run a before-state audit to capture the baseline.
Script approach (recommended):
import os
from hubspot import HubSpot
from dotenv import load_dotenv
load_dotenv()
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# Count contacts missing company name
result = api_client.crm.contacts.search_api.do_search(
public_object_search_request={
"filterGroups": [{
"filters": [{
"propertyName": "company",
"operator": "NOT_HAS_PROPERTY"
}]
}],
"limit": 0
}
)
print(f"Contacts missing company name: {result.total}")
Manual approach: Go to Contacts > filter by Company name > is unknown. Record the count.
Save the count. This is your baseline for measuring success.
AUTO-ENRICH: Copy Company Name from AssociationEnrollment trigger:
Re-enrollment:
Action 1: Delay 10 minutes
Action 2: If/then branch
Activate:
Use this if you need the data populated immediately rather than waiting for workflow processing.
# Pattern: Fetch contacts missing company name,
# look up their associated company, copy the name
from hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
# 1. Search for contacts missing company name
# 2. For each, get associations to companies
# 3. Fetch the primary company's name
# 4. Batch update the contact's company property
Key API notes:
company NOT_HAS_PROPERTYcreatedate ranges if needed.crm.contacts.batch_api.updateWait 1-2 hours after activating the workflow (longer for very large databases), then verify.
Script approach:
# Same search as before-state script
result = api_client.crm.contacts.search_api.do_search(
public_object_search_request={
"filterGroups": [{
"filters": [{
"propertyName": "company",
"operator": "NOT_HAS_PROPERTY"
}]
}],
"limit": 0
}
)
print(f"Contacts still missing company name: {result.total}")
Verification checklist: