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

# Intercom

> Capture conversations and let the agent act in Intercom

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

The Intercom integration captures conversations from your Intercom workspace in real time and gives the Modem Agent the ability to search conversations, reply to customers, manage tags, and more.

<Info>
  Agent write access to Intercom (replying, tagging, managing conversations) is **disabled by default**. An admin can enable it from
  **Settings** → **Integrations** → **Intercom**.
</Info>

## Prerequisites

* Admin access to the Intercom workspace you want to connect
* A Modem organization

## Setup

<Steps>
  <Step title="Start the connection">
    Go to **Settings** → **Integrations** → **Intercom** in your Modem dashboard and click **Connect Intercom**.
  </Step>

  <Step title="Authorize Modem">
    You'll be redirected to Intercom to authorize the Modem app. Review the permissions and click **Authorize**.
  </Step>
</Steps>

After authorization, Modem automatically begins a historical backfill of past conversations and starts receiving new conversation events via webhooks.

## What Gets Captured

### Conversations

Modem captures conversation activity as it happens via webhooks:

* **New conversations** created by users
* **User and admin replies** (including internal notes)
* **State changes**: opened, closed, snoozed, unsnoozed
* **CSAT ratings** and customer remarks
* **Tags** applied to conversations
* **Fin AI involvement**: whether Intercom's Fin AI agent participated in the conversation

### Contacts

Modem syncs Intercom contacts (users, leads, and visitors) and links them to Modem [people](/docs/guides/people) profiles using email address matching. This gives you a unified view of each person's activity across Intercom and your other connected sources.

## Historical Backfill

When you first connect Intercom, a historical backfill of past conversations starts automatically. This runs in the background and does not block real-time webhook processing.

## Agent Capabilities

The Modem Agent can interact with your Intercom workspace using the `intercom_api_request` tool. This gives it flexible access to Intercom's REST API.

### What the agent can do

* **Search conversations** by keyword, tag, or contact
* **Read contact details** including user, lead, and visitor profiles
* **Reply to conversations** (requires write access)
* **Add and manage tags** on conversations (requires write access)
* **Add internal notes** to conversations (requires write access)
* **Close, snooze, or reopen conversations** (requires write access)

### Example prompts

<Prompt text="Summarize the last 10 Intercom conversations tagged 'billing'" />

<Prompt text="Find all open Intercom conversations from the last 24 hours" />

<Prompt text="Reply to the latest Intercom conversation from jane@acme.com saying we're looking into it" />

<Prompt text="Tag all open Intercom conversations mentioning 'SSO' with 'sso-issue'" />

<Info>
  To enable the agent to write to Intercom (reply, tag, manage conversations), go to **Settings** → **Integrations** → **Intercom** and
  toggle **Allow AI agent to write**.
</Info>

## Troubleshooting

<AccordionGroup>
  <Accordion title="Conversations aren't appearing">
    * Verify the integration is connected in **Settings** → **Integrations** → **Intercom** - Allow a few minutes for webhook delivery
      and processing - Check that the conversation type is supported (user conversations, not outbound messages)
  </Accordion>

  <Accordion title="Historical conversations are missing">
    A historical backfill starts automatically when you first connect Intercom. If it appears incomplete, try disconnecting and
    reconnecting the integration, or contact [support@modem.dev](mailto:support@modem.dev).
  </Accordion>

  <Accordion title="Agent can't reply or tag conversations">
    Agent write access is disabled by default. An admin must enable **Allow AI agent to write** in **Settings** → **Integrations** →
    **Intercom**.
  </Accordion>

  <Accordion title="Contacts aren't linking to people">
    Contacts are matched to Modem people by email address. If a contact doesn't have an email set in Intercom, it won't be linked
    automatically.
  </Accordion>
</AccordionGroup>

## Disconnecting

To disconnect Intercom:

1. Go to **Settings** → **Integrations** → **Intercom**
2. Click **Disconnect**

This stops new data from being captured. Historical data remains in Modem after disconnecting.
