# Slack and Microsoft Teams

> Let people ask the isotope's agent questions from Slack or Teams.

A **chat app** puts the isotope's agent where your people already talk. Someone mentions the app in a channel, or messages it directly, and the agent answers in that thread with the same tools, files and connectors it has in the console. Each question becomes a conversation you can open in the console.

Only members of the isotope get answers. The isotope matches the email Slack or Teams has verified for the sender against its own members, and only for people in the workspace or tenant the app was added to. Anyone else is told they are not a member, and that an administrator can invite their address; in a channel, the reply leaves their address out. Chat apps answer only while **Settings → Channels** is on.

## Slack

1. In the console, open **Settings → Connections → Add connection → Slack** and choose **Add to Slack**.
2. drkm's relay shows the address of the isotope the workspace will be connected to. Continue only if it is your isotope's address. Then pick your workspace and approve the Creature app. If your workspace requires admin approval for apps, Slack sends the request to an admin, and you add the app again once it is approved.
3. Slack returns you to **Settings → Connections**, with the workspace connected. Turn on **Settings → Channels** if it is off.
4. Invite the app to any public or private channel it should answer in with `/invite @Creature`, then mention it there. Anyone can also open **Creature** from Slack's top bar, or message it directly, without an invite.

**Settings → Channels** lists the channels Creature is in, with how many questions you asked in each and when, and the questions you sent it directly. A private channel is listed only for people who asked Creature there. Open a channel to see your threads there, and open a thread to follow it as it is answered or to reply from the console. Slack threads are listed there and in any project you move them to, not with your console threads. A workspace that added the app before it could list its channels shows how to allow it (choose **Add to Slack** again), and until then lists only the channels you asked in.

Slack sends the app's messages to drkm's relay at `app.drkm.com`. The relay passes each workspace's messages to the isotope that added the app, over a connection the isotope opens, so the isotope needs no public address. When several isotopes in one mesh hold the same workspace, one of them answers, as with a TAK server. Isotopes outside one mesh do not share a workspace: the one that added the app last answers it. The isotope reads each question's sender, words and files from Slack itself, not from the relay. It needs outbound HTTPS to `app.drkm.com` and `slack.com`. The relay keeps no messages and no tokens: the workspace's bot token is sealed to the isotope while it is being added, and the isotope stores it encrypted.

While the agent works, the thread's status bar shows what it is doing, the way Slack shows someone typing: waiting for a model, thinking, or the tool it is running. Then the answer arrives as Markdown, with any files it attached. The agent reads the thread before the question, or the channel's recent messages when the question starts a thread.

To move the app to another workspace, choose **Add to Slack** again. To disconnect, remove the Slack connection in **Settings → Connections** and remove the app from the workspace in Slack.

## Microsoft Teams

Teams reaches the isotope through an Azure bot, so the isotope must be reachable from the internet over HTTPS.

1. In the Azure portal, create an **Azure Bot** with the **Single Tenant** type. From its **Configuration** page, copy the **Microsoft App ID** and the **App Tenant ID**. Then, under **Manage Password**, create a client secret.
2. Set the bot's **Messaging endpoint** to `https://<your isotope>/teams/messages`.
3. Under **Channels**, add **Microsoft Teams**.
4. In the console, open **Settings → Connections → Add connection → Microsoft Teams**. Enter the app ID, tenant ID and client secret, save, and then run **Test connection**.
5. Package a Teams app for the bot, with `personal`, `team` and `groupChat` scopes and `supportsFiles` on, and install it from Teams or the Teams admin center.

In a personal chat, the answer streams: Teams shows the step the agent is on, then the answer. In a channel or group chat, Teams shows the bot typing, then the answer. There, the bot hears only messages that mention it. Teams does not let a bot read a conversation's earlier messages. The bot sends no files: a file the agent attached stays on the isotope, and the answer names it.

<Note>
Slack and Teams chat apps are part of the commercial product. They connect to commercial Slack and the public Microsoft cloud, not GovSlack or Microsoft 365 GCC High.
</Note>
