Agent #009 · RevOps

Pipeline Hygiene Agent

🟡 Growth

Flags stale, incomplete, or risky opportunities (missing amounts, past close dates, vague next steps) and recommends cleanup — never auto-closes deals

Build time
0.5-1 day
Primary user
RevOps / Sales Leader
Primary outcome
Cleaner pipeline and forecast trust
Deployable pack
Yes: full pack

Adam's take

Forecast meetings are only as honest as the pipeline under them. This agent recommends cleanup rather than doing it, because deleting a rep's deal by robot is how RevOps loses the room.
Adam Woozeer, founder

Required tools

HubSpotn8n

Optional tools

SalesforceSlackGong

Expected value

Cleaner pipeline; forecast trust; fewer surprise slips

Deployable workflow pack

The full pack includes the agent spec, deployment guide, architecture diagrams, n8n workflow skeleton, Clay template, HubSpot properties, JSON schemas, OpenAPI spec, cost and ROI calculators, demo data, QA checklist, and governance notes.

View pack on GitHub
Full deployment guide →Governance & failure modes →QA checklist →

How to deploy this agent

Every sales leader has sat through a forecast call where a deal "closing this week" turns out to have no next step logged and hasn’t been touched in three weeks. The ten checks that catch this are simple individually; running all ten, on every open deal, every day, by hand, is the part nobody has time for. This agent runs them daily and recommends cleanup — it never closes or re-stages a deal itself.

Core signals

Missing amount / close date: Blank fields on an open deal that break forecast math immediately.
Close date in the past: The highest-severity check — a deal still open with a close date that’s already passed.
No next step / vague next step: A blank next-step field, or one matching a low-information pattern like "follow up" or "check in."
No recent activity / stage age too high: Deals that have gone quiet, or that have sat in a stage well past its typical duration.
No contacts / no champion: Deals missing the relationship data (including a confirmed Champion, when the Buying Committee Mapper is deployed) that usually signals real traction.
Forecast inconsistency: A forecast category that logically conflicts with the deal’s stage and close date — e.g. "Commit" with a close date 90 days out.

Input schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://deploytheagent.com/schemas/agent-009-input.schema.json",
  "title": "Agent #009 Pipeline Hygiene Agent Input",
  "type": "object",
  "required": [
    "record_id"
  ],
  "properties": {
    "record_id": {
      "type": "string",
      "description": "CRM record ID (company/contact/deal depending on agent)."
    },
    "domain": {
      "type": "string"
    },
    "config_version": {
      "type": "string",
      "description": "Versioned config used for this run."
    }
  },
  "additionalProperties": true
}

Output schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://deploytheagent.com/schemas/agent-009-output.schema.json",
  "title": "Agent #009 Pipeline Hygiene Agent Output",
  "type": "object",
  "required": [
    "record_id",
    "pipeline_hygiene_score",
    "pipeline_hygiene_flags",
    "pipeline_hygiene_recommendations",
    "pipeline_hygiene_scan_date"
  ],
  "properties": {
    "record_id": {
      "type": "string"
    },
    "pipeline_hygiene_score": {
      "type": "string",
      "description": "Agent #009 output field."
    },
    "pipeline_hygiene_flags": {
      "type": "string",
      "description": "Agent #009 output field."
    },
    "pipeline_hygiene_recommendations": {
      "type": "string",
      "description": "Agent #009 output field."
    },
    "pipeline_hygiene_scan_date": {
      "type": "string",
      "description": "Agent #009 output field."
    }
  },
  "additionalProperties": false
}

Scoring / classification logic

Hygiene score starts at 100 and subtracts points per failed check, floored at 0. Every flagged issue comes with a specific, generated recommendation — "Close date is 4 days in the past, confirm new close date or update forecast category" — not a generic "clean up this deal" nudge.

HubSpot CRM properties

pipeline_hygiene_score company
Written by Agent #009 (Pipeline Hygiene Agent).
pipeline_hygiene_flags company
Written by Agent #009 (Pipeline Hygiene Agent).
pipeline_hygiene_recommendations company
Written by Agent #009 (Pipeline Hygiene Agent).
pipeline_hygiene_scan_date company
Written by Agent #009 (Pipeline Hygiene Agent).

n8n workflow skeleton

The Pipeline Hygiene Agent scans every open opportunity for the ten checks that quietly break forecast trust — missing amount, missing or past close date, no next step, stale activity, no champion — and recommends cleanup actions. It never closes or re-stages a deal itself. Configure every node marked CONFIGURE before enabling the trigger.

  1. Trigger
    CONFIGURE: set cadence per agent-spec.md's What It Does section. Leave disabled until Step 6 of deployment-guide.md.
  2. Load versioned config
    CONFIGURE: replace with your versioned config built from real data (see deployment-guide.md Step 1).
  3. Fetch source data
    CONFIGURE: {{HUBSPOT_CREDENTIAL}}. Pull the fields listed in agent-spec.md's Inputs table.
  4. Validate + gate records
    Drops records missing required inputs or failing suppression/gate checks defined in agent-spec.md. Logs every drop.
  5. Apply workflow logic
    Implements the Workflow Logic table from agent-spec.md. Writes model/config version alongside every derived value for auditability.
  6. Write agent-owned CRM fields
    CONFIGURE: {{HUBSPOT_CREDENTIAL}}. Writes only: pipeline_hygiene_score, pipeline_hygiene_flags, pipeline_hygiene_recommendations, pipeline_hygiene_scan_date. Never writes sales-owned fields.
  7. Route to human review / alert
    CONFIGURE: {{SLACK_CHANNEL}}. Fires for records requiring human review per agent-spec.md's Governance section.

