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

# Slack

> Post messages, notify channels, create tickets, and look up users in Slack from your agents. Ideal for internal post-call handoffs and incident routing.

# Slack Integration

Give your agents the ability to post into Slack — alerting a team channel when a VIP hangs up, opening an incident thread when a call hits the escalation rules, or DM'ing the on-call engineer with a structured summary. Perfect for **voice-to-humans handoff**: end a call, then route the context to the right internal team without anyone watching a queue.

## Connecting Slack

Connection goes through Slack's verified OAuth flow — you do **not** need to register your own Slack app, paste a bot token, or manage signing secrets. thinnestAI brokers the OAuth through Composio.

### Step 1: Connect via OAuth

1. Navigate to **Agents** and select your agent.
2. Open the **Tools** section and click **Add Tool**.
3. Select **Slack**.
4. Click **Connect Slack**.
5. A Slack sign-in popup opens. Authenticate with the workspace you want the agent to post into, review the requested scopes, and click **Allow**.

The popup closes automatically when the connection is complete. The modal shows a green **Connected** badge for that workspace.

> **Workspace-scoped.** Each Slack connection is bound to one workspace. To post into multiple workspaces, add the Slack tool to the agent once per workspace — each connection is stored separately.

### Step 2: Choose Allowed Actions

Four capability toggles control which action groups the agent can invoke:

| Toggle                 | Default | What it unlocks                               |
| ---------------------- | ------- | --------------------------------------------- |
| **Send Messages**      | ✅ On    | Post to channels, DMs, and threads            |
| **Channel Management** | Off     | Create channels, invite/remove users, archive |
| **User Directory**     | ✅ On    | Look up users by email or name, fetch profile |
| **Files & Reactions**  | Off     | Upload files, add emoji reactions             |

Leave **Channel Management** off unless the agent specifically needs to create channels or modify membership — most post-call notification flows only need **Send Messages** + **User Directory**.

## Available Actions

### Messaging (4)

| Action                  | Description                                      |
| ----------------------- | ------------------------------------------------ |
| **Send Message**        | Post a message to a channel or DM                |
| **Send Threaded Reply** | Reply inside an existing thread (by `thread_ts`) |
| **Update Message**      | Edit a previously-sent message                   |
| **Delete Message**      | Remove a message the agent sent                  |

### Channels (3) *— opt-in*

| Action                     | Description                                 |
| -------------------------- | ------------------------------------------- |
| **Create Channel**         | Create a new public or private channel      |
| **Invite User to Channel** | Add a user to a channel by user ID or email |
| **Archive Channel**        | Archive a channel (soft-delete)             |

### Users (3)

| Action                 | Description                                       |
| ---------------------- | ------------------------------------------------- |
| **Find User by Email** | Look up a workspace user by email address         |
| **List Users**         | Paginate the workspace directory                  |
| **Get User Info**      | Fetch profile, timezone, and status for a user ID |

### Files & Reactions (3) *— opt-in*

| Action              | Description                                         |
| ------------------- | --------------------------------------------------- |
| **Upload File**     | Attach a file (PDF, image, transcript) to a message |
| **Add Reaction**    | React to a message with an emoji                    |
| **Remove Reaction** | Remove a previously-added reaction                  |

## Voice-AI Use Cases

Slack pairs naturally with the voice tools for internal handoffs — context flows from the caller into the team's existing incident or CRM channels without anyone polling a queue.

### VIP Escalation Alert

```
Agent instructions:
"When a caller is tagged as VIP or Tier-1 customer:
1. Send a Slack message to #vip-escalations with:
   - Customer name and company
   - Reason for call (one line)
   - Link to the call transcript
2. @-mention the account owner from the CRM."
```

### Incident Routing

```
Agent instructions:
"If a caller reports an outage or billing emergency:
1. Find the on-call engineer via Find User by Email (on-call@company.com)
2. Send a DM with the call summary and a link to the recording
3. Post a public message in #incidents with the issue category."
```

