← 返回 Skills 市场
tomgranot

Enrich Company Name

作者 TomGranot · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
91
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install enrich-company-name
功能描述
Populate missing contact company name fields from associated company records using a HubSpot workflow with optional API backfill. Ensures contacts inherit th...
使用说明 (SKILL.md)

Enrich Contact Company Name from Associated Company

Populate 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.

Why This Matters

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.

Prerequisites

  • HubSpot Marketing Hub Professional or Sales Hub Professional (for Workflows)
  • Phase 1 hygiene processes completed (invalid/deleted contacts removed first)
  • HubSpot auto-association enabled: Settings > Objects > Companies > "Create and associate companies with contacts" toggle must be ON. This lets HubSpot automatically create company records from email domains and associate them.

Plan

  1. Enable auto-association if not already on
  2. Audit how many contacts are missing company name (before state)
  3. Build a workflow that copies company name from the associated company record
  4. Optionally run an API backfill script for immediate results
  5. Verify enrichment results (after state)

Before State

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.

Execute

Method 1: HubSpot Workflow (Recommended — Handles Backlog + Future)

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

Enrollment trigger:

  • Contact property > Company name > is unknown

Re-enrollment:

  • Enable re-enrollment when associated company changes. This is the safety net: if an association forms after the workflow already ran, the contact gets re-enrolled.

Action 1: Delay 10 minutes

  • This delay is critical. When a new contact enters HubSpot, the auto-association engine needs time to parse the email domain, find or create a matching company, and create the association. Without this delay, the workflow checks for an association before one exists.

Action 2: If/then branch

  • Condition: Associated company > Company name (or Name) > is known
  • YES branch: Add a Copy property action:
    • Copy FROM: Company > Name
    • Copy TO: Contact > Company name
  • NO branch: Leave empty (contact exits). These are typically contacts with personal email addresses (gmail, yahoo, etc.) where no company can be determined.

Activate:

  • Click Review > Turn on
  • When prompted, select Yes, enroll existing contacts. This enrolls the entire backlog.

Method 2: API Backfill Script (Optional — Immediate Results)

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:

  • Use the Search API to find contacts where company NOT_HAS_PROPERTY
  • Search API caps at 10,000 results. Segment by createdate ranges if needed.
  • Use Associations API v4 to get contact-to-company associations
  • Batch update contacts using crm.contacts.batch_api.update
  • Respect rate limits: 100 requests per 10 seconds

Why Do Both?

  • The workflow handles both backlog (enrolled on activation) AND future contacts automatically. It is the long-term solution.
  • The API backfill provides immediate results if you cannot wait for workflow processing (which may take hours for large databases).
  • If you only do the workflow, that is perfectly fine. It will process the backlog since existing contacts meeting the trigger criteria get enrolled on activation.

After State

Wait 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:

  1. The "missing company name" count should have dropped dramatically (typically from 40-60% to under 10%)
  2. Remaining contacts without company names should primarily be those with personal email addresses (gmail.com, yahoo.com, etc.)
  3. Spot-check 10-20 contacts to confirm the company name matches their associated company record
  4. Check workflow history for errors:
    • Property type mismatch (copying to wrong field type)
    • Multiple associated companies (HubSpot uses the primary company)
  5. Verify the workflow continues processing new contacts by checking for recent enrollments

Key Technical Learnings

  • The 10-minute delay is a balance. Auto-association typically completes in a few minutes, but 10 minutes provides a comfortable buffer. If many contacts go down the NO branch and later get associations, increase to 15-20 minutes.
  • Re-enrollment is the safety net. Even if the delay is not long enough, re-enrollment on "associated company changes" catches late associations. The delay handles the common case; re-enrollment handles edge cases.
  • Primary company wins. If a contact is associated with multiple companies, HubSpot copies from the primary associated company. Verify primary associations are correct for key contacts.
  • This workflow does NOT overwrite existing values. The enrollment trigger requires "Company name is unknown", so contacts with an existing company name are never touched.
  • Property type matters. Contact "Company name" is a single-line text field by default. If someone changed it to a dropdown, the copy action may fail. Check in Settings > Properties before running.
  • Personal email domains exit on the NO branch. Contacts with gmail.com, yahoo.com, hotmail.com, outlook.com, etc. will not get enriched. This is expected. They need manual enrichment or a third-party tool (ZoomInfo, Clearbit, Apollo) to determine their company.
  • Company name is a prerequisite for ICP Tier classification. Run this enrichment before creating ICP Tier workflows.
  • Schedule the "after" verification script. Workflow processing for large databases takes time. Do not check results immediately — schedule the verification for 2-4 hours after activation.
