new-contact-hygiene-workflow
À propos
Cette compétence de workflow HubSpot enrichit automatiquement les nouveaux contacts en définissant leur étape de cycle de vie et en copiant les données de l'entreprise à partir des enregistrements associés. Elle inclut des branchements conditionnels basés sur l'exhaustivité des données, mais doit être construite manuellement dans l'interface HubSpot en raison des limitations de l'API pour les conditions "est inconnu" et les actions de copie. Utilisez-la pour les développeurs ayant besoin de mettre en œuvre la mise en scène initiale des contacts et l'automatisation de l'hygiène des données.
Installation rapide
Claude Code
Recommandénpx skills add TomGranot/hubspot-admin-skills -a claude-code/plugin add https://github.com/TomGranot/hubspot-admin-skillsgit clone https://github.com/TomGranot/hubspot-admin-skills.git ~/.claude/skills/new-contact-hygiene-workflowCopiez et collez cette commande dans Claude Code pour installer cette compétence
Documentation
New Contact Hygiene Workflow
Build a workflow that automatically enriches every new contact at creation time. This ensures contacts enter the database with a lifecycle stage, company name, and industry before any human touches them.
Why This Cannot Be Fully Automated via API
Three HubSpot API limitations prevent full automation:
- "Is unknown" branch conditions are not supported programmatically — the Workflows API cannot create branches that check whether a property has never been set.
- Copy from associated object actions (e.g., copy company name from the associated company) are not available via API.
- Workflows API v4 is beta and unstable — production workflows should not depend on it.
You have three options for building this workflow, described below.
Building the Workflow: Three Options
Option 1: Manual UI Build
Follow the step-by-step instructions in the "Execute" section below. This is the most reliable method and gives you full control over every trigger, branch, and action.
Option 2: HubSpot Breeze AI
HubSpot's built-in Breeze AI can generate a workflow skeleton from a natural language prompt. Navigate to Automation > Workflows > Create workflow > "Describe what you want" and paste the following prompt:
Create a contact-based workflow that triggers when a contact is created. It should:
1. Set the lifecycle stage to "Lead" if it is empty
2. Copy the company name from the associated company to the contact's Company property
3. Copy the industry from the associated company to the contact's Industry property
4. Wait a short delay (3-10 minutes, recommended: 5)
5. Check if the contact's Company property is still empty — if yes, send an internal notification to the admin saying the contact has no company association
CRITICAL WARNING: Breeze trigger limitations. Breeze creates event-based triggers (OR logic) instead of filter-based triggers (AND logic). After Breeze creates the workflow, you MUST manually verify and fix the trigger/enrollment conditions in the UI. Breeze is best used for creating the workflow skeleton (actions, branches, delays) -- the trigger conditions almost always need manual correction.
Additional Breeze limitations for this workflow:
- Breeze cannot create "is unknown" branch conditions -- you must add these manually
- Breeze cannot create "copy property from associated object" actions -- you must add these manually
- Breeze cannot configure re-enrollment rules
Given these limitations, Breeze provides minimal value for this particular workflow. Manual build (Option 1) is recommended.
Option 3: Claude Anthropic Chrome Extension
The Claude Anthropic Chrome extension lets Claude see and interact with the HubSpot workflow builder UI directly. You can describe the workflow logic in natural language and Claude will click through the UI to build it. This is often more accurate than Breeze for complex workflows because Claude can verify each step visually, including "is unknown" branch conditions and copy-from-association actions that Breeze cannot handle.
To use this approach:
- Open the HubSpot workflow builder in Chrome (Automation > Workflows > Create workflow)
- Activate the Claude Chrome extension
- Describe the workflow using the design diagram and instructions from this skill
Note on Fast Mode: If you're using Claude Code's Fast Mode to speed up workflow creation, be aware of the billing model: Haiku usage is included in your subscription, but Opus in Fast Mode consumes extra credits. For workflow building tasks (which are UI-heavy and may require many interactions), consider whether the speed tradeoff is worth the credit cost.
Prerequisites
- HubSpot Marketing Professional or Enterprise plan
- Workflow creation permissions in HubSpot
- Company association enrichment completed (run
/enrich-company-nameand/enrich-industryfirst for existing contacts)
Workflow Design
TRIGGER: Contact create date is known
(fires for every new contact)
│
▼
┌─────────────────────────┐
│ Set lifecycle stage │
│ = "Lead" (if empty) │
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ Copy company name from │
│ associated company │
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ Copy industry from │
│ associated company │
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ Delay: short wait │
│ (3-10 min, rec: 5) │
└────────────┬────────────┘
│
▼
┌─────────────────────────┐
│ IF/THEN BRANCH: │
│ Company name is unknown? │
├──────────┬──────────────┘
│ YES │ NO
│ │
▼ ▼
Retry Continue
copy (enriched)
+ notify
admin
Step-by-Step Build Instructions
Stage 1: Before — Verify Prerequisites
- Confirm company enrichment processes have run for existing data.
- Open HubSpot > Automation > Workflows > Create workflow.
- Select "Contact-based" workflow, start from scratch.
Stage 2: Execute — Build the Workflow
-
Set enrollment trigger:
- Property: "Create date" > "is known"
- This enrolls every new contact automatically.
-
Add action: Set property value
- Property: "Lifecycle stage"
- Value: "Lead"
- Condition: Only if lifecycle stage is unknown (use an if/then branch before this step, or rely on HubSpot's "only if empty" option if available in your plan).
-
Add action: Copy property
- Source: Associated company > "Company name"
- Target: Contact > "Company" property
-
Add action: Copy property
- Source: Associated company > "Industry"
- Target: Contact > "Industry" property
-
Add delay: a short delay (3-10 minutes, recommended: 5)
- Purpose: Allow time for company associations to sync (especially for form submissions or integrations that create contacts before associating them). Adjust the duration based on how quickly your integrations typically create associations.
-
Add if/then branch:
- Condition: Contact "Company" property is unknown
- YES branch: Add internal notification to CRM admin — "New contact {firstname} {lastname} ({email}) has no company association after enrichment attempt."
- NO branch: No further action needed (contact is enriched).
-
Review settings:
- Re-enrollment: OFF (each contact should only go through this once)
- Unenrollment: None needed
- Time zone: Not applicable (no time-based actions beyond delay)
-
Turn on the workflow.
Stage 3: After — Verify
- Create a test contact manually. Confirm:
- Lifecycle stage is set to "Lead"
- Company name copied from associated company
- Industry copied from associated company
- Create a test contact with no company association. Confirm:
- Admin notification fires after the configured delay
- Check workflow history for any errors in the first 24 hours.
Stage 4: Rollback
- Turn off the workflow in HubSpot > Automation > Workflows.
- Contacts already enriched retain their values — no destructive changes to undo.
- If lifecycle stages were set incorrectly, use the Search API to find contacts created after the workflow activation date and reset as needed.
Edge Cases
- Contacts created via import: These fire the trigger. If imports include company name/industry, the copy action will overwrite with the associated company's values. Consider excluding imported contacts via a list filter.
- Contacts without company associations: The copy action silently fails. The branch handles notification.
- Multiple associated companies: HubSpot copies from the primary associated company only.
Dépôt GitHub
Compétences associées
content-collections
MétaCette compétence propose une configuration éprouvée en production pour Content Collections, un outil axé sur TypeScript qui transforme des fichiers Markdown/MDX en collections de données typées de manière sûre avec une validation Zod. Utilisez-la lors de la création de blogs, de sites de documentation ou d'applications Vite + React riches en contenu pour garantir la sécurité de typage et la validation automatique du contenu. Elle couvre tout, de la configuration du plugin Vite et de la compilation MDX à l'optimisation des déploiements et la validation des schémas.
polymarket
MétaCette compétence permet aux développeurs de créer des applications avec la plateforme de marchés prédictifs Polymarket, incluant l'intégration d'API pour le trading et les données de marché. Elle fournit également une diffusion de données en temps réel via WebSocket pour surveiller les transactions en direct et l'activité du marché. Utilisez-la pour mettre en œuvre des stratégies de trading ou pour créer des outils traitant les mises à jour de marché en direct.
creating-opencode-plugins
MétaCette compétence aide les développeurs à créer des plugins OpenCode qui s'interconnectent avec plus de 25 types d'événements tels que les commandes, les fichiers et les opérations LSP. Elle fournit la structure du plugin, les spécifications de l'API événementielle et les modèles d'implémentation pour les modules JavaScript/TypeScript. Utilisez-la lorsque vous avez besoin d'intercepter, de surveiller ou d'étendre le cycle de vie de l'assistant IA OpenCode avec une logique personnalisée pilotée par les événements.
sglang
MétaSGLang est un framework de service LLM haute performance spécialisé dans la génération rapide et structurée pour les workflows JSON, regex et agentiques grâce à son cache de préfixe RadixAttention. Il offre une inférence nettement plus rapide, particulièrement pour les tâches avec des préfixes répétés, ce qui le rend idéal pour les sorties complexes et structurées ainsi que les conversations multi-tours. Choisissez SGLang plutôt que des alternatives comme vLLM lorsque vous avez besoin d'un décodage contraint ou que vous construisez des applications avec un partage étendu de préfixes.