### Sales Handoff

```
Agent instructions:
"At the end of a qualified lead call:
1. Look up the AE assigned to the territory
2. DM them the caller's name, pain points, and budget signal
3. Post a brief summary in #sales-handoffs with a Play Recording link."
```

## Example: Incident-Handoff Agent

Build a voice agent that takes emergency calls and routes context to Slack automatically.

### Agent Setup

| Field | Value                |
| ----- | -------------------- |
| Name  | Emergency Intake     |
| Model | GPT-4o               |
| Tools | Slack, Google Sheets |

### Agent Instructions

```
You are an emergency intake agent. Every inbound call is treated
as potentially urgent. Your job is to collect context fast and
route the right person.

WORKFLOW:
1. During the call, collect: caller name, company, severity (1-4),
   affected system, brief description.
2. If severity is 1 or 2:
   a. Find user by email: oncall@company.com
   b. Send them a Slack DM with the collected context + recording link
   c. Post a public message in #incidents with severity tag
3. If severity is 3 or 4:
   a. Log to Google Sheets "Incident Backlog"
   b. Post in #incidents-low with no @-mention
4. Always confirm with the caller: "I've paged {name} in Slack,
   they'll call you back within {SLA} minutes."

RULES:
- Never paste raw customer PII into public channels. Use DMs for
  phone numbers, account numbers, etc.
- Always include the recording link so the responder has context.
- Severity 1 = outage affecting >10 users. Severity 2 = single-
  customer outage. Severity 3 = degraded. Severity 4 = question.
```

## Combining with Other Tools

| Combination           | Use Case                                                       |
| --------------------- | -------------------------------------------------------------- |
| Slack + Voice         | Post-call escalation, VIP alerts, incident routing             |
| Slack + Google Sheets | Log every Slack handoff for weekly review                      |
| Slack + Gmail         | Follow a Slack DM with an email summary for audit trail        |
| Slack + CRM Webhooks  | Notify a channel whenever a deal stage changes mid-call        |
| Slack + WhatsApp      | Dual-channel: Slack for internal team, WhatsApp for the caller |

## Security & Privacy

* **OAuth tokens** are encrypted at rest. thinnestAI never sees your Slack password.
* **Per-user scoping** — Each user's workspace connection is isolated. An agent owned by User A cannot post into User B's workspace.
* **Revoke access** — Disconnect from the config modal, or revoke directly from [Slack → Settings & administration → Manage apps](https://slack.com/apps/manage).
* **Scopes requested** — `chat:write`, `users:read`, `users:read.email`, optionally `channels:manage`, `files:write`, and `reactions:write` depending on toggles.
* **No audit bypass** — every agent-posted message appears in Slack's audit log with the connected user as the author.

## Troubleshooting

| Issue                                   | Solution                                                                                                                                                          |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| "Channel not found"                     | The bot must be invited to private channels. Public channels work by default once authorized.                                                                     |
| "Missing scope: channels:manage"        | You toggled on **Channel Management** after the initial connect — reconnect to refresh scopes.                                                                    |
| Messages arrive with a generic bot name | Slack displays the connected user's name on agent-sent messages. Customize via Slack workspace settings → App icon.                                               |
| "not\_in\_channel" error                | Agent tried to post in a channel it isn't a member of. Use **Invite User to Channel** first, or post from a channel the user is already in.                       |
| DMs fail to unknown users               | **Find User by Email** returns null if the email isn't tied to a workspace account. Check the user's Slack primary email matches what the agent is searching for. |

## Next Steps

* **[Voice](/docs/voice)** — Pair Slack with inbound calls for instant handoff.
* **[Google Sheets](/docs/tools/google-sheets)** — Log every Slack handoff into a shared tracker.
* **[WhatsApp](/docs/tools/whatsapp)** — Customer-facing follow-up to pair with internal Slack routing.
