Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.cowagent.ai/llms.txt

Use this file to discover all available pages before exploring further.

Integrate CowAgent into Slack via a Slack App in Socket Mode. Supports direct messages (DM) and channels (triggered by @mention or replying within a thread). Socket Mode uses a persistent WebSocket connection — no public IP or callback URL required, works out of the box.

1. Setup

Step 1: Create a Slack App

  1. Open the Slack API apps page, click Create New AppFrom scratch.
  2. Enter an App Name (e.g. CowAgent), pick the Workspace to install into, and create it.

Step 2: Enable Socket Mode and get the App Token

  1. In the left sidebar go to Settings → Socket Mode and turn on Enable Socket Mode.
  2. You will be prompted to generate an App-Level Token with the connections:write scope. Save this token starting with xapp-.
Socket Mode receives events over a WebSocket connection, so you don’t need to expose a public callback URL — ideal for local or intranet deployments.

Step 3: Configure bot scopes and install

  1. Go to Features → OAuth & Permissions, click Add an OAuth Scope under Bot Token Scopes, and add the following scopes one by one:
    app_mentions:read
    channels:history
    chat:write
    commands
    files:read
    files:write
    groups:history
    im:history
    mpim:history
    users:read
    
    files:read / files:write are used for sending/receiving images and files; omit them if you only need text conversations.
  2. Go to Features → Event Subscriptions, turn on Enable Events, and under Subscribe to bot events click Add Bot User Event to add:
    app_mention
    message.im
    message.channels
    
    Add message.groups if you need to use the bot in private channels.
  3. Go to Features → App Home, enable Messages Tab under Show Tabs, and check Allow users to send Slash commands and messages from the messages tab. Otherwise the DM input box is disabled and users cannot message the bot.
  4. Back in OAuth & Permissions, click Install to Workspace. After installing, copy the Bot User OAuth Token starting with xoxb-.
If the Slack client still shows “Sending messages to this app has been turned off”, make sure you completed the App Home step above, then refresh or restart the Slack client (remove the app from your conversations and reopen it if needed).

Step 4: Connect to CowAgent

The integration is ready when you see logs like:
[Slack] Bot logged in as user_id=U0XXXXXXX, team=Txxxxxxxx
[Slack] ✅ Slack bot ready, listening for events

2. Capabilities

FeatureSupport
Direct message (DM)
Channel (@bot / reply in thread)
Text messages✅ send / receive
Image messages✅ send / receive
File messages✅ send / receive (PDF / Word / Excel, etc.)
Thread replies✅ replies are posted to the thread of the triggering message
Slack organizes conversations into threads. The bot posts replies into the thread of the triggering message, keeping channels tidy.

3. Usage

Once connected:
  • Direct message (DM): find your App under Apps in the Slack sidebar and message it directly.
  • Channel: invite the App into a channel (/invite @your-app), then trigger it with @your-app hello; continue the conversation by replying within the same thread.
When sending an image or file, you can add a text caption (description / question) in the attachment input — the bot will answer based on both. Sending an attachment first and then a follow-up question also works; the two messages are merged automatically.