Skip to main content
skill CX Codex

review-bounced-contacts — Claude Code skill: HubSpot bounce triage

A weekly manual pass over contacts with 3+ bounces: delete them or try to recover. Keeps suppression from going too far while bad records still leave.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add TomGranot/hubspot-admin-skills --skill review-bounced-contacts -a claude-code
Open on GitHub

What review-bounced-contacts does

This skill lays out a weekly process for contacts carrying the email_health_flag. The bounce monitoring workflow already suppresses them automatically, yet a person still has to choose between permanent deletion and recovery. A Python snippet calls the CRM Search API and exports the flagged contacts to CSV, pulling email, name, company, bounce reason, lifecycle stage and owner.

Each contact then gets three checks: does the domain still resolve (MX lookup), is this a known customer, and was the bounce hard or soft. The decision table sends a dead domain straight to deletion, while a live domain with a soft bounce stays suppressed until the next quarter. Afterwards you delete the marked records through the UI or a batch delete, clear email_health_flag on everything you reviewed, and log the counts for the quarterly report.

You need the bounce monitoring workflow running and the email_health_flag property on contacts before this makes sense. Scripted pre-filtering wants a HubSpot key in HUBSPOT_ACCESS_TOKEN inside .env; a legacy private app token works too. Deleted contacts sit in HubSpot's recycling bin for 90 days, and that window is the only chance to bring them back.

What it helps with

  • work through contacts with three or more bounces each week
  • tell a hard bounce from a soft one before deleting a real customer
  • export flagged contacts to CSV for a human to review
  • clear email_health_flag once the review is done
  • count deleted versus kept contacts for the quarterly report

Example prompts for the agent

  • Pull every contact with email_health_flag set through the CRM Search API and save them to CSV
  • For each flagged contact, check the domain and deal history and tell me whether to delete or recover
  • Clear email_health_flag on the contacts I reviewed and count how many we deleted

How to install review-bounced-contacts

1Skills CLI (Vercel)

npx skills add TomGranot/hubspot-admin-skills --skill review-bounced-contacts -a claude-code

2Manually: put the files in place

~/.claude/skills/review-bounced-contacts/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/review-bounced-contacts/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about review-bounced-contacts

How do I install review-bounced-contacts in Claude Code?

Run npx skills add TomGranot/hubspot-admin-skills --skill review-bounced-contacts -a claude-code. The skill lands at ~/.claude/skills/review-bounced-contacts/SKILL.md.

What does review-bounced-contacts do?

It walks through a weekly review of contacts with 3+ bounces: export via the CRM Search API, check the domain and bounce type, decide delete or recover, then clear the flag and log the outcome.

What do I need before using it?

An active bounce monitoring workflow, the email_health_flag property on contacts, and a HubSpot key in HUBSPOT_ACCESS_TOKEN in .env for the scripted export.

Source text

SKILL.md · MIT
---
name: review-bounced-contacts
description: "Weekly manual review of contacts with 3+ bounce events. Decide whether to delete or attempt recovery for each flagged contact. Prevents over-suppression while removing truly bad data."
license: MIT
metadata:
  author: tomgranot
  version: "1.1"
  category: ongoing-maintenance
---

# Review Bounced Contacts

A weekly manual review process for contacts flagged with 3+ bounces. The bounce monitoring workflow auto-suppresses these contacts, but a human should decide whether to permanently delete or attempt recovery.

## Prerequisites

- Bounce monitoring workflow active (run `/bounce-monitoring-workflow` first)
- `email_health_flag` custom property exists on contacts
- A HubSpot service key (`HUBSPOT_ACCESS_TOKEN` in `.env`; an existing legacy private app token also works) for scripted pre-filtering

## Step-by-Step Instructions

### Stage 1: Before

Use the CRM Search API to pull contacts where `email_health_flag` is set:

