hubspot_list_deal_stages
HubSpot read low risk
Part of the HubSpot Agent.
What it does
List the stages of one deal pipeline, or of every pipeline when pipeline_id is omitted. Returns the standard envelope {success:true,data} where data is {pipeline, stages} (without pipeline_id: {stages:[{pipeline, stages}]}; an unknown pipeline_id is not_found, never an empty list) and each stage carries its id (internal id required to set dealstage), label, displayOrder, and metadata (isClosed flag, probability such as 1.0 for closed-won / 0.0 for closed-lost), plus createdAt/updatedAt. Use to resolve a stage label (e.g., 'Demo Scheduled', 'Closed Won') to the internal stage id for hubspot_create_deal / hubspot_update_deal, and to identify closed-won/closed-lost stages for closed-loop LinkedIn ROI attribution. [POLICY] Stage configuration is the authorizing client's own portal metadata; use only to operate within that client's pipeline and never across clients.
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
pipeline_id | string | no | Internal id of the pipeline whose stages to list (from hubspot_list_pipelines). Omit to get every pipeline's stages grouped by pipeline. |
object_type | string | no | CRM object type. Defaults to "deals". |
Safeguards
Policy
Stage configuration is the authorizing client's own portal metadata; use it only to operate within that client's pipeline. NEVER use it to compare or commingle data across clients/unaffiliated accounts.
Reminder
Use the returned internal stage id (not the label) for dealstage; check metadata.isClosed for won/lost.
Errors
| Error class | Means | What to do | Retry |
|---|---|---|---|
auth | Invalid or expired OAuth token / session (401 Unauthorized). | Refresh the HubSpot OAuth token and retry; do not reuse the rejected token. | no |
permission | Token lacks the deals/pipelines read scope (403 Forbidden). | Grant crm.objects.deals.read and reconnect; surface the missing scope. | no |
validation | HubSpot 400: invalid object_type or malformed pipeline_id. Surface HubSpot's exact message. | Provide a valid object type and pipeline id (from hubspot_list_pipelines), then retry. | no |
not_found | Pipeline id not found for the object type (404 Not Found). | Re-resolve the pipeline id via hubspot_list_pipelines; the pipeline may have been deleted/renamed. | no |
rate_limit | HubSpot 429 Too Many Requests (TEN_SECONDLY_ROLLING or daily policy). | Honor Retry-After/X-HubSpot-RateLimit-*; back off with jitter; cache stage maps. | yes |
platform | HubSpot server error (500/502/503). | Retry with exponential backoff; if persistent, report HubSpot unavailability. | yes |
Edge cases
- Stage order: respect displayOrder; do not assume stage progression matches creation order.
- Closed stages: metadata.isClosed=true marks won/lost; probability distinguishes won (1.0) from lost (0.0) by convention but is portal-configurable.
- label vs id: only the internal stage id is accepted when writing dealstage.
- Custom pipelines may have arbitrary stage ids -- never hardcode 'appointmentscheduled' etc. across portals.
- Configuration is near-static -- cache per pipeline for the session to reduce rate-limit pressure.