Slack Integration
Connect Slack to Raikoo to build intelligent bots that respond to user messages with rich Block Kit formatting.
What You Can Build
- Team assistants that answer questions using your organization's knowledge base
- Workflow triggers that execute automated processes when users mention the bot
- Notification bots that post updates to Slack channels
- Support bots that handle common requests and escalate complex issues
Prerequisites
Before setting up Slack integration, you will need:
- Admin access to your Slack workspace (or ability to request app approval)
- Admin access to your Raikoo organization
Setup Steps
Step 1: Create a Slack App
- Go to the Slack API Apps page
- Click Create New App
- Choose From scratch
- Enter your app name (e.g., "Raikoo Assistant")
- Select your Slack workspace
- Click Create App
Step 2: Configure Bot Token Scopes
- In your Slack app settings, go to OAuth & Permissions
- Scroll to Scopes section
- Under Bot Token Scopes, add the following:
app_mentions:read- Receive mentions of your botchannels:history- View messages in public channels (if needed)chat:write- Send messages as the botim:history- View direct message historyim:read- View basic direct message infoim:write- Start direct messages with usersusers:read- View user information
Step 3: Enable Events API
- Go to Event Subscriptions
- Toggle Enable Events to On
- For Request URL, you will enter your Raikoo webhook URL (get this after creating a trigger in Raikoo)
- Under Subscribe to bot events, add:
app_mention- When someone mentions your botmessage.im- Direct messages to your botmessage.channels(optional) - Messages in public channels where the bot is present- Click Save Changes
Step 4: Get Your Credentials
- Go to Basic Information
- Under App Credentials, find and copy your Signing Secret
- Go to OAuth & Permissions
- Click Install to Workspace
- Review and allow the permissions
- Copy the Bot User OAuth Token (starts with
xoxb-)
Step 5: Create a Connection in Raikoo
- Navigate to your organization in Raikoo
- Click Connections in the left navigation
- Click Create Connection
- Configure the connection:
- Name: Give it a descriptive name (e.g., "Slack Team Bot")
- Description: Optional description of the connection's purpose
- Platform: Select Slack
- Go to the Credentials tab
- Choose your credential source:
- Use Raikoo's default bot: Quick setup with no additional configuration
- Use custom credentials: For enterprise setups with custom branding
- If using custom credentials, enter:
- Bot Token: Your Bot User OAuth Token (xoxb-...)
- Signing Secret: Your app's Signing Secret
- Click Save
Step 6: Create an Integration (Trigger)
- Navigate to Integrations in the left navigation
- Click Create Trigger
- Configure the trigger:
- Name: A descriptive name for this integration
- Description: What this integration does
- External Connection: Select the Slack connection you created
- Go to the Execution tab:
- Execution Mode: Choose "Chat Agent" for conversational AI, or "Workflow" for automated processing
- Project: Select the project containing your agent or workflow
- Chat Agent (if using Chat mode): Select the AI agent to handle messages
- Authentication Mode: Configure how executions are authenticated
- Click Save
Step 7: Configure the Slack Request URL
- In Raikoo, go to the Webhook tab of your trigger
- Copy the Webhook URL
- Go to your Slack app's Event Subscriptions page
- Paste the URL in the Request URL field
- Slack will send a verification challenge - Raikoo will automatically respond
- You should see "Verified" appear
- Click Save Changes
Step 8: Connect a Slack Channel
For channels (not just direct messages):
- In Raikoo, go to your trigger's Channels tab
- Copy the binding command (e.g.,
@Raikoo /connect ABC123) - In Slack, add the bot to a channel (right-click channel > Integrations > Add apps)
- Send the binding command in that channel
- You should see the channel appear in the Connected Channels list
Message Formatting
Raikoo automatically converts responses to Slack's mrkdwn and Block Kit format:
| Markdown | Slack mrkdwn |
|---|---|
**bold** |
*bold* |
*italic* |
_italic_ |
~~strike~~ |
~strike~ |
[text](url) |
<url\|text> |
# Header |
*Header* (bold) |
| Code blocks | Preserved |
For rich responses, Block Kit layouts with sections, dividers, and buttons are automatically generated.
Threaded Replies
When a user sends a message, Raikoo replies in a thread by default. This keeps conversations organized and prevents channel clutter.
URL Verification
When you first configure the Request URL in Slack, a verification challenge is sent. Raikoo automatically responds to this challenge. If verification fails:
- Ensure the webhook URL is correct
- Check that your trigger is active
- Verify the connection credentials are valid
Chat Settings
After creating your trigger, configure chat-specific settings in the Chat Settings tab. These settings control how the bot responds, which users and channels are allowed, and how attachments are handled.
Bot Responses
| Setting | Default | Description |
|---|---|---|
| Send welcome message on install | On | Send a greeting when the bot is added to a channel or conversation |
| Welcome Message | Built-in default | Custom message shown when the bot joins a channel |
| Hello Response | Uses welcome message | Custom response when a user says "hello" or "hi" |
| Help Response | Built-in default | Custom response when a user says "help" |
| Send typing indicator | Off | Show a typing status while the bot is processing |
User Filtering
Control which users can interact with the bot:
| Setting | Description |
|---|---|
| Allowed Users (whitelist) | Only process messages from these users. Supports patterns. For Slack, use the user ID format U1234567 |
| Blocked Users (blacklist) | Ignore messages from these users. Supports patterns like bot-* |
Channel Filtering
| Setting | Default | Description |
|---|---|---|
| Allowed Channels | Empty (all channels) | Whitelist of channel IDs or patterns |
| Blocked Channels | Empty | Blacklist of channel IDs or patterns |
| Allow direct messages | On | Process 1:1 conversations with the bot |
| Allow channel messages | On | Process messages from channels (when @mentioned) |
Message Filtering
| Setting | Default | Description |
|---|---|---|
| Required message patterns | Empty | Only process messages matching these glob patterns |
| Blocked message patterns | Empty | Ignore messages matching these patterns |
| Max message length | 0 (unlimited) | Skip messages longer than this (in characters) |
Attachments
When users send files alongside their messages, Raikoo can process them and make them available to the AI agent.
| Setting | Default | Description |
|---|---|---|
| Process attachments | Off | Enable attachment processing. When off, attachments are ignored |
| Convert to Markdown file | On | Create .md shadow files for PDFs and DOCX documents so the agent can read their content |
| Send images to AI | Off | Include images directly in the AI context (requires a vision-capable model) |
| Send PDFs to AI | Off | Include PDFs directly in the AI context (requires a compatible provider such as Anthropic) |
| Send audio to AI | Off | Include audio files directly in the AI context (requires a compatible provider) |
| Send video to AI | Off | Include video files directly in the AI context (requires a compatible provider) |
| Max attachment size (KB) | 5120 (5 MB) | Attachments larger than this are skipped. Set to 0 for unlimited |
| Allowed attachment types | Empty (all types) | MIME type whitelist. Example: application/pdf, image/* |
How Attachment Processing Works
When a user sends a message with attachments:
- Attachments are downloaded from Slack and written to the agent's workspace as files
- Document conversion (if enabled) creates shadow markdown files alongside the originals (e.g.,
report.pdf.md) - Context-stuffing (the "Send to AI" options) additionally includes the file data directly in the AI's input for models that support native file handling
- The AI agent is informed that files are available in its workspace and can reference them by path
Troubleshooting
Bot Not Responding to Mentions
- Verify the Request URL is verified in Slack Event Subscriptions
- Check that your trigger is set to Active in Raikoo
- Ensure
app_mentions:readscope is added - Verify the bot is added to the channel
Signature Verification Errors
- Ensure the Signing Secret is correct in Raikoo
- Check that you copied the secret without extra spaces
- Verify the secret has not been regenerated in Slack
Bot Cannot Send Messages
- Verify
chat:writescope is added - Check that the bot is added to the target channel
- Ensure the Bot Token is correct and not expired
Messages Not Reaching Raikoo
- Check that Event Subscriptions are enabled
- Verify the Request URL is correct and verified
- Ensure the relevant bot events are subscribed
Security Features
- HMAC-SHA256 Verification: All requests are cryptographically verified using your Signing Secret
- Timestamp Validation: Requests older than 5 minutes are rejected to prevent replay attacks
- Credential Storage: Tokens are stored securely in Azure Key Vault
Best Practices
- Use custom app branding: Add an icon and description to your Slack app
- Test in a private channel: Create a test channel before broad deployment
- Use threads: Keep responses in threads to maintain clean channels
- Handle rate limits: Slack has rate limits on API calls
- Request minimal scopes: Only request the permissions you need
Sending Proactive Messages
In addition to responding to messages, you can send proactive messages from workflows using the Send Message operation:
- Add a Send Message operation to your workflow
- Select your Slack connection
- Specify the channel ID
- Compose your message (supports Block Kit)
This is useful for: - Sending notifications when workflows complete - Broadcasting announcements to channels - Posting scheduled updates
Finding Channel IDs
To get a channel ID in Slack:
- Right-click on the channel name
- Select View channel details
- Scroll to the bottom to find the Channel ID
Next Steps
- Learn about AI agents to customize your bot's behavior
- Create workflows for complex automation scenarios
- Set up Teams integration for multi-platform bots