安全使用建议
This skill is coherent with its purpose (copying company names into contacts via HubSpot), but you should not install blindly. Before running: 1) Provide a HubSpot API token with minimum required scopes and confirm which env var name the runtime expects (the script uses HUBSPOT_ACCESS_TOKEN while SKILL.md shows HUBSPOT_API_TOKEN). 2) Inspect or avoid using a shared ../.env file: the scripts load a .env from the repository parent and could read unrelated secrets — move the HubSpot token into a dedicated, minimal env or set it in your environment directly. 3) Run these scripts and enable the workflow first in a HubSpot test/dev portal or a small subset of contacts to verify behavior and rate-limit handling. 4) Confirm you are comfortable granting the token read (and if backfill is performed, write) access to your HubSpot data. If you want this skill to be less error-prone, ask the author to (a) declare the required env var in the metadata, (b) use a single consistent env var name in docs and code, and (c) avoid loading ../.env by default or make the path configurable.
功能分析
Type: OpenClaw Skill Name: enrich-company-name Version: 1.0.0 The skill bundle is a legitimate tool for HubSpot CRM data enrichment, designed to populate missing contact company names from associated company records. The provided Python scripts (scripts/before.py and scripts/after.py) and the instructions in SKILL.md are transparent, well-documented, and perform only the stated auditing and verification tasks using standard HubSpot API calls. No evidence of data exfiltration, malicious execution, or prompt injection was found.
能力评估
Purpose & Capability
The name, description, SKILL.md, and included scripts all focus on HubSpot contact/company enrichment — the requested network calls and API endpoints match the stated purpose. However, the skill package does not declare any required environment variables even though the scripts need a HubSpot access token.
Instruction Scope
SKILL.md instructs creating a HubSpot workflow and optionally running API scripts, which is appropriate. But the docs and code use inconsistent environment variable names (SKILL.md examples reference HUBSPOT_API_TOKEN while the scripts use HUBSPOT_ACCESS_TOKEN). The scripts load a .env file from the repository parent (load_dotenv(os.path.join(..., '..', '.env'))), which may access unrelated secrets stored in that file — this is out-of-scope for a simple enrichment task and worth attention.
Install Mechanism
This is an instruction-only skill with no install spec; the included Python scripts list dependencies in comments (requests, python-dotenv). No remote downloads or obscure install steps are present.
Credentials
The scripts require a single HubSpot bearer token (proportional for API access) but the registry metadata declares no required env vars or primary credential. The mismatch in env var names (HUBSPOT_API_TOKEN vs HUBSPOT_ACCESS_TOKEN) is confusing and may cause users to expose the wrong token. Additionally, the scripts explicitly load ../.env which could read other secrets from a project-level .env file — this broad file access is disproportionate unless the user intends it.
Persistence & Privilege
The skill is not always-enabled and does not request persistent platform privileges. It writes small CSV audit files into its scripts folder, which is expected for local audit trails and not a platform-wide persistence concern.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install enrich-company-name
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /enrich-company-name 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
- Initial release of "enrich-company-name" skill for HubSpot. - Populates missing contact company name fields from associated company records via a HubSpot workflow. - Provides detailed instructions for both workflow-based and optional API backfill enrichment. - Ensures contacts inherit a company name for improved segmentation, personalization, and ICP classification. - Includes before/after state audit scripts and best practices for setup and verification.
元数据
Slug enrich-company-name
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Enrich Company Name 是什么?

Populate missing contact company name fields from associated company records using a HubSpot workflow with optional API backfill. Ensures contacts inherit th... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 91 次。

如何安装 Enrich Company Name?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install enrich-company-name」即可一键安装,无需额外配置。

Enrich Company Name 是免费的吗?

是的,Enrich Company Name 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Enrich Company Name 支持哪些平台?

Enrich Company Name 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Enrich Company Name?

由 TomGranot(@tomgranot)开发并维护,当前版本 v1.0.0。

💬 留言讨论