Back to Playbooks

Deploy Deal Registration in HubSpot

Build
~20 min

VP of Partnerships says: "We need a partner deal registration pipeline in HubSpot by Friday." No template exists. You need to spec properties, pipeline stages, and validation rules — deploy them safely — and prove only intended changes landed.

The Prompt

VP of Partnerships: "We need a partner deal registration pipeline in HubSpot by Friday."

No existing config. Need to build properties, pipeline stages, and validation rules from scratch — and prove it's safe to deploy.

Plan:
1. Snapshot the current portal state (baseline)
2. Scaffold a pack with properties + pipeline config
3. Spec deal reg properties (partner name, reg date, status, deal value)
4. Spec pipeline stages (Submitted → Approved → Rejected → Expired)
5. Plan — show what will change, zero surprises
6. Apply — deploy to HubSpot
7. Compare snapshots — prove only intended changes landed
8. Drift check — prove idempotency (all components clean)

Infrastructure-as-Code for HubSpot

This isn't point-and-click — it's declarative CRM config. Snapshot before. Plan the diff. Apply with --yes. Compare after. Re-plan to prove idempotency. The same loop Terraform uses for cloud infra — now applied to your HubSpot portal.

How Gremlin Handles This

1

Snapshot Baseline

Capture all properties, pipelines, and lists before any changes

2

Scaffold Pack

g-gremlin pack init creates the config directory with pack.yaml and property stubs

3

Spec Properties + Pipeline

Define deal reg properties, validation rules, and pipeline stages in YAML/JSON

4

Plan (Dry Run)

See exactly what will be created, updated, or deleted — before touching HubSpot

5

Apply

Deploy properties, validations, and pipeline stages to the live portal

6

Verify

Compare snapshots to prove only intended changes landed. Run drift check to confirm zero unintended changes.

After you paste this prompt, Claude Code:

"I need to deploy a partner deal registration pipeline to HubSpot. Let me start by baselining the portal so I can prove exactly what changed."

Running
$ g-gremlin hubspot doctor
Portal 243394781 — all capabilities ok. Private App (500 req/10s).
Running
$ g-gremlin hubspot snapshot --out ./snapshots/baseline
Snapshot written. Counts: properties=804, pipelines=1, lists=0, workflows=0

"Baseline captured. Now I'll scaffold the pack and define the deal registration config — properties, pipeline stages, and validation rules."

Running
$ g-gremlin hubspot pack init partner_deal_reg
Created partner_deal_reg/ with pack.yaml, properties.yaml stub, and destructive.yaml manifest

Writing deal registration properties to properties.yaml

- partner_name (string) — Registered partner company
- partner_reg_date (date) — Registration submission date
- partner_deal_status (enumeration) — Submitted / Approved / Rejected / Expired
- partner_deal_value (number) — Estimated deal value

Writing pipeline spec: deals pipeline with deal reg stages

- Submitted (displayOrder: 0, probability: 0.1)
- Under Review (displayOrder: 1, probability: 0.3)
- Approved (displayOrder: 2, probability: 0.7)
- Rejected (displayOrder: 3, isClosed: true, probability: 0.0)
- Expired (displayOrder: 4, isClosed: true, probability: 0.0)
Running
$ g-gremlin hubspot pack plan partner_deal_reg --json
Plan: create 4 properties, create 1 group "partner_deal_reg", add 5 pipeline stages. No deletions.

"Plan looks clean — 4 properties, 1 group, 5 stages, zero deletions. Safe to apply."

Running
$ g-gremlin hubspot pack apply partner_deal_reg --yes
Applied. Artifacts written to partner_deal_reg/artifacts/20260127T180405Z/SUMMARY.md
Running
$ g-gremlin hubspot compare-snapshots ./snapshots/baseline ./partner_deal_reg/artifacts/20260127T180405Z/after_snapshot --json
Properties added: 4, removed: 0, changed: 0. Pipelines added: 0, removed: 0, changed: 0. Zero unintended drift.
Running
$ g-gremlin hubspot drift partner_deal_reg --json
Drift Report: all components clean. Total changes: 0. Pack is idempotent.

Done. Deal registration pipeline deployed. Snapshot verified. Drift check confirms zero unintended changes.

Output Artifacts

HubSpot Portal Changes

  • Property group — partner_deal_reg
  • 4 properties — partner_name, reg_date, status, deal_value
  • 5 pipeline stages — Submitted through Expired
  • Validation rules — partner_name required, date format enforced

Local Artifacts

  • pack.yaml — Declarative config (git-committable)
  • properties.yaml — Property definitions with types and groups
  • Before/after snapshots — Full portal state for diffing
  • SUMMARY.md — Human-readable apply report

The full config lives in Git. Every property, pipeline stage, and validation rule is version-controlled. Roll back by reverting a commit. Replicate to a second portal by pointing at a different credential.

Results

4
Properties created
5
Pipeline stages
0
Unintended changes
Clean
Idempotent re-plan

Deploy + verify: 20 minutes

vs hours of manual clicks, screenshots, and "did I miss a field?" anxiety

Try This Workflow

Start with the quickstart guide, then deploy your own HubSpot config through code.

Playbook: Deploy Deal Registration in HubSpot | Deal Desk | FoundryOps