/install cleanup-forms
Cleanup Forms
Audit HubSpot forms to remove unused and test forms. Stale forms clutter the forms dashboard and can cause confusion when building workflows or reports.
Prerequisites
- HubSpot API token in
.env - Python with
hubspot-api-clientinstalled viauv - Note: The Forms API may return 403 on some plan tiers. If so, perform the audit manually in the HubSpot UI under Marketing > Forms.
Step-by-Step Instructions
Stage 1: Before — Inventory All Forms
Pull all forms via the API:
from hubspot import HubSpot
api_client = HubSpot(access_token=os.getenv("HUBSPOT_API_TOKEN"))
forms = api_client.marketing.forms.forms_api.get_page(limit=100)
For each form, record: form ID, name, type, submission count, created date, last submission date.
Stage 2: Execute — Identify Candidates for Deletion
Flag forms matching any of these criteria:
- Zero submissions and created more than 30 days ago
- No recent submissions (last submission 6+ months ago) and not embedded on an active page
- Test forms (names containing "test", "temp", "draft", "copy of")
- Deprecated forms replaced by newer versions
Before deleting, check:
- Is the form referenced in any workflow enrollment trigger?
- Is the form embedded on any live landing page or website page?
- Is the form used in any pop-up or slide-in CTA?
Stage 3: After — Delete and Document
- Delete confirmed unused forms via the API or UI.
- Document what was deleted in a cleanup log.
- If a form with submissions is deleted, the submission data is retained on the contact records — but the form definition is gone.
Stage 4: Rollback
- Deleted forms cannot be restored in HubSpot.
- Before deleting a form with any submissions, export the form definition (field names, settings) so it can be recreated.
- Contact records retain their form submission history regardless of form deletion.
Tips
- Establish a naming convention:
[TEAM] - Purpose - Version(e.g.,[Marketing] - Webinar Registration - v2). - Prefix deprecated forms with "[DEPRECATED]" instead of deleting immediately — delete after one quarter of no usage.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install cleanup-forms - 安装完成后,直接呼叫该 Skill 的名称或使用
/cleanup-forms触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Cleanup Forms 是什么?
Audit and remove unused, test, or deprecated forms from HubSpot. Identifies forms with zero submissions, forms not embedded on any page, and test forms left... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 108 次。
如何安装 Cleanup Forms?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install cleanup-forms」即可一键安装,无需额外配置。
Cleanup Forms 是免费的吗?
是的,Cleanup Forms 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Cleanup Forms 支持哪些平台?
Cleanup Forms 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Cleanup Forms?
由 TomGranot(@tomgranot)开发并维护,当前版本 v1.0.0。