Skip to content
All Skills

Cleanup Workflows

Audit and remove inactive, test, or deprecated workflows from HubSpot. Identifies workflows that have never enrolled contacts, workflows turned off for 90+ days, and test workflows.

Business, Marketing & Sales|v1|Updated 7/14/2026|GitHub source
MCP get_skill({ skillId: "cleanup-workflows-e3146836" })

Use this skill with your agent

Create a free account and connect via MCP

Get Started Free
# Cleanup Workflows

Audit HubSpot workflows to remove dead weight. Unused workflows clutter the automation dashboard and make it harder to understand what is actually running.

## Prerequisites

- HubSpot API token in `.env`
- Python with `hubspot-api-client` installed via `uv`
- Note: The Workflows API may return 403 on some plan tiers. If so, audit manually in HubSpot UI under Automation > Workflows.

## Step-by-Step Instructions

### Stage 1: Before — Inventory All Workflows

Pull all workflows. The Automation API endpoint for workflows:

```python
import requests

headers = {"Authorization": f"Bearer {os.getenv('HUBSPOT_API_TOKEN')}"}
response = requests.get(
    "https://api.hubapi.com/automation/v4/flows",
    headers=headers,
    params={"limit": 100}
)
workflows = response.json()
```

For each workflow, record: ID, name, enabled status, type, enrollment count, created date, last updated date.

### Stage 2: Execute — Identify Candidates for Deletion

Flag workflows matching any of these criteria:

1. **Turned off** for 90+ days with no plans to reactivate
2. **Zero enrollments** ever (likely test or abandoned drafts)
3. **Test workflows** (names containing "test", "temp", "copy of", "draft")
4. **Superseded workflows** replaced by newer versions
5. **Error state** workflows that have been failing consistently

Before deleting, check:
- Does the workflow feed into another workflow (via enrollment trigger)?
- Does the workflow set properties that other workflows depend on?
- Is there any documentation referencing this workflow?

### Stage 3: After — Delete and Document

1. Turn off workflows first, wait one week, then delete if no issues arise.
2. Document deleted workflows in a cleanup log (name, purpose, reason for deletion).
3. Notify workflow owners before deletion.

### Stage 4: Rollback

- Deleted workflows cannot be restored.
- Before deleting, screenshot or document the workflow logic (triggers, actions, branches) so it can be recreated if needed.
- HubSpot retains workflow activity history on contact records even after the workflow is deleted.

## Tips

- Use folders in the workflows dashboard to organize by team, purpose, or status.
- Prefix draft/test workflows with "[TEST]" so they are easy to identify later.
- Review workflows quarterly as part of the database cleanup routine.
#work-life#crm#hubspot#sales-ops#marketing-ops#data-cleanup#email#marketingpythonhubspotuvhubspot-api-client

Related Skills

More skills in Business, Marketing & Sales

Ab Testing

When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program," or "experiment playbook." Use this whenever someone is comparing two approaches and wants to measure which performs better, or when they want to build a systematic experimentation practice. For tracking implementation, see analytics. For page-level conversion optimization, see cro.

#work-life#productivityMIT

Ab Test Setup

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

#work-life#productivityMIT

Ab Test Setup

Ab Test Setup linked from Corey Haines marketing skills, with the upstream skill instructions available on GitHub.

#work-life#productivityMIT

Ab Test Store Listing

When the user wants to A/B test App Store product page elements to improve conversion rate. Also use when the user mentions "A/B test", "product page optimization", "test my screenshots", "test my icon", "conversion rate optimization", "CPP", or "custom product pages". For screenshot design, see screenshot-optimization. For metadata optimization, see metadata-optimization.

#work-life#productivityMIT

Account Research

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

#work-life#productivityApache-2.0

Account Research

Research a company using Common Room data. Triggers on 'research [company]', 'tell me about [domain]', 'pull up signals for [account]', 'what's going on with [company]', or any account-level question.

#work-life#productivityApache-2.0