Slack Integration#
Connect your Slack workspace to Outeract for automated messaging in channels, threads, and direct messages.
Overview#
| Property | Value |
|---|
| Platform Type | SLACK |
| Authentication | Bot Token + Signing Secret |
| Webhook Type | Dedicated |
| Message Limit | 40,000 characters |
Prerequisites#
- Slack workspace (admin access for installation)
- Slack app created at api.slack.com
Setup Guide#
Step 1: Create a Slack App#
- Go to api.slack.com/apps
- Click Create New App
- Choose From scratch
- Enter an app name (e.g., “Outeract Bot”)
- Select your workspace
- Click Create App
- In your app settings, go to OAuth & Permissions
- Scroll to Scopes → Bot Token Scopes
- Add the following scopes:
| Scope | Purpose |
|---|
chat:write | Send messages |
chat:write.public | Send to public channels without joining |
files:write | Upload files |
users:read | View user information |
channels:read | View channel info |
groups:read | View private channel info |
Step 3: Install App to Workspace#
- In OAuth & Permissions, click Install to Workspace
- Review permissions and click Allow
- Copy the Bot User OAuth Token (starts with
xoxb-)
Step 4: Get Signing Secret#
- Go to Basic Information in your app settings
- Scroll to App Credentials
- Copy the Signing Secret
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#
- Go to Event Subscriptions in your app settings
- Toggle Enable Events to ON
- In Request URL, enter your Outeract webhook URL
- Slack will verify the URL automatically
- Scroll to Subscribe to bot events
- Add the following events:
| Event | Description |
|---|
message.channels | Messages in public channels |
message.groups | Messages in private channels |
message.im | Direct messages |
- Click Save Changes
Step 7: Test the Connection#
mutation {
testPlatformConnection(id: "pc_slack_123") {
success
message
}
}
Supported Features#
Message Types#
| Type | Send | Receive | Notes |
|---|
| Text | ✓ | ✓ | Up to 40,000 characters |
| Files | ✓ | ✓ | Most file types |
| Images | ✓ | ✓ | PNG, JPEG, GIF |
| Threads | ✓ | ✓ | Reply 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
}
}
| Entity | Format | Example |
|---|
| User | U + ID | U0123456789 |
| Channel | C + ID | C0123456789 |
| Private Channel | G + ID | G0123456789 |
| DM Channel | D + ID | D0123456789 |
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:
- Go to the channel
- Type
/invite @YourBotName - 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:
- Extracts timestamp and signature from headers
- Computes expected signature:
v0=HMAC-SHA256(signing_secret, "v0:{timestamp}:{body}") - Compares signatures using constant-time comparison
- Rejects requests with invalid signatures or expired timestamps
Resources#