Slack Integration#

Connect your Slack workspace to Outeract for automated messaging in channels, threads, and direct messages.

Overview#

PropertyValue
Platform TypeSLACK
AuthenticationBot Token + Signing Secret
Webhook TypeDedicated
Message Limit40,000 characters

Prerequisites#

  • Slack workspace (admin access for installation)
  • Slack app created at api.slack.com

Setup Guide#

Step 1: Create a Slack App#

  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Choose From scratch
  4. Enter an app name (e.g., “Outeract Bot”)
  5. Select your workspace
  6. Click Create App

Step 2: Configure Bot Permissions#

  1. In your app settings, go to OAuth & Permissions
  2. Scroll to ScopesBot Token Scopes
  3. Add the following scopes:
ScopePurpose
chat:writeSend messages
chat:write.publicSend to public channels without joining
files:writeUpload files
users:readView user information
channels:readView channel info
groups:readView private channel info

Step 3: Install App to Workspace#

  1. In OAuth & Permissions, click Install to Workspace
  2. Review permissions and click Allow
  3. Copy the Bot User OAuth Token (starts with xoxb-)

Step 4: Get Signing Secret#

  1. Go to Basic Information in your app settings
  2. Scroll to App Credentials
  3. Copy the Signing Secret

Step 5: Create Platform Connection#

mutation {
  createPlatformConnection(
    platformName: SLACK
    name: "My Slack Workspace"
    config: {
      bot_token: "xoxb-your-token-here"
      signing_secret: "your-signing-secret"
    }
  ) {
    id
    webhookUrl
  }
}

Step 6: Enable Event Subscriptions#

  1. Go to Event Subscriptions in your app settings
  2. Toggle Enable Events to ON
  3. In Request URL, enter your Outeract webhook URL
  4. Slack will verify the URL automatically
  5. Scroll to Subscribe to bot events
  6. Add the following events:
EventDescription
message.channelsMessages in public channels
message.groupsMessages in private channels
message.imDirect messages
  1. Click Save Changes

Step 7: Test the Connection#

mutation {
  testPlatformConnection(id: "pc_slack_123") {
    success
    message
  }
}

Supported Features#

Message Types#

TypeSendReceiveNotes
TextUp to 40,000 characters
FilesMost file types
ImagesPNG, JPEG, GIF
ThreadsReply to specific messages

Capabilities#

  • Direct messages (DMs)
  • Public channels
  • Private channels
  • Threaded conversations
  • File sharing

Sending Messages#

Basic Message#

mutation {
  sendMessage(
    platformConnectionId: "pc_slack_123"
    toExternalId: "U0123456789"  # Slack user ID
    message: "Hello from Outeract!"
  ) {
    id
    status {
      success
    }
  }
}

Message to Channel#

mutation {
  sendMessage(
    platformConnectionId: "pc_slack_123"
    toExternalId: "C0123456789"  # Channel ID
    message: "Hello channel!"
  ) {
    id
  }
}

Message with File#

mutation {
  sendMessage(
    platformConnectionId: "pc_slack_123"
    toExternalId: "U0123456789"
    message: "Here's the report"
    fileIds: ["file_xyz789"]
  ) {
    id
  }
}

External ID Format#

EntityFormatExample
UserU + IDU0123456789
ChannelC + IDC0123456789
Private ChannelG + IDG0123456789
DM ChannelD + IDD0123456789

Thread Support#

Outeract automatically handles Slack threads. Replies to messages are threaded appropriately.

Inviting the Bot#

Before the bot can send messages to a channel:

  1. Go to the channel
  2. Type /invite @YourBotName
  3. Or right-click channel → “Add apps”
With `chat:write.public` scope, the bot can post to public channels without being invited.

Webhook Events#

Message Received#

{
  "event_id": "evt_abc123",
  "event_type": "message.inbound",
  "payload": {
    "message": {
      "text": "Hello!",
      "role": "user"
    },
    "platform": "slack"
  },
  "edges": {
    "sent_by": {
      "external_id": "U0123456789"
    }
  }
}

Troubleshooting#

“Bot token is invalid”#

  • Make sure you’re using the Bot User OAuth Token, not the App-Level Token
  • Token should start with xoxb-

“Webhook verification failed”#

  • Check that your signing secret is correct
  • Make sure webhook URL is publicly accessible
  • Verify HTTPS is enabled

“Bot not receiving messages”#

  • Ensure event subscriptions are enabled and saved
  • Check that you’ve subscribed to the correct bot events
  • Invite the bot to the channel with /invite @YourBotName

“not_in_channel” error#

  • The bot needs to be in the channel to send messages
  • Invite with /invite @YourBotName
  • Or add chat:write.public scope for public channels

Security#

Outeract validates all incoming webhooks using Slack’s signing secret:

  1. Extracts timestamp and signature from headers
  2. Computes expected signature: v0=HMAC-SHA256(signing_secret, "v0:{timestamp}:{body}")
  3. Compares signatures using constant-time comparison
  4. Rejects requests with invalid signatures or expired timestamps

Resources#