```python
import os, requests
from dotenv import load_dotenv

load_dotenv()
TOKEN = os.environ["HUBSPOT_ACCESS_TOKEN"]
BASE = "https://api.hubapi.com"
HEADERS = {"Authorization": f"Bearer {TOKEN}", "Content-Type": "application/json"}

resp = requests.post(f"{BASE}/crm/v3/objects/contacts/search", headers=HEADERS, json={
    "filterGroups": [{"filters": [
        {"propertyName": "email_health_flag", "operator": "EQ", "value": "true"},
    ]}],
    "properties": ["email", "firstname", "lastname", "company",
                   "hs_email_bounce", "hs_email_hard_bounce_reason_enum",
                   "lifecyclestage", "hubspot_owner_id"],
    "limit": 100,
})
resp.raise_for_status()
results = resp.json()["results"]
```

Export results to a CSV for review.

### Stage 2: Execute — Review Each Contact

For each flagged contact, check:

1. **Is the email domain active?** Run a quick MX record lookup or visit the domain.
2. **Is this a known customer or high-value contact?** Check lifecycle stage and deal history.
3. **What is the bounce reason?** Hard bounce (invalid mailbox) vs. soft bounce (mailbox full, temporary error).

**Decision matrix:**

| Domain active? | High value? | Bounce type | Action |
|---------------|-------------|-------------|--------|
| No | Any | Any | Delete |
| Yes | No | Hard | Delete |
| Yes | No | Soft | Keep suppressed, recheck next quarter |
| Yes | Yes | Hard | Attempt to find updated email |
| Yes | Yes | Soft | Keep suppressed, monitor |

### Stage 3: After — Apply Decisions and Log

1. **Delete** contacts marked for deletion via the HubSpot UI or API batch delete.
2. **Clear** the `email_health_flag` on all reviewed contacts.
3. Log the review results (deleted count, kept count, recovery attempts) for the quarterly report.

## Rollback

- Deleted contacts can be restored from HubSpot's recycling bin within 90 days.
- Contacts kept as suppressed can be restored to marketing status via a workflow or manual update in the UI.

## MCP Note

This weekly triage is exactly the interactive, judgment-heavy work HubSpot's MCP server is good at (see `/connect-hubspot-mcp`): ask Claude to pull each flagged contact's details, deal history, and bounce reason conversationally while you decide delete-vs-recover.

## Frequency

Run weekly, ideally Monday morning. Should take 5-15 minutes depending on volume. If volume exceeds 50 contacts per week, investigate the root cause (bad list source, form spam, etc.).

© tomgranot · MIT · TomGranot/hubspot-admin-skills

Similar skills

Everything for Marketing and content →

From the same set11

waterfall-enrich-contacts Pulls emails, phone numbers and job titles for HubSpot contacts from an external provider and writes them back with an audit trail. CX Codex +1 ★ 78repo stars suppress-ghost-contacts Finds HubSpot contacts that got marketing email but never opened any of it, then audits them so you can stop mailing the ones that hurt deliverability. CX Codex +1 ★ 78repo stars new-contact-hygiene-workflow Builds a HubSpot workflow that stages every new contact and pulls company details from the associated company record. CX Codex +1 ★ 78repo stars enrich-company-name Copies the company name from a linked company record into empty contact fields in HubSpot. Useful when empty values break segmentation and personalization tokens. CX Codex +1 ★ 78repo stars create-segment-lists Builds a library of HubSpot segment lists — customers, partners, competitors, employees, ICP tiers, industries. Feeds targeting, suppression and reporting. CX Codex +1 ★ 78repo stars cleanup-workflows Audits HubSpot workflows and flags the ones worth deleting: never enrolled, switched off for 90+ days, or left over from testing. CX Codex +1 ★ 78repo stars cleanup-lead-owners Strips departed employees out of HubSpot and moves their contacts, companies and deals to someone still on the team. Handy the week a person leaves. CX Codex +1 ★ 78repo stars cleanup-dashboards Walks you through auditing HubSpot dashboards: spots abandoned screens, duplicates and test copies, then helps merge reports into a few that people actually open. CX Codex +1 ★ 78repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor