# Slack

import Screenshot from "@docs/Screenshot.astro"
import SurfaceTabs from "@docs/SurfaceTabs.astro"
import AskRen from "@docs/AskRen.astro"

Ren is an app in your Slack workspace. Map a Slack channel to a Ren [project](/docs/concepts/projects/) so people can mention Ren there. Ren replies in a thread, which maps to one Ren [chat](/docs/concepts/chats/). DMs use your personal space.

## Install Ren in Slack

Connect Slack once for your organization. You need:

- **A Ren organization admin:** Only admins can connect Slack and map channels.
- **Permission to install apps in your Slack workspace:** If your workspace needs app approval, a Slack workspace admin has to approve Ren.

Each Slack workspace can connect to only one Ren organization.

<SurfaceTabs>
<Fragment slot="app">

1. Go to **Settings → Mentions**.
2. In the **Communication** section, select **Install Ren on Slack**.
3. Approve the permissions Ren asks for in Slack.

<Screenshot
  shot="channels/slack/install"
  alt="Settings Mentions with the Slack row and the Install Ren on Slack button"
/>

</Fragment>
<Fragment slot="cli">

```sh
ren slack install
```

Open the Slack authorization URL it prints and approve the permissions.

</Fragment>
</SurfaceTabs>

After installation, Ren joins your public channels and the **Connect your Slack channels** dialog opens. Map channels to projects, or select **Skip for now**.

Ren also sends the person who installed it a DM suggesting work it can do.

## When to use Slack

Use Slack for requests that come up in team conversations, like summaries, lookups, or drafts. Ren reads thread context and shares progress and results with the channel. Use the [web app](/docs/surfaces/web-app/) for longer sessions or actions that need approval.

## Talk to Ren

@mention Ren in a mapped channel:

```text
@Ren summarize the open bugs from this week and draft a fix for the top one
```

- **Reply:** Ren replies in a thread under your mention.
- **Thread context:** When you mention Ren inside an existing thread, it reads the messages since its last mention (or the whole thread, the first time), including files.
- **Status:** Ren adds 👀 when it starts and ✅ when it replies. Longer requests show a task list. Replies may include up to three follow-up buttons. Selecting a button sends that suggestion as your next message.

To continue a chat in more depth, open it in the [web app](/docs/surfaces/web-app/). Select **Open in Slack** in the chat header to get back to the thread.

## Work together in a thread

