Quarterly Database Cleanup
A structured quarterly audit that catches data drift before it becomes a crisis. Run this at the start of each quarter (or monthly if the database is large or fast-growing).
Prerequisites
- - HubSpot API token in INLINECODE0
- Python with
hubspot-api-client installed via INLINECODE2 - Previous quarter's report (for trend comparison) — optional on first run
Audit Checklist
1. List Health
- - Count total active lists, static lists, and unused lists (zero members)
- Identify lists not referenced by any workflow or email
- Flag duplicate or overlapping lists
2. Bounce Monitoring
- - Count contacts with 1, 2, and 3+ bounces
- Hard bounce rate vs. previous quarter
- Review contacts flagged by bounce monitoring workflow
3. Data Quality
- - Missing email, company, industry, country, lifecycle stage
- Compare percentages to previous quarter
- Flag any property completeness that dropped more than 5%
4. Scoring Calibration
- - Review lead score distribution (histogram)
- Check MQL conversion rate — are high-scoring leads actually converting?
- Adjust scoring model if conversion rate is below 10% or above 50%
5. Engagement Metrics
- - Active contacts (engagement in last 90 days) as % of total
- Zombie contacts (no engagement in 6+ months) as % of total
- Email open rate and click rate trends
6. Property Cleanup
- - Custom properties with zero populated records
- Properties not used in any list, workflow, or form
- Test/temp properties that should be archived
Step-by-Step Instructions
Stage 1: Before — Gather Baselines
- 1. Locate the previous quarter's report (if it exists) in
reports/. - Run
/hubspot-audit to get fresh numbers across all dimensions.
Stage 2: Execute — Deep Review
For each checklist item above:
- 1. Pull current metrics via the HubSpot API (reuse audit script patterns).
- Compare to the previous quarter's numbers.
- Flag any metric that worsened by more than 5 percentage points.
- Document specific contacts, lists, or properties that need action.
Stage 3: After — Generate Report
Save a report to reports/quarterly-cleanup-{YYYY-Q#}.md with this structure:
CODEBLOCK0
Stage 4: Rollback
This is a read-only audit — no rollback needed. Action items from the report are executed separately through their respective skills.
Scheduling
- - Set a recurring calendar reminder for the first Monday of each quarter.
- Assign an owner for each action item in the report.
- Review the previous quarter's action items for completion before starting the new audit.
季度数据库清理
一项结构化的季度审计,在数据漂移演变为危机之前将其捕获。在每个季度开始时执行(如果数据库规模较大或增长迅速,可每月执行)。
前提条件
- - 在 .env 文件中配置 HubSpot API 令牌
- 通过 uv 安装 hubspot-api-client 的 Python 环境
- 上一季度的报告(用于趋势对比)——首次运行时可选
审计清单
1. 列表健康度
- - 统计活跃列表、静态列表和未使用列表(零成员)的总数
- 识别未被任何工作流或邮件引用的列表
- 标记重复或重叠的列表
2. 退信监控
- - 统计出现1次、2次和3次以上退信的联系人数量
- 硬退信率与上一季度对比
- 审查退信监控工作流标记的联系人
3. 数据质量
- - 缺失邮箱、公司、行业、国家、生命周期阶段的数据
- 与上一季度百分比对比
- 标记任何属性完整度下降超过5%的情况
4. 评分校准
- - 审查潜在客户评分分布(直方图)
- 检查MQL转化率——高评分潜在客户是否实际转化?
- 若转化率低于10%或高于50%,调整评分模型
5. 参与度指标
- - 活跃联系人(过去90天内有互动)占总数的百分比
- 僵尸联系人(超过6个月无互动)占总数的百分比
- 邮件打开率和点击率趋势
6. 属性清理
- - 零填充记录的自定义属性
- 未在任何列表、工作流或表单中使用的属性
- 应归档的测试/临时属性
分步操作说明
阶段一:准备——收集基线数据
- 1. 在 reports/ 目录中找到上一季度的报告(如果存在)。
- 运行 /hubspot-audit 获取所有维度的最新数据。
阶段二:执行——深度审查
针对上述每个清单项目:
- 1. 通过 HubSpot API 拉取当前指标(复用审计脚本模式)。
- 与上一季度数据对比。
- 标记任何恶化超过5个百分点的指标。
- 记录需要采取行动的具体联系人、列表或属性。
阶段三:后续——生成报告
将报告保存至 reports/quarterly-cleanup-{YYYY-Q#}.md,结构如下:
markdown
季度数据库健康报告 — YYYY Q#
摘要
| 指标 | 上季度 | 本季度 | 变化 |
|---|
| 联系人总数 | XX,XXX | XX,XXX | +X% |
| 数据完整度 |
XX% | XX% | +X% |
| 退信率 | X.X% | X.X% | -X% |
| 僵尸联系人 | XX% | XX% | -X% |
| 未使用列表 | XX | XX | -XX |
行动项
- 1. [项目及负责人和截止日期]
- ...
详细发现
[每个清单项目一个章节,包含指标和建议]
阶段四:回滚
此为只读审计——无需回滚。报告中的行动项将通过各自对应的技能单独执行。
排期
- - 设置每季度第一个周一的定期日历提醒。
- 为报告中的每个行动项指定负责人。
- 在开始新审计前,检查上一季度行动项的完成情况。