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

# Slack

> Configure Slack sign-in, Slack app callbacks, events, and interactivity for Roomote.

Slack can be both a Roomote sign-in provider and a communications provider.
You may use one Slack app for both jobs.

## What you need

* a Slack workspace where you can create and install apps
* a stable public Roomote URL
* access to Roomote setup or deployment environment variables

Use `<public-url>` below for the exact public URL printed by local development
or configured for your self-hosted deployment.

## Fast path

In `/setup`, choose **Create Slack app from manifest**. Roomote opens Slack's
create-app flow with redirect URLs, webhook URLs, interactivity, scopes, and
events prefilled for the current public URL.

After Slack creates the app:

1. copy **Client ID**, **Client Secret**, and **Signing Secret** from
   **Basic Information > App Credentials**
2. paste them into Roomote setup, or save them as deployment env vars
3. finish the Slack install step so Roomote can receive events and post replies

```sh theme={null}
SLACK_CLIENT_ID=...
SLACK_CLIENT_SECRET=...
SLACK_SIGNING_SECRET=...
```

`SLACK_APP_ID` is optional for manual preconfiguration. Roomote saves Slack's
`app_id` from the OAuth installation response after workspace install.

## Redirect URLs

Slack sign-in uses Slack OpenID Connect. Add the sign-in redirect URL:

```text theme={null}
<public-url>/api/auth/oauth2/callback/slack
```

If the same app handles the Slack communications integration, add the
integration redirect URL too:

```text theme={null}
<public-url>/api/slack/callback
```

When you use separate Slack apps for sign-in and communications, use these
auth-only compatibility variables for the sign-in app:

```sh theme={null}
ROOMOTE_AUTH_SLACK_CLIENT_ID=...
ROOMOTE_AUTH_SLACK_CLIENT_SECRET=...
```

## Bot scopes

Add these bot token scopes under **OAuth & Permissions > Scopes > Bot Token
Scopes**:

```text theme={null}
app_mentions:read
channels:read
channels:history
chat:write
files:read
groups:read
groups:history
im:read
im:history
im:write
links:read
links:write
mpim:read
mpim:history
reactions:read
reactions:write
team:read
users:read
```

After adding or changing scopes, reinstall the app from **OAuth & Permissions >
Install to Workspace**. Slack does not apply new scopes to an existing
installation until you reinstall.

## Events and interactivity

Turn on **Event Subscriptions** and set **Request URL** to:

```text theme={null}
<public-url>/api/webhooks/slack
```

Subscribe to these bot events:

```text theme={null}
app_mention
message.im
message.channels
message.groups
message.mpim
reaction_added
member_joined_channel
link_shared
entity_details_requested
function_executed
```

Turn on **Interactivity & Shortcuts** and use the same request URL:

```text theme={null}
<public-url>/api/webhooks/slack
```

Roomote uses this endpoint for button clicks and other interactive Slack
payloads.

## App home and messages

If you want to start tasks by direct message, make sure the app can receive DMs.
Enable the app surfaces needed for messages to the bot, then keep the
`message.im` event subscription enabled.

## Local URL changes

Keep the public URL stable. When it changes, update the Slack app's redirect
URLs, Event Subscriptions request URL, and Interactivity request URL, then
restart Roomote with the matching URL.

## Verify setup

1. sign in with Slack, if Slack sign-in is enabled
2. install the Slack app to the workspace
3. mention the app in a channel or send it a direct message
4. confirm Roomote starts a task and replies with a task link
5. reply in the same thread and confirm the message continues the same task