Several people can use one chat through the same Slack thread. Each mention or follow-up selection runs as its sender, or the fallback sender if account matching fails. See [Who Ren acts as](/docs/channels/#who-ren-acts-as) for space membership requirements.

## Add Ren to channels

Ren only responds in channels that are mapped to a project. Each channel maps to one project.

<SurfaceTabs>
<Fragment slot="app">

1. Open the project and go to the **@Ren** tab.
2. On the **Slack** card, pick a channel and an optional fallback sender.
3. Changes save automatically.

You can also map channels for every project at once from **Settings → Mentions → Slack**: select a project, then select the channel to route to it.

<Screenshot
  shot="channels/slack/map-channel"
  alt="A project's @Ren tab with a Slack channel selected on the Slack card"
/>

</Fragment>
<Fragment slot="ask-ren">

<AskRen prompt="Map the #support Slack channel to the Support project." />

Mapping needs an organization admin, so ask from an admin account.

</Fragment>
<Fragment slot="cli">

```sh
ren slack channels list
ren slack channels set <channel-id> --project-id <project-id> --fallback-sender-user-id <user-id>
```

</Fragment>
</SurfaceTabs>

When a channel is mapped for the first time, Ren posts "This channel is now connected to the Ren project …" in it.

### Mention Ren every time

In channels, @mention Ren to request a response, including for follow-ups. Ren also reads thread context and runs the background schedules described below.

### Public and private channels

Ren joins public channels by itself when you map them. For a **private channel**, first run `/invite @Ren` in the channel so it appears in the list.

### Who Ren acts as

Ren matches you to a Ren user if you signed in to Ren with Slack, or by the email on your Slack profile. You must also be a member of the project's [space](/docs/concepts/spaces/).

The **fallback sender** is the Ren user a chat runs as when the person who wrote the message has no matching Ren account or isn't in the space. See [Who Ren acts as](/docs/channels/#who-ren-acts-as).

## DMs

Open Ren from the **Messages** tab of the Ren app in Slack and send a message.

- DMs run in the **Default** project in your **personal space**, so they don't need a mapping.
- Each new message at the top level starts a new chat. Reply in its thread to continue it. You don't need to @mention Ren in DMs.
- Your Slack account must match a Ren account in the organization. Ren matches you by signing in with Slack or by the email on your Slack profile.

## Automatic summaries, profiles, and suggestions

Installing Slack starts member schedules. Mapping a channel starts channel schedules and tells you they are active. These run without individual requests.

- **Channel summaries:** Each morning, Ren reads new messages in mapped channels and updates their summaries. It doesn't post a reply.
- **Channel suggestions:** Once a week, midweek during working hours, Ren may post one suggestion with up to three follow-up buttons. It posts only suggestions it's confident will be useful.
- **Member profiles:** Twice a week, Ren builds each member's private profile from their Slack messages. Once a week, it may DM one suggestion. These schedules start for existing members on installation and for new members when they join.
- **Unanswered suggestions:** Ren waits for a reply before posting another suggestion. It dismisses unanswered suggestions after 14 days. Those suggestions may return after 30 days. Declined suggestions never return.
- **Reduced frequency:** After three consecutive weekly runs without a useful suggestion, Ren checks monthly.
- **Tasks:** Each suggestion is a task. Channel suggestions are [tasks](/docs/concepts/tasks/) in the mapped project, visible to the project's space. DM suggestions are tasks in your personal space.

These run as [schedules](/docs/concepts/schedules/) in the mapped project and in each member's personal space, using the organization's time zone. Channel summaries and profiles are kept as files in [file stores](/docs/concepts/storage/) in those projects.

To turn them off, ask Ren, or pause or delete the schedules on the **Scheduled** page:

```text
Stop posting suggestions in #support.
```

Unmapping a channel, disconnecting Slack, or reconnecting it doesn't stop these schedules.

## Spaces and projects

The mapped project supplies instructions, apps, skills, and storage. Its space determines membership and available credentials.

## FAQ

<details>
<summary>Who can use Ren in Slack?</summary>

Anyone in a mapped channel can send requests. People without Ren accounts use the channel's fallback sender. DMs need a matching Ren account in the organization.

</details>

<details>
<summary>Which credentials does Ren use?</summary>

The [credentials](/docs/concepts/credentials/) available to the mapped project's space, not the sender's. DMs run in your personal space, so they can also use your personal credentials.

</details>

<details>
<summary>What can Ren post back in Slack?</summary>

Text, tables, files it creates, and follow-up buttons. Ren can also post in other channels mapped to the same project.

</details>

<details>
<summary>Can I attach files?</summary>

Yes. Ren receives files and snippets attached to the message it's mentioned in and to earlier messages in the thread. Files over 32 MB are skipped, and Ren sees a note that they were.

</details>

<details>
<summary>Can Ren talk to other bots?</summary>

Ren ignores DMs from other bots. In a channel, a mention from another app is handled like any mention and runs as the channel's fallback sender, because an app has no Ren account.

</details>

<details>
<summary>What happens when Ren needs permission?</summary>

Slack chats deny actions that need approval and continue without them. Configure [project permissions](/docs/concepts/projects/#permissions) before sending requests.

</details>

<details>
<summary>What happens when a task links a Slack thread?</summary>

Mentions in that thread go to the task's chat instead of the channel's project, as long as the task is open and assigned to a project. This works even in a channel that isn't mapped.

</details>

<details>
<summary>Does Ren ask to connect an app from Slack?</summary>

No. The **Connect** card for an app appears only in the web app. Open the chat in the web app to connect the app, or connect it from the project first.

</details>

## Troubleshooting

### Ren doesn't respond at all

- **You replied without a mention:** In channels, every message to Ren needs an @mention, including follow-ups in a thread.
- **The channel isn't mapped, and Ren isn't in it:** Map the channel, or for a private channel, run `/invite @Ren` first.
- **Slack was disconnected:** Check that Slack shows as **Connected** in **Settings → Mentions**.
- **Ren started but never replied:** If only the 👀 is showing, open the chat in the web app to see what happened.

### "This channel isn't connected to a Ren project yet."

The channel has no mapping. An admin can select **Connect to Ren** under the message, or map the channel in **Settings → Mentions → Slack**.

### A private channel doesn't appear in the list

Ren can only see private channels it has been invited to. Run `/invite @Ren` in the channel, then reopen the list.

### "Couldn't map your Slack account to a Ren user."

Ren couldn't match the sender to a Ren user, and the channel has no fallback sender. Either sign up for Ren with the same email as your Slack profile, or have an admin set a fallback sender on the channel's mapping.

In a DM, there's no fallback sender. Make sure the email on your Slack profile matches your Ren account.

### "Neither your Slack account nor the channel's fallback user is a member of this project's space."

The project belongs to a [space](/docs/concepts/spaces/) that neither you nor the fallback sender belongs to. Add yourself to the space, or pick a fallback sender who is a member.

### "The project connected to this channel no longer exists."

The mapped project was deleted. Map the channel to another project.

### "Your private Ren project isn't set up yet."

Your account doesn't have a personal space in the organization that installed Ren in Slack. Sign in to Ren in that organization, then DM Ren again.

### "Ren hit a snag and couldn't finish"

The chat failed partway through, and Ren marks your message with ❌. Open the chat in the web app to see the error, then mention Ren again to retry. If the message says your organization has run out of credits, add credits in **Settings → Billing & plans**.

### "This Slack workspace is already connected to another Ren organization."

A Slack workspace can connect to only one Ren organization. Disconnect it from the other organization first.

## Disconnect

- **Unmap a channel:** Clear the channel on the project's **@Ren** tab, or remove it in **Settings → Mentions → Slack**. Ren stops responding to new mentions there. Its default schedules keep running until you turn them off.
- **Disconnect Slack:** In **Settings → Mentions → Slack**, select **Reset mappings**. This clears every channel mapping and uninstalls Ren from Slack. You can connect again later.