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

# AI Email Support

> Route email conversations into HubSpot as tickets and conversation threads with per-domain email signatures.

Email conversations route through HubSpot's conversations inbox. Every email handoff creates a HubSpot ticket and keeps the thread alive in HubSpot — your reps reply from HubSpot and the response lands in the customer's inbox with your branded signature attached.

## Pre-requisites

<Warning>
  **Set up email forwarding first.** No email handoff has anything to ticket until inbound mail is reaching OpenCX — start with [Connect Email](/email/forwarding) and come back here.
</Warning>

* **Email forwarding configured** — see [Connect Email](/email/forwarding).
* **HubSpot connected** — see [Connect HubSpot](/integrations/hubspot/connect).

## How conversations land in HubSpot

```mermaid theme={"dark"}
flowchart LR
  A[Customer emails your support address] --> B[AI replies from the same address]
  B --> C{AI can resolve?}
  C -- Yes --> D[Thread stays email-only]
  C -- No --> E[Handoff]
  E --> F[HubSpot ticket + conversation thread]
  F --> G[Rep replies — lands in customer inbox]
```

## Setting up

<Steps>
  <Step title="Confirm email forwarding works">
    Open [**Channels → AI Email**](https://platform.open.cx/channels/configure/mail) in the OpenCX dashboard. Your forwarding address should be listed and verified. Send a test email and confirm it reaches the [Inbox](https://platform.open.cx/inbox).
  </Step>

  <Step title="Confirm HubSpot is connected">
    In [**Settings → Integrations**](https://platform.open.cx/settings/integrations), open **HubSpot**. The status should show the integration is connected, preferably via **OAuth Public App**.
  </Step>

  <Step title="Set up email signatures (optional)">
    If you want branded signatures on outgoing replies, configure them now. See [Email signatures](/integrations/hubspot/connect#email-signatures).
  </Step>

  <Step title="Trigger a test handoff">
    Send a test email to your connected address and respond with something that causes the AI to escalate. Or go to the [Inbox](https://platform.open.cx/inbox) and manually hand off the session.
  </Step>

  <Step title="Verify in HubSpot">
    A ticket should appear with the conversation summary and transcript, and an internal handoff comment should be posted on the associated conversation. Reply publicly from HubSpot and confirm:

    1. The reply arrives in the customer's email inbox.
    2. Your email signature is appended (if configured).
    3. The reply shows as an agent message in the [OpenCX Inbox](https://platform.open.cx/inbox).
  </Step>
</Steps>

## What the rep sees

* A **HubSpot ticket** with the conversation summary as the description.
* A **conversation thread** in the HubSpot inbox with the full AI-to-customer exchange.
* The contact's HubSpot record linked to the ticket (name, email, company, deals).
* An internal **handoff comment** with the AI's escalation reason, sentiment, and language.
* Public replies are delivered to the customer's inbox with the configured email signature.

## Channel-specific details

<AccordionGroup>
  <Accordion title="Per-domain email signatures" icon="signature">
    Outgoing email replies through HubSpot automatically append the signature configured for the sender's email domain. Exact domain matches take priority over wildcard patterns. Set up signatures at [**Settings → Integrations → HubSpot**](https://platform.open.cx/settings/integrations) — see [Email signatures](/integrations/hubspot/connect#email-signatures).
  </Accordion>

  <Accordion title="HTML formatting preserved" icon="code">
    AI-generated replies are converted to HTML before sending through HubSpot's email channel. Formatting — bold, lists, links — renders correctly in the customer's email client.
  </Accordion>

  <Accordion title="Same thread reuses the ticket" icon="rotate">
    When a customer replies into the **same email thread** (HubSpot keeps it as one conversation), OpenCX reuses the existing session and its associated ticket — no duplicate ticket is created. A fresh thread from the same contact (new subject / new `Message-ID` chain) is treated as a new conversation and gets its own ticket.
  </Accordion>

  <Accordion title="Public vs internal replies" icon="eye">
    Only **public** replies from HubSpot are delivered to the customer. Internal comments stay private — they never reach the customer's inbox. Double-check you're posting on the **Reply** tab, not the **Comment** tab.
  </Accordion>
</AccordionGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="AI Email Support" icon="envelope" href="/email/introduction">
    The channel itself — forwarding setup, flow, troubleshooting.
  </Card>

  <Card title="Connect HubSpot" icon="plug" href="/integrations/hubspot/connect">
    OAuth setup, AI sender, email signatures.
  </Card>

  <Card title="HubSpot Overview" icon="hubspot" href="/integrations/hubspot/overview">
    What else HubSpot lights up across every channel.
  </Card>

  <Card title="Troubleshooting" icon="wrench" href="/integrations/hubspot/troubleshooting">
    Tickets not created, replies not syncing, signatures missing.
  </Card>
</CardGroup>
