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

# Answer questions in Slack

> Mention the bot or send it a direct message, and it answers in the thread from your knowledge, with numbered sources. Beta.

Connect your Slack workspace and people can ask your assistant without leaving Slack. Mention the
bot in a channel it has been invited to, or send it a direct message, and it replies **in the
thread** with an answer grounded in your knowledge and a numbered list of sources linking to each.
When the knowledge you connected does not answer the question, it says **"I don't know"** rather
than guessing.

> [!NOTE]
>
> Slack is in beta. It has not yet run against a real Slack workspace, and it is available only once
> your deployment's operator has registered the Slack app. Until then, **Integrations → Slack** says
> so.

## Connect your workspace

You need the owner or admin role.

1. In the console, open **Integrations → Slack**.
2. Choose the assistant that should answer, and select **Add to Slack**.
3. Slack asks you to allow the app in your workspace. Allow it, and you are back in the console with
   the workspace connected.
4. In Slack, invite the bot to each channel where people should be able to mention it:
   `/invite @<bot name>`. Direct messages work without an invitation.

You can change the assistant at any time, or disconnect the workspace, on the same page.

## What it can and cannot do

| | |
| - | - |
| **Reads** | A message that mentions it, and a direct message to it. Nothing else in your workspace: it cannot read channel history or your member list |
| **Writes** | One reply in the thread of the message it was asked in |
| **Answers from** | The one assistant you chose, and only your organisation's knowledge |
| **Asks as** | The workspace's connection, not as the person who asked. Everyone in the workspace shares the same permissions: ask an assistant, and nothing more |
| **Records** | Each question as a conversation labelled *Asked in Slack*, which your owners and admins see under Conversations and in analytics. Each answer counts against your monthly allowance |

The permissions Slack asks you to allow are `app_mentions:read`, `chat:write` and `im:history`, and
no others.

A Slack workspace can be connected to one MITHUNAI organisation, and an organisation to one Slack
workspace.

**Only people in your own workspace are answered.** Someone from another company in a shared
channel or through Slack Connect gets no reply, so inviting the bot there does not open your
knowledge to them.

**Removing the app in Slack disconnects it here too**, and so does revoking its token: nothing more
is answered, and **Integrations → Slack** shows it disconnected.

## Approve AI-employee actions from Slack

This is **Beta**, off by default, and **access on request**. When your deployment has it switched on, an AI employee's action that is waiting for approval can be
posted to Slack as a card with **Allow once**, **Always allow** and **Deny**.

* **Choose where cards go.** An owner or admin whose Slack account is linked mentions the bot with
  `approvals here` in the channel that should receive them (invite the bot there first), and
  `approvals off` to stop.
* **Link your Slack account once.** Send the bot `link` in a direct message. It replies with a link
  that works once, for fifteen minutes; open it signed in to the console, check the Slack account it
  shows, and continue. The console shows a six-digit code: send it to the bot in that same direct
  message within ten minutes. Only then is your Slack account linked -- opening the link alone links
  nothing. You can unlink under **Integrations → Slack**. Your Slack account is never matched to you
  by e-mail.
* **A card is decided as you.** Pressing a button decides as the person the Slack account is linked
  to, with that person's own permission to approve, exactly as in the console: the payload you saw,
  two-person rules and expiry all apply. The card then shows what was decided. Someone whose Slack
  account is not linked is told, privately, how to link, and nothing is decided.
* **Always allow is never offered** for an action that moves money, deletes, publishes or changes
  access, or one that always needs a person. The console refuses it too.

> [!WARNING]
>
> A link needs both sides: the person who opens it, signed in, and the Slack account that asked for
> it, which must send back the code that person was shown. A forwarded link opened by someone else
> links nobody unless the code reaches the Slack account too -- so send the code only from your own
> Slack account, and never give it to anyone.

Your deployment's operator switches this on with `MITHUNAI_SLACK_APPROVALS` and sets the Slack app's
**Interactivity Request URL**. It needs no permission beyond the three above.

## When it does not answer

* **No reply at all**: the bot is not in the channel (invite it), the workspace is not connected,
  the person asking is from another workspace, or your organisation is suspended.
* **"I can't answer right now"**: your monthly answer allowance is used up, or the assistant could
  not be reached. Try again later, or check **Analytics**.
* **"I don't know"**: the assistant found nothing in your knowledge that answers the question. See
  [Coverage gaps](https://docs.mithunai.com/analyze/coverage-gaps.md) for what to add.
* **An approval card still shows its buttons after the action was decided elsewhere**: a card is not
  updated when the action is decided in the console or expires. Pressing a button then says it is
  already decided.
* **Approval cards stop arriving**: the bot was removed from the approvals channel (invite it back), or
  the person who installed the bot left or lost access to AI employees (reconnect the workspace).
  Approve in the console meanwhile.
* **The console names your Slack account by an ID, not a name**: the bot cannot read your workspace's
  member list, so the link page shows the Slack user ID. Check it against your own profile in Slack.

## Security

* Every request from Slack is verified with your deployment's signing secret, over its exact bytes,
  and refused if it is more than five minutes old.
* The organisation and assistant always come from the connection made in the console, never from
  the message, so a message cannot reach another organisation's knowledge.
* A message is treated as a question and nothing more. Instructions inside it cannot change what
  the assistant may do.
* The bot's token is stored sealed and is never shown. Disconnecting revokes it.
* A press on an approval card is verified the same way, and decides only as the person the Slack
  account was linked to, never as the workspace.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.