Skip to main content

Overview

This guide walks you through setting up profClaw as a Slack bot that can respond to messages, execute tools, and run agentic workflows directly in your Slack channels.

Prerequisites

  • profClaw installed and running (mini or pro mode) - see Installation
  • A Slack workspace where you have admin access
  • An AI provider configured (e.g., Anthropic or OpenAI) - see AI Providers

Step 1: Create a Slack App

1

Create the app

Go to api.slack.com/apps and click Create New App.Select From scratch, name it “profClaw”, and choose your workspace.
2

Configure Bot Token Scopes

Navigate to OAuth and Permissions and add these Bot Token Scopes:
ScopePurpose
chat:writeSend messages
app_mentions:readRespond to @mentions
channels:historyRead channel messages
channels:readList channels
files:readAccess shared files
files:writeUpload files
im:historyRead direct messages
im:readAccess DM channels
im:writeSend direct messages
3

Enable Socket Mode

Go to Socket Mode and enable it. Create an app-level token with connections:write scope.Save the token - it starts with xapp-.Socket Mode connects to Slack over a persistent WebSocket, so you do not need a public webhook URL for development.
4

Enable Events

Go to Event Subscriptions and enable events. Subscribe to:
  • message.channels
  • message.im
  • app_mention
5

Install to workspace

Go to Install App and click Install to Workspace. Authorize the permissions.Save the Bot User OAuth Token - it starts with xoxb-.
6

Copy the Signing Secret

Go to Basic Information and copy the Signing Secret from the App Credentials section.

Step 2: Configure profClaw

Set the required environment variables:
export SLACK_BOT_TOKEN=xoxb-your-bot-token
export SLACK_APP_TOKEN=xapp-your-app-token
export SLACK_SIGNING_SECRET=your-signing-secret
Or add to .profclaw/settings.yml:
chat:
  channels:
    slack:
      enabled: true
      botToken: ${SLACK_BOT_TOKEN}
      appToken: ${SLACK_APP_TOKEN}
      signingSecret: ${SLACK_SIGNING_SECRET}

Step 3: Start profClaw

profclaw serve
You should see:
✓ Slack bot connected via Socket Mode
✓ Listening for events in workspace: Your Workspace
Run profclaw doctor --chat to verify Slack connectivity without starting the full server.

Step 4: Test It

Invite the bot to a channel first:
/invite @profClaw
Then mention it or send a direct message:
@profClaw What files are in the src/ directory?
@profClaw Summarize the open issues in our repo
The bot replies in a thread by default, showing tool execution progress as it runs.

Configuration Options

VariableDefaultDescription
SLACK_RESPONSE_THREADtrueReply in threads instead of inline
SLACK_TYPING_INDICATORtrueShow typing indicator while processing
SLACK_MAX_MESSAGE_LENGTH4000Max message length (Slack API limit)
SLACK_ALLOWED_CHANNELS*Comma-separated channel IDs to respond in

Security Considerations

The Slack bot inherits your profClaw security mode. In permissive mode, anyone who can message the bot can execute file operations and shell commands. Use standard or ask mode for any shared workspace.
Restrict which channels the bot responds in using allowlists:
chat:
  channels:
    slack:
      allowedChannels:
        - C0123456789  # #engineering
        - C9876543210  # #devops
      allowedUsers:
        - U012345678   # restrict to specific users
See Security Overview for how security modes affect tool execution.

Multi-Workspace Setup

To run the bot across multiple Slack workspaces, configure multiple accounts:
chat:
  slack:
    accounts:
      - id: work
        botToken: xoxb-work-...
        appToken: xapp-work-...
        signingSecret: ...
        isDefault: true
      - id: community
        botToken: xoxb-community-...
        appToken: xapp-community-...
        signingSecret: ...