Back to Picoclaw

Slack

docs/channels/slack/README.md

0.2.81.4 KB
Original Source

Back to README

Slack

Slack is a leading enterprise instant messaging platform. PicoClaw uses Slack's Socket Mode for real-time bidirectional communication, with no need to configure a public webhook endpoint.

Configuration

json
{
  "channel_list": {
    "slack": {
      "enabled": true,
      "type": "slack",
      "bot_token": "xoxb-...",
      "app_token": "xapp-...",
      "allow_from": []
    }
  }
}
FieldTypeRequiredDescription
enabledboolYesWhether to enable the Slack channel
bot_tokenstringYesBot User OAuth Token for the Slack bot (starts with xoxb-)
app_tokenstringYesSocket Mode App Level Token for the Slack app (starts with xapp-)
allow_fromarrayNoUser ID whitelist; empty means all users are allowed

Setup

  1. Go to Slack API and create a new Slack app
  2. Enable Socket Mode and obtain the App Level Token
  3. Add Bot Token Scopes (e.g. chat:write, im:history, etc.)
  4. Install the app to your workspace and obtain the Bot User OAuth Token
  5. Fill in the Bot Token and App Token in the configuration file