# Connect an AI Agent to HubSpot

> Set up a Quickchat AI Agent that answers HubSpot live chat, email, Facebook Messenger and WhatsApp conversations and hands off to your team with a ticket.

Your AI Agent answers the live chat, email, Facebook Messenger and WhatsApp conversations that HubSpot Conversations assigns to a dedicated HubSpot user. It replies as that user, in the same thread and on the same channel, so the conversations stay in your HubSpot inbox. When a conversation needs a person, the AI Agent hands it off and Quickchat AI creates a HubSpot ticket for your team. For an overview of the integration and its pricing, see [AI Agent for HubSpot](https://quickchat.ai/hubspot).

## Optional example checks

- [Compare deployment methods][public-lab-deployment-fit-both]. Check your declared channels, website access and required features against Quickchat AI setup options. This does not inspect your website or account.

- [Check plan requirements][public-lab-plan-fit-both]. Compare declared usage, content, team and feature needs with public Quickchat AI plan bundles. This is not a price quote or account check.

## Watch the Video

[Watch on YouTube](https://www.youtube.com/watch?v=Suc4_rxHMN0)

## Quickchat prerequisites:

- Create a Quickchat AI [account](https://app.quickchat.ai/)

## Create a dedicated HubSpot user

Your AI Agent replies on behalf of a dedicated HubSpot user, so create that user first:

1. Create a new user in HubSpot for the AI Agent.
2. Give the user access to the inbox or help desk that your channels are connected to.
3. Assign the user a Sales Seat or Service Seat. HubSpot assigns conversations automatically only to users with one of these seats. A Service Enterprise seat is not required. See HubSpot's guide to [assigning seats](https://knowledge.hubspot.com/account-management/manage-seats).
4. Set the user's status to **Available**, for example in **Settings** > **Inbox & Help Desk** > **Availability Management**. HubSpot's routing option **Assign to available users only** is on by default, so the user gets no new conversations while it is **Away**. If you set working hours for the user, HubSpot marks it **Away** outside those hours. See HubSpot's guide to [user availability](https://knowledge.hubspot.com/inbox/manage-your-inbox-users).

Each AI Agent you connect to the same HubSpot account needs its own user.

### Why a dedicated user

- **Your team sees who said what.** The AI Agent posts its replies as this user, in the same thread and on the channel the customer used.
- **HubSpot's assignment decides which conversations the AI Agent answers.** It answers the conversations assigned to this user and no others. If someone on your team assigns a conversation to themselves, the AI Agent stops answering it.
- **It uses one seat.** The AI Agent needs only the Sales Seat or Service Seat assigned to this user.
- **Your team picks up handoffs from the ticket.** After a handoff, the AI Agent stops replying in that conversation and Quickchat AI creates a HubSpot ticket for it. See [Human handoff and HubSpot tickets](#handoff-tickets).

## Option A: Install from the HubSpot App Marketplace

1. Open the **Support AI Agent by Quickchat AI** listing in the HubSpot App Marketplace and click **Install**.
2. A Quickchat sign-in window opens. Click **Continue with Quickchat** and sign in to your Quickchat AI account (or create one if you don't have one yet).
3. If you have more than one AI Agent, the **Choose an AI Agent** screen appears. Select the agent you want to connect and click **Connect**. If you only have one AI Agent, it is selected automatically.
4. You are returned to HubSpot and the installation completes.
5. To start answering conversations, open the Quickchat AI [dashboard](https://app.quickchat.ai/) and go to the **External Apps** tab. Click **Finish setup** on the **Finish your HubSpot setup** banner and enter the email address of the dedicated HubSpot user you created above in **HubSpot User Email**. Your AI Agent will respond to messages **on behalf of** that account.

## Option B: Connect from the Quickchat AI dashboard

1. Navigate to the Quickchat AI [dashboard](https://app.quickchat.ai/) and go to the **External Apps** tab.
2. On the list of available platforms, click **HubSpot**.
3. Provide the exact same email address you used to create the new HubSpot user. It will be responding to messages **on behalf of** that account.
4. Click on _Connect with HubSpot_ and follow the on-screen prompts by choosing the appropriate HubSpot workspace. To authorize the connection, you need HubSpot [_Super Admin_](https://knowledge.hubspot.com/settings/hubspot-user-permissions-guide#super-admin) or _App Marketplace access_ permissions, which HubSpot requires to [install apps](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot).

![The HubSpot panel in External Apps](https://quickchat.ai/docs/_astro/hubspot_integration.BSe3_Imf.png)

<div id="configure-the-hubspot-chatflow"></div>

## Answer live chat with a HubSpot chatflow

1. In HubSpot, go to **Service** > **Chatflows**. If your account shows a **More** menu, go to **More** > **Service** > **Chatflows**. See HubSpot's guide to [creating a live chat](https://knowledge.hubspot.com/chatflows/create-a-live-chat).
2. Click **Create chatflow** and select **Website**. To use an existing website chatflow, open it and skip to step 6.
3. Select the inbox or help desk and the language, then click **Next**. Use the same language as in your Quickchat AI settings.
4. On the **Chatflow** page, select **Live agent**.
5. On the **Knowledge base** page, leave **Enable Knowledge Base search** off and click **Create**. Your AI Agent answers from its own Knowledge Base in Quickchat AI.
6. On the **Chat** tab, turn on the **Assignment** switch, choose **Specific users and teams** in the **Assign to** dropdown and select your Quickchat AI user (the user whose email address you entered in Quickchat AI). For a live chat connected to help desk, select the user in the **Ticket assignment** dropdown instead.
7. (Optional) Customize the **Welcome message**.
8. (Optional) Under **Email capture**, choose when visitors are asked for their email address.
9. Click **Save**.
10. Click **Preview** and send a message. If your AI Agent replies, the chatflow is set up.

If your chatflow's availability is based on user availability, visitors cannot send messages while the Quickchat AI user is **Away**.

:::caution
Ensure your Quickchat AI user is assigned as the "Owner" of a conversation; otherwise, the Quickchat AI Agent won't respond. Additionally, check other HubSpot features you use, like "Automations," as they may affect the assignment automatically.
:::

If you prefer not to use the HubSpot widget, use Quickchat! Go to _Website_ > _Install_, and follow the instructions on the screen to add it to your website.

:::tip
As a final verification of your integration, you can test the widget in the Preview section of the HubSpot Chatflow editor. You should get a reply from your AI Agent and the conversation should appear in the Inbox in the [Quickchat AI App](https://app.quickchat.ai). You can now share the HubSpot widget on your website and have Quickchat AI reply automatically!
:::

## Answer email, Facebook Messenger and WhatsApp conversations

Your AI Agent also answers email, Facebook Messenger and WhatsApp conversations in your HubSpot inbox. HubSpot routes each channel separately, so set up routing for every channel the AI Agent should answer:

1. In HubSpot, go to **Settings** > **Inbox & Help Desk** > **Channels**, select the channel type (**Team Email**, **Facebook Messenger** or **WhatsApp**) and open the channel.
2. On the **Routing** tab, click **Edit routing**.
3. Choose **Specific users and teams**, select only your Quickchat AI user and save.

When you connect a new channel, HubSpot shows the same choice as the **Automatically assign conversations** switch with an **Assign to** dropdown (**Assign conversations** for WhatsApp). Some HubSpot articles show an older path under **Inbox & Help Desk** > **Inbox**. See HubSpot's guides to [managing channels](https://knowledge.hubspot.com/help-desk/connect-and-manage-inbox-and-help-desk-channels) and [routing rules](https://knowledge.hubspot.com/inbox/set-your-conversations-routing-rules).

- The Quickchat AI user needs access to the inbox and an assigned Sales Seat or Service Seat, as described in the dedicated user steps above.
- Connecting WhatsApp to the HubSpot inbox requires a Marketing Hub or Service Hub Professional or Enterprise subscription and a WhatsApp Business account. Personal WhatsApp accounts cannot be connected. See HubSpot's guide to [connecting channels](https://knowledge.hubspot.com/inbox/connect-channels-to-the-conversations-inbox).
- On email, the AI Agent does not answer emails it recognizes as automated, such as auto-replies, bounce notices and messages from no-reply addresses. It answers an email only when your team email address is in its To field, so an email that lists the address only in CC or BCC gets no reply.

To connect email, WhatsApp or Facebook Messenger to Quickchat AI without HubSpot, see [Email](/docs/channels/email), [WhatsApp](/docs/channels/whatsapp) and [Facebook Messenger](/docs/channels/facebook-messenger).

**Your integration is now complete!**

<div id="handoff-tickets"></div>

## Human handoff and HubSpot tickets

When your AI Agent hands a HubSpot conversation off to a person, Quickchat AI creates a HubSpot ticket so your team can pick it up. Choose the pipeline in the Quickchat AI [dashboard](https://app.quickchat.ai/) under **External Apps** → **HubSpot** → **Settings**. Both options appear once HubSpot is connected:

- **During Agent's working hours, create a Ticket on this pipeline:** used when the AI Agent hands the conversation off to your team.
- **Outside Agent's working hours, create a Ticket on this pipeline:** used when a handoff comes up outside the working hours set under **Human Agents' availability** in [Human Handoff](/docs/ai-agent/actions/human-handoff). The AI Agent then tells the customer that nobody is available right now.

Both options start on HubSpot's default _Support Pipeline_. Select **- None -** in an option to create no ticket in that case. If **Human Agents' availability** is off, every handoff counts as during working hours.

Each handoff ticket is created in the first stage of the selected pipeline and associated with the HubSpot conversation. It is named `[Quickchat AI] Conversation is awaiting response.`, or `[Quickchat AI] Handoff detected outside working hours.` when it was created outside working hours. Quickchat AI creates at most one ticket per conversation, so a later handoff in the same conversation does not add another.

If you use HubSpot _Help Desk_, HubSpot already opens a ticket for every conversation, so the handoff ticket is a second one. Select **- None -** in both options if you only want HubSpot's own ticket.

If **AI summary** is turned on in [Human Handoff](/docs/ai-agent/actions/human-handoff), your team also gets the AI Agent's summary of the conversation in HubSpot: as an internal comment on the conversation in a _Conversations Inbox_, or as a note on the conversation's ticket in _Help Desk_.

### No tickets after a handoff

If conversations are handed off but no tickets appear in HubSpot:

1. In **External Apps** → **HubSpot** → **Settings**, check that both options above are set to a pipeline, not **- None -**.
2. If the pipeline lists only offer **- None -** or cannot be opened, Quickchat AI cannot read your HubSpot pipelines. Click **Reconnect** and sign in to HubSpot again.
3. If the conversation was handed off before, look for the ticket from that first handoff. Each conversation gets one ticket at most.
4. If tickets are still missing, [contact us](https://quickchat.ai/contact) and include the IDs of the affected conversations.

[public-lab-deployment-fit-both]: https://app.quickchat.ai/v1/api_core/public-question/quickchat/tools/deployment-fit/lab/both/?placement=docs-hubspot-deployment-fit-both-v1

[public-lab-plan-fit-both]: https://app.quickchat.ai/v1/api_core/public-question/quickchat/tools/plan-fit/lab/both/?placement=docs-hubspot-plan-fit-both-v1
