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

# Slack Integration

> Connect Praxos with Slack for workspace collaboration

## Overview

Slack integration brings Praxos into your workspace for seamless team collaboration.

## Features

* Channel and direct messaging
* Slash commands
* Interactive components (buttons, menus)
* File sharing
* Thread replies
* Rich text formatting
* Event subscriptions

## Setup

### 1. Create Slack App

1. Go to [api.slack.com/apps](https://api.slack.com/apps)
2. Click "Create New App"
3. Choose "From scratch"
4. Name your app and select workspace

### 2. Configure OAuth & Permissions

Add these bot token scopes:

* `chat:write` - Send messages
* `chat:write.public` - Send to channels without joining
* `channels:history` - View channel messages
* `channels:read` - View channels
* `groups:history` - View private channel messages
* `im:history` - View DM history
* `im:write` - Send DMs
* `users:read` - View users
* `files:write` - Upload files
* `commands` - Create slash commands

### 3. Enable Events

Subscribe to bot events:

* `message.channels`
* `message.groups`
* `message.im`
* `app_mention`

Set Request URL: `https://your-domain.com/slack/events`

### 4. Create Slash Commands

Add commands at "Slash Commands" section:

* `/ask` - Ask Praxos a question
* `/schedule` - Schedule a task
* `/summarize` - Summarize conversation

### 5. Install to Workspace

1. Go to "Install App"
2. Click "Install to Workspace"
3. Authorize the app
4. Copy the Bot User OAuth Token

### 6. Configure Praxos

Add to `.env`:

```bash theme={null}
SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_SIGNING_SECRET=your-signing-secret
SLACK_APP_TOKEN=xapp-your-app-token  # For Socket Mode
```

## Usage

### In Channels

```
@Praxos what's on my calendar today?
```

### Direct Messages

```
Send "Hello" to Praxos DM
```

### Slash Commands

```
/ask What are my pending tasks?
/schedule Team meeting tomorrow at 2pm
/summarize #project-alpha
```

## Interactive Features

### Action Buttons

```
Task: Review Q4 Report
[✓ Complete] [📝 Add Note] [⏰ Snooze]
```

### Select Menus

```
Choose a project:
[Dropdown: Project Alpha, Project Beta, Project Gamma]
```

### Modal Dialogs

For complex interactions:

* Form submissions
* Multi-step workflows
* Rich data input

## Configuration

### Environment Variables

```bash theme={null}
# Required
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=...

# Optional (for Socket Mode)
SLACK_APP_TOKEN=xapp-...
SLACK_SOCKET_MODE=true
```

### Workspace Settings

Configure per workspace:

* Default channels
* Notification preferences
* User permissions
* Rate limit handling

## Security

### Request Verification

Praxos verifies all Slack requests:

* Signing secret validation
* Timestamp verification
* Replay attack prevention

### OAuth Flow

For multi-workspace deployments:

* OAuth installation flow
* Token management
* Workspace isolation

## Troubleshooting

### Messages Not Sending

* Verify bot is in channel
* Check token permissions
* Review rate limits

### Events Not Received

* Confirm event subscriptions
* Check webhook URL is accessible
* Verify SSL certificate

### Slash Commands Failing

* Check command is registered
* Verify Request URL is correct
* Review command permissions

## Rate Limits

Slack rate limits:

* Tier 1: 1 request per second
* Tier 2: 20+ requests per minute
* Tier 3: 50+ requests per minute
* Tier 4: 100+ requests per minute

<Note>
  Praxos automatically handles rate limiting with queuing and retry logic.
</Note>

## Best Practices

* Use threads for long conversations
* Leverage blocks for rich formatting
* Implement graceful error handling
* Cache frequently accessed data
* Monitor API usage

## Next Steps

<CardGroup cols={2}>
  <Card title="Google Integration" href="/integrations/google" />

  <Card title="Microsoft 365" href="/integrations/microsoft" />
</CardGroup>
