Enrich industry

From TomGranot/hubspot-admin-skills · View interactive version

Enrich industry is an AI agent skill from the GitHub repository TomGranot/hubspot-admin-skills. Backfill contact-level industry from associated company records using a HubSpot workflow. Enables industry-based segmentation for targeted campaigns aligned with ICP verticals.

How to use this skill

Skill file

Enrich Contact Industry from Associated Company

Copy industry data from company records to their associated contacts. In a typical B2B CRM, company records have industry populated at high rates (80-90%) while contact records have almost none. This workflow bridges that gap automatically.

Why This Matters

Without industry on contact records, you cannot segment email campaigns by vertical. For B2B companies targeting specific industries, this makes the difference between spray-and-pray email blasts and targeted, relevant messaging. Industry data on contacts also feeds ICP tier classification and lead scoring models.

Prerequisites

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/enrich-industry/ in a clone of the repo).

| Stage | Script | Run with |

|-------|--------|----------|

| Before | CODE0 | uv run scripts/before.py |

| After | CODE0 | uv run scripts/after.py |

There is no execute script: the enrichment itself runs as a HubSpot workflow (see Execute below).

Plan

  1. Verify the contact Industry property exists and is compatible with the company Industry property
  2. Audit how many contacts can be enriched (before state)
  3. Build a workflow that copies industry from the associated company
  4. Verify enrichment results (after state)

Before

Check Property Compatibility

This is the most important pre-step. Contacts may have TWO industry properties: industry and industry_name. You must verify which one HubSpot uses for lists and reports.

  1. Go to Settings > Properties > Contact properties
  2. Search for "Industry"
  3. Note ALL industry-related properties on the contact object
  4. Check which property is used in existing lists, reports, and workflows
  5. The target property must be compatible with the company Industry property:

If no contact Industry property exists, create one:

Audit Enrichment Opportunity

Run uv run scripts/before.py. The core query:

resp = requests.post(f"{BASE}/crm/v3/objects/contacts/search", headers=HEADERS, json={
    "filterGroups": [{"filters": [
        {"propertyName": "industry", "operator": "NOT_HAS_PROPERTY"},
    ]}],
    "limit": 1,
})
print(f"Contacts missing industry: {resp.json()['total']}")

Also create a HubSpot list to estimate enrichable contacts:

Execute

Create the Enrichment Workflow

This workflow is nearly identical to the company name enrichment workflow. If you already built that one, clone it and swap the property references.

  1. Go to Automation > Workflows > Create workflow
  2. Select Contact-based > Blank workflow
  3. Name: AUTO-ENRICH: Copy Industry from Company

Enrollment trigger:

Re-enrollment:

Action: Copy property

Activate:

Note: Unlike the company name workflow, no delay is needed here. If the contact already has an associated company with industry data (checked by the enrollment trigger), the copy can happen immediately.

After

Wait 1-2 hours for the workflow to process, then verify: uv run scripts/after.py (re-runs the before-state query and compares against the baseline).

Verification checklist:

  1. Contact industry count should jump from near-zero to tens of thousands
  2. The enrichment list (missing industry + has company association) should be near 0
  3. Spot-check 20+ contacts for accuracy:
  1. Check that the industry distribution on contacts roughly mirrors the company industry distribution
  2. Check workflow history for failures — most common is property value mismatch (company has a value that does not match a dropdown option on the contact)

Rollback

External Providers

This skill only moves industry data the portal already has (company → contact). When the company itself has no industry value, that gap needs external data — see /waterfall-enrich-contacts for the provider-agnostic enrichment path, or HubSpot's Breeze Intelligence add-on for in-platform enrichment.

Key Technical Learnings

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.