> ## Documentation Index
> Fetch the complete documentation index at: https://www.voiceflow.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# HubSpot tool

> Create contacts, leads, and tickets in your HubSpot CRM.

## What it connects

The HubSpot tool lets your agent interact with your CRM during a conversation. Use it to capture lead information, create support tickets when customers report issues, or add new contacts when users share their details.

### Run independently through code
You can also run this integration’s actions through code without an agent conversation. Independent execution uses the project’s Draft connection and can perform real actions in the connected service. See [Run tools without a conversation (Developers)](/docs/developers/tools/execute) for schema discovery, inputs, permissions, and results.

## Before you connect

A HubSpot account with access to the CRM records you intend to create. For tickets, identify the pipeline and stage your team uses.

## Set up and test

<a id="using-the-hubspot-tool"></a>
<a id="connect-your-account"></a>

The steps below use a workflow so you can provide explicit inputs and check the result of one action.

<Steps>
<Step title="Add the integration">
Open a workflow and add an [Integration step](/docs/documentation/build/steps/integration). Connect it to the preceding step, open its configuration, and choose **HubSpot**.
</Step>
<Step title="Connect your account">
Authorize the HubSpot account in the connection dialog. If the account is already connected, check that it is the account you intend to test.
</Step>
<Step title="Choose an action">
Select **Create ticket** for this first test. The tool shows the inputs for that action. You can find the other available actions in the reference below.
</Step>
<Step title="Configure the inputs">
Enter a test ticket’s `subject` and `content`. Set `hs_pipeline` and `hs_pipeline_stage` to your account’s values if needed. You can set `hs_ticket_priority` to `HIGH`, `MEDIUM`, or `LOW`.

Use fixed test values first. When the test works, you can map the inputs to [variables](/docs/documentation/build/data/variables) collected earlier in the conversation.
</Step>
<Step title="Run a test and check the result">
Use **Run** to test the workflow and follow the conversation path that reaches the Integration step.

Inspect `ticket.id`, then open the new ticket in HubSpot. Confirm that its subject, content, and pipeline match your inputs.
</Step>
</Steps>

To let the agent choose when to call the tool, add it to a [playbook](/docs/documentation/build/playbooks) instead and describe when to use it and what information to collect. Manage existing connections in **Settings → Integrations**.

## Supported actions

<a id="actions"></a>

The table names the connector’s inputs; optional inputs are marked where listed. Select an action to see its complete configuration.

| Action | Inputs | Result |
| --- | --- | --- |
| Create contact | Required: `firstname`, `lastname`, `email`. Optional contact details and `lifecyclestage`. | Created record under `contact`. |
| Create lead | Required: `firstname`, `lastname`, `email`. Optional contact details and `hs_lead_source`. | Created record under `lead`. |
| Create ticket | Required: `subject`, `content`. Optional: `hs_ticket_priority`, `hs_pipeline_stage`, `hs_pipeline`, `hubspot_owner_id`. | Created ticket under `ticket`. |

Use **Capture response** in an Integration step to save the result, or an object path within it, to a variable. Base the path on the actual returned result.

## Create a support ticket

These are example input values, not a live execution.

```json
{
  "subject": "Order arrived damaged",
  "content": "The customer reports a damaged item and requests help.",
  "hs_ticket_priority": "HIGH"
}
```

Run **Create ticket** in a test account. Inspect the returned `ticket.id` and open that ticket in HubSpot to verify its subject and content. Set `hs_pipeline` and `hs_pipeline_stage` when your account needs a specific pipeline.

## Limitations & troubleshooting

Ticket priority accepts `LOW`, `MEDIUM`, or `HIGH`. When no stage is supplied, the connector uses `1`; check that it is valid for your pipeline. **Create lead** creates a CRM contact through the contacts API and returns it under `lead`; it does not create a separate Leads object. Updating records and managing deals are not exposed by this connector.

## Related guides

[Integration walkthrough](/docs/courses/integrate-with-third-party-tools) · [Integration step](/docs/documentation/build/steps/integration) · [All integrations](/docs/documentation/build/tools/overview)
