> ## 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.

# Slack

> Capture messages and talk to the Modem Agent from Slack

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 Slack integration captures messages from your Slack workspace (you choose which channels) and lets your team interact with the Modem Agent directly from Slack.

## Prerequisites

* Admin access to the Slack workspace you want to connect (or permission to install apps)
* A Modem organization

## Setup

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

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

    <Info>
      Modem requests access to read messages in channels and respond to users who interact with the Modem Agent.
    </Info>
  </Step>

  <Step title="Add Modem to channels">
    Invite the Modem bot to channels you want it to monitor. See [Adding Channels](#adding-channels) below.
  </Step>

  <Step title="Talk to the agent">
    DM or @mention the Modem bot to ask questions and take action. See [Talking to the Agent](#talking-to-the-modem-agent-in-slack).
  </Step>
</Steps>

## Adding Channels

Modem monitors any channel the bot has been added to. You can add the bot to a channel in a few ways:

* Use `/invite @Modem` in the channel
* Mention `@Modem` in the channel
* Open the channel's **Members** tab and add Modem under **Integrations**

### Recommended Channels

* `#support` or `#help`: Customer support requests
* `#feedback` or `#suggestions`: Feature requests and ideas
* `#bugs` or `#issues`: Bug reports
* Slack Connect channels shared with your customers

### Channels to Avoid

* Social channels
* Bot notification channels (high noise, low signal)
* Channels with sensitive information

### Auto-Join by Channel Prefix

If you use Slack Connect or follow a naming convention for external channels (e.g. `#ext-acme`, `#ext-bigcorp`), you can configure Modem to automatically join new public channels that match a prefix.

Go to **Settings** → **Integrations** → **Slack** and enable **Auto-join channels**. Add one or more prefixes (e.g. `ext-`, `partner-`). When a new public channel is created or renamed to match a prefix, Modem will join it automatically.

<Note>Auto-join only applies to public channels. Private channels must be added manually.</Note>

## Talking to the Modem Agent in Slack

The same Modem Agent available on the web is also available directly in Slack. You can DM the Modem bot or @mention it in a channel to ask questions, get summaries, or take action on your data without leaving Slack.

You can reach the agent two ways:

* **Direct message.** Open a DM with the Modem bot to start a conversation.
* **@mention in a channel.** Mention @Modem in any channel where the bot has been added.

A few examples of what you can do:

<Prompt text="What are users complaining about this week?" />

<Prompt text="@modem Summarize the last 7 days of feedback from #support" />

<Prompt text="@modem Create a Linear ticket for the OAuth bug reports and assign it to me" />

<Prompt text="@modem Ask Cursor to fix the login timeout bug" />

<Prompt text="@modem Draft release notes for what we shipped this sprint" />

<Info>The Modem bot must be added to channels where you want to use @mentions.</Info>

### Who Can Talk to Modem?

Only authorized users can interact with the Modem Agent in Slack. Authorization requires two things:

1. **A linked Modem account.** Your Slack identity must be connected to a Modem account. If it isn't, the bot will prompt you to connect your account.
2. **Organization membership.** You must be a member of the Modem organization connected to that Slack workspace. If your account is linked but you're not a member, you'll see an access denied message and need an administrator to invite you.

### Auto-Join for Slack Workspace Members

By default, only users who have been invited to your Modem organization can interact with the agent. If you want your whole Slack workspace to have access, you can enable **Allow Slack workspace members to join Modem** in **Settings** → **Integrations** → **Slack**.

When enabled, any member of your Slack workspace can automatically join your Modem organization by linking their Slack account. This is useful if your Slack workspace already represents your team and you don't want to manage invitations separately.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Messages aren't appearing">
    * Verify the channel is selected in integration settings - Check that the Modem app is installed in the workspace - For private
      channels, ensure Modem has been added to the channel - Allow a few minutes for initial sync to complete
  </Accordion>

  <Accordion title="Historical messages are missing">
    Slack API limits historical access to approximately 90 days for free workspaces and 10,000 messages for paid workspaces. Modem can
    only access what Slack makes available.
  </Accordion>

  <Accordion title="User emails aren't showing">
    User email visibility depends on workspace settings. If your workspace restricts email visibility, Modem won't be able to access
    them.
  </Accordion>
</AccordionGroup>

## Disconnecting

To disconnect Slack:

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

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

To fully remove Modem from your Slack workspace:

1. Go to your Slack workspace settings
2. Navigate to **Apps**
3. Find Modem and click **Remove**
