/hubspot-admin:engagement-suppression-workflowfrom hubspot-admin
Builds a two-tier sunset workflow in HubSpot that re-engages dormant contacts via a campaign before suppressing them, protecting email deliverability.
Ships in hubspot-admin. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Build a two-tier sunset system that protects email deliverability while giving disengaged contacts a fair chance to re-engage before suppression.
Suppressing contacts immediately after inactivity is aggressive and loses potential re-activations. A two-tier approach:
This preserves deliverability scores while maximizing the recoverable audience.
HUBSPOT_ACCESS_TOKEN in .env; an existing legacy private app token also works) with the automation scope (for the API path)uvengagement_flag — the execute script creates it if missing)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/engagement-suppression-workflow/ in a clone of the repo).
| Stage | Script | Run with |
|---|---|---|
| Before | scripts/before.py | uv run scripts/before.py |
| Execute | scripts/execute.py | uv run scripts/execute.py |
| After | scripts/after.py | uv run scripts/after.py |
before.py inventories existing workflows and checks for name collisions. execute.py creates the engagement_flag property (if missing) and both sunset workflows via POST /automation/v4/flows — always disabled, for review in the UI before enabling. after.py verifies they exist and reports enabled state.
TRIGGER: Last engagement date > [sunset window] ago
AND email is known
AND not globally unsubscribed
AND [suppression status property] is unknown
│
▼
┌────────────────────┐
│ Set [status prop] │
│ = "re-engagement │
│ sent" │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ Enroll in │
│ re-engagement │
│ campaign/sequence │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ Delay: [re-engage │
│ window] days │
└────────┬───────────┘
│
▼
┌────────────────────┐
│ IF/THEN BRANCH: │
│ Any engagement in │
│ re-engage window? │
├──────────┬─────────┘
│ YES │ NO
│ │
▼ ▼
Clear Set [status prop]
status = "suppressed"
prop + set non-marketing
API status: HubSpot documents the Workflows API as beta and subject to change. Its current reference is the date-based beta path /automation/v4/2027-03-beta/flows; this skill's scripts still call the unversioned /automation/v4/flows path, which v4's end of support on March 30, 2027 also covers. Creating workflows disabled and reviewing them in the UI is what makes a beta API acceptable here. If a script's create call starts failing, the manual UI build below is the fallback.
The v4 Automation API supports creating workflows programmatically. Instead of one workflow with an if/then branch, the script decomposes the design into two linear workflows — which the API expresses cleanly and which are easier to reason about:
engagement_flag = "re-engagement sent".Run the scripts (configure SUNSET_DAYS, REENGAGE_DAYS, FLAG_PROPERTY in execute.py first):
uv run scripts/before.py
uv run scripts/execute.py
Safety model: both workflows are created with isEnabled: false. Review them in Automation > Workflows, then:
Payload notes: the scripts use documented v4 action types (0-5 set property; 0-31 set marketing contact status, with automatic fallback if your portal rejects its undocumented field shape). If a filter shape is rejected, HubSpot's own recommendation applies: build the workflow once in the UI, GET /automation/v4/flows/{flowId}, and adapt the script to the exact shapes your portal returns.
Follow the step-by-step instructions in Stage 3 below. This builds the original single-workflow design with the if/then re-engagement branch, and works on portals where the Automation API is unavailable.
Alternatives: HubSpot Breeze AI can scaffold a similar workflow from a prompt, but it creates event-based (OR) triggers instead of filter-based (AND) triggers and cannot configure re-enrollment or "is unknown" conditions — every Breeze-built trigger needs manual verification. The Claude Chrome extension can drive the workflow builder UI directly. Both are secondary to Options A and B.
Run uv run scripts/before.py — it inventories all workflows, flags name collisions with the two planned SUNSET workflows, and writes the inventory CSV baseline.
If building manually, also create your suppression status property (dropdown: "re-engagement sent", "suppressed") if it does not exist — the API path creates it automatically.
Option A: run uv run scripts/execute.py, then complete the UI review steps listed above.
Option B — manual UI build:
Set enrollment trigger:
hs_email_last_open_date is more than your sunset window (typically 120-270 days) ago OR is unknownemail is knownhs_email_optout is not trueAction: Set contact property
Action: Enroll in re-engagement sequence (or send re-engagement email)
Delay: your re-engagement window (typically 21-45 days)
If/then branch:
hs_email_last_open_date is less than [re-engagement window] days ago OR hs_email_last_click_date is less than [re-engagement window] days agohs_marketable_status to non-marketing contact via the "Set marketing contact status" workflow action. (The property itself is read-only via direct API writes — a workflow action is the mechanism, whether the workflow is built in the UI or created via the v4 API.)Settings:
Turn on the workflow.
uv run scripts/after.py (API path) to confirm both workflows exist and report their enabled state.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
hubspot, email-marketing, contact-suppression, re-engagement, automation
40 skills in this plugin
/assign-unowned-contactsAssign an owner to marketing contacts that have no owner. Ensures every marketable contact has accountability for follow-up, proper lead routing, and accurate owner-based reporting./audit-api-usageInventory the integrations, service keys, legacy private apps, and internal tooling that call HubSpot APIs, and flag anything on legacy v1-v4 endpoints or legacy app architecture ahead of HubSpot's 2027 cutoffs. Produces a migration checklist to date-based API versions and service keys./backfill-geo-dataEnrich missing geographic data (country, state, city) on contacts and companies using HubSpot workflows, external data providers, or IP-based geolocation.npx claudepluginhub tomgranot/hubspot-admin-skills --plugin hubspot-adminOther plugins' skills for the same job