Back to Skills

cleanup-forms

TomGranot
Updated 2 days ago
2 views
33
11
33
View on GitHub
Testingtesting

About

The cleanup-forms skill audits and removes unused HubSpot forms to reduce dashboard clutter. It identifies forms with zero submissions, forms not embedded on pages, and leftover test forms from development. Use this for ongoing maintenance to clean up deprecated forms via API or manually in the HubSpot UI.

Quick Install

Claude Code

Recommended
Primary
npx skills add TomGranot/hubspot-admin-skills -a claude-code
Plugin CommandAlternative
/plugin add https://github.com/TomGranot/hubspot-admin-skills
Git CloneAlternative
git clone https://github.com/TomGranot/hubspot-admin-skills.git ~/.claude/skills/cleanup-forms

Copy and paste this command in Claude Code to install this skill

Documentation

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-client installed via uv
  • 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:

  1. Zero submissions and created more than 30 days ago
  2. No recent submissions (last submission 6+ months ago) and not embedded on an active page
  3. Test forms (names containing "test", "temp", "draft", "copy of")
  4. 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

  1. Delete confirmed unused forms via the API or UI.
  2. Document what was deleted in a cleanup log.
  3. 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.

GitHub Repository

TomGranot/hubspot-admin-skills
Path: skills/cleanup-forms
0

Related Skills

evaluating-llms-harness

Testing

This Claude Skill runs the lm-evaluation-harness to benchmark LLMs across 60+ standardized academic tasks like MMLU and GSM8K. It's designed for developers to compare model quality, track training progress, or report academic results. The tool supports various backends including HuggingFace and vLLM models.

View skill

cloudflare-cron-triggers

Testing

This skill provides comprehensive knowledge for implementing Cloudflare Cron Triggers to schedule Workers using cron expressions. It covers setting up periodic tasks, maintenance jobs, and automated workflows while handling common issues like invalid cron expressions and timezone problems. Developers can use it for configuring scheduled handlers, testing cron triggers, and integrating with Workflows and Green Compute.

View skill

webapp-testing

Testing

This Claude Skill provides a Playwright-based toolkit for testing local web applications through Python scripts. It enables frontend verification, UI debugging, screenshot capture, and log viewing while managing server lifecycles. Use it for browser automation tasks but run scripts directly rather than reading their source code to avoid context pollution.

View skill

finishing-a-development-branch

Testing

This skill helps developers complete finished work by verifying tests pass and then presenting structured integration options. It guides the workflow for merging, creating PRs, or cleaning up branches after implementation is done. Use it when your code is ready and tested to systematically finalize the development process.

View skill