# Hubspot Deals

> Use when the user wants to search, read, create, update, or manage HubSpot CRM deals (opportunities, pipeline revenue, deal stages) via the `hubspot` command-line tool.

- Skill: `dipankar/hubspot-deals` (Agent Skill)
- Install (CLI): `npx skillmds@latest add dipankar/hubspot-deals`
- Raw SKILL.md: https://api.skillmd.com/api/skills/dipankar/hubspot-deals/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: DevOps & Infra
- Author: dipankar (https://skillmd.com/u/dipankar)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/dipankar/hubspot-deals

---


# HubSpot Deals (via `hubspot` CLI)

Deals track revenue opportunities through a sales pipeline. Each deal lives in a pipeline and a stage.

## Auth

Set `HUBSPOT_ACCESS_TOKEN`. Optional `--profile <name>`.

## Canonical commands

| Intent | Command |
| --- | --- |
| List | `hubspot crm deals list --limit 20 --properties dealname,amount,dealstage,closedate` |
| Get by ID | `hubspot crm deals get 12345` |
| Create | `hubspot crm deals create --dealname "Q2 Expansion" --amount 50000 --stageid appointmentscheduled` |
| Create from JSON | `hubspot crm deals create --properties '{"dealname":"Q2","amount":"50000","pipeline":"default","dealstage":"appointmentscheduled"}'` |
| Update stage | `hubspot crm deals update 12345 --properties '{"dealstage":"contractsent"}'` |
| Close-won | `hubspot crm deals update 12345 --properties '{"dealstage":"closedwon","closedate":"2025-06-01T00:00:00Z"}'` |
| Delete | `hubspot crm deals delete 12345 --yes` |
| Search by stage | `hubspot crm deals search --filter-groups '[{"filters":[{"propertyName":"dealstage","operator":"EQ","value":"closedwon"}]}]'` |
| Open deals | `hubspot crm deals search --filter-groups '[{"filters":[{"propertyName":"dealstage","operator":"NOT_IN","values":["closedwon","closedlost"]}]}]'` |
| Batch create | `hubspot crm deals batch-create --inputs '[...]'` |

## Pipelines and stages

Deal stages are pipeline-specific. Always list them before creating or moving deals:

```bash
hubspot crm pipelines list deals
hubspot crm pipelines stages deals <pipeline_id>
```

Use the internal `dealstage` id (e.g. `appointmentscheduled`, `qualifiedtobuy`, `contractsent`, `closedwon`, `closedlost`), not the display label.

## Common properties

`dealname`, `amount`, `dealstage`, `pipeline`, `closedate`, `hubspot_owner_id`, `dealtype`, `description`, `hs_priority`.

## Associating deals

```bash
# Associate deal 12345 with contact 67890
hubspot crm associations create deals 12345 contacts 67890

# And with company 54321
hubspot crm associations create deals 12345 companies 54321
```

## Output / errors

Standard `{success, data, paging}`. Error codes: `AUTH_ERROR (3)`, `VALIDATION_ERROR (5)`, `NOT_FOUND (6)`, `RATE_LIMIT (7)`.

## Scopes

- Read: `crm.objects.deals.read`
- Write: `crm.objects.deals.write`

## Tips

- `amount` is a string (HubSpot returns all numeric properties as strings). Quote it in JSON.
- `closedate` must be ISO-8601 UTC.
- Use `--output json-pretty` only when the user explicitly wants to read the JSON.