Cost calculator

Cost Calculator — Agent #009: Pipeline Hygiene Agent

Fill in your own volumes and rates — do not use these as benchmark numbers.

Cost driverYour volumeUnit costMonthly cost
n8n execution (workflow runs)___ runs/month$___ / run$___
Enrichment/sourcing credits (if applicable)___ records/month$___ / record$___
LLM API calls (if applicable)___ calls/month$___ / call$___
Human review time___ hrs/month$___ / hr (loaded)$___
Total$___

Build cost (one-time)

Estimated build time: 0.5–1 day. Multiply by your builder's loaded hourly rate for a one-time build-cost estimate.

Notes

Costs scale with the volume of records this agent processes, not with the size of your whole CRM — scope your volume estimate to the specific object/list this agent actually touches (see `agent-spec.md`'s Inputs table).

ROI calculator

ROI Calculator — Agent #009: Pipeline Hygiene Agent

MetricBeforeAfterBasis
Deals with a past close date at forecast timeFound manually, inconsistentlyFlagged daily, automaticallyDeterministic date check run every day
Time spent on manual pipeline reviewHours weekly across sales leadershipDigest pre-surfaces the issuesChecks run automatically, humans review a summary
Forecast category consistencyRep judgment, unevenLogic-checked against stage/dateSame rule applied to every deal

Forecast accuracy improvement should be measured against your own historical forecast-to-actual variance; this agent surfaces the hygiene problems, it doesn't guarantee a specific accuracy gain.

Your numbers

InputValue
Records processed per month___
Manual time saved per record (before)___ min
Loaded hourly rate$___
Monthly time-savings value$___ (records × minutes saved ÷ 60 × rate)

Compare this to the cost calculator's monthly total for a net ROI. Do not add a revenue-impact number unless you've measured it against your own baseline — see `agent-spec.md`'s ROI note.

Governance notes

Failure modes

QA checklist

QA Checklist — Agent #009: Pipeline Hygiene Agent

To be completed by a non-builder reviewer before go-live.

Deployment checklist

  • Per-stage stage-age thresholds configured
  • Five HubSpot opportunity properties created
  • Vague-next-step pattern list written
  • n8n workflow imported, write permissions scoped to agent-owned fields only
  • Demo-data run matches `demo-data/sample-output.json`
  • Forecast-inconsistency test deal correctly flagged
  • Weekly digest delivery tested
  • QA checklist completed by a non-builder
  • Rollback tested

Failure-mode verification

  • Verified: Agent closes or re-stages a deal does not occur (mitigation: n8n credential scoped to agent-owned fields only; QA test asserts no write attempt to stage/amount/close-date fields)
  • Verified: Vague next step not caught does not occur (mitigation: Vague-phrase pattern list is versioned and expanded as new examples are caught in review)
  • Verified: Stage-age threshold flags normal early-stage deals does not occur (mitigation: Config requires a threshold per stage, not a single global number)
  • Verified: Forecast-inconsistency check never fires does not occur (mitigation: QA includes a deliberately inconsistent test deal (Commit + 90-day-out close date) and asserts it's flagged)

Governance verification

  • Agent writes only to its agent-owned fields: `pipeline_hygiene_score`, `pipeline_hygiene_flags`, `pipeline_hygiene_recommendations`, `pipeline_hygiene_scan_date` (opportunity)
  • No auto-send, auto-close, auto-route, or auto-create action occurs without the human step described in `agent-spec.md`
  • Confidence/model-version is present on every written record where applicable
  • Demo-data run output matches `demo-data/sample-output.json` in structure

Sign-off

Reviewer name: _______________ Date: _______________ Result: Pass / Fail (attach notes)

FAQ

Can this agent close a stale deal automatically?
No, never. It flags and recommends; a human deal owner decides whether and how to act. That boundary is core to why sales leadership trusts the output.
What if the Buying Committee Mapper isn’t deployed yet?
The no-champion check is simply disabled in config rather than failing every deal — the other nine checks still run normally.
How is the hygiene score calculated?
It starts at 100 and loses points for each of ten specific failed checks, with the highest penalty reserved for a close date that’s already in the past — the single most forecast-damaging issue.
Why introduce this to sales leadership as a briefing tool instead of an audit?
Framing it as pre-forecast-call prep rather than a compliance check meaningfully changes how well it’s received — the data is the same either way, but the framing affects adoption.

Related agents