> For the complete documentation index, see [llms.txt](https://docs.ebbot.ai/ebbot-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ebbot.ai/ebbot-docs/integrations/automations-integrations/integration-setup-guides/hubspot-integration-in-automations/actions/get-ticket-history-for-contact.md).

# Get Ticket History for Contact

Fetches the ticket history of a specific contact in HubSpot, returning the IDs of their tickets. Useful for understanding a customer's previous support cases.

**Action identifier:** `get_ticket_history_for_contact`. **Reference checked:** 29 September 2026.

## Inputs

| Field        | Type    | Required/default | Meaning                                  |
| ------------ | ------- | ---------------- | ---------------------------------------- |
| `contact_id` | string  | Required         | The ID of the contact to get history for |
| `limit`      | integer | `10`             | The maximum number of tickets to return  |

## Output shape

Paths are relative to this action's output. Select them from the builder's variable picker; do not add a `ticket` wrapper to actions that return top-level fields. Nullable property fields and empty defaults are not proof that a value was retrieved.

| Path                              | Type          | Meaning                                                                                        |
| --------------------------------- | ------------- | ---------------------------------------------------------------------------------------------- |
| `contact_history_ticket_ids`      | list\[string] | Associated ticket IDs from the returned association page, capped by `limit`.                   |
| `contact_history_ticket_count`    | integer       | Number of IDs in `contact_history_ticket_ids`, not the contact's total ticket count.           |
| `contact_history_first_ticket_id` | string        | First returned ticket ID; not necessarily the newest. Empty when no associations are returned. |
| `exists`                          | boolean       | True when ticket associations are found; use a positive `limit`.                               |

## Behavior and limits

Returns ticket IDs from the contact's ticket associations, not ticket bodies or conversation history. `limit` (use a positive integer) slices the returned association list; the action does not paginate associations or sort by creation/activity time. The “first” ticket is the first returned ID, not necessarily the newest.

Use Get Ticket for each selected record. No returned associations gives an empty list and `exists: false`.

See [Troubleshooting](/ebbot-docs/integrations/automations-integrations/integration-setup-guides/hubspot-integration-in-automations/troubleshooting.md) for request errors and retry behavior, or return to the [action catalog](/ebbot-docs/integrations/automations-integrations/integration-setup-guides/hubspot-integration-in-automations/actions.md).
