Skip to content

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

  1. Go to the Slack API Apps page
  2. Click Create New App
  3. Choose From scratch
  4. Enter your app name (e.g., "Raikoo Assistant")
  5. Select your Slack workspace
  6. Click Create App

Step 2: Configure Bot Token Scopes

  1. In your Slack app settings, go to OAuth & Permissions
  2. Scroll to Scopes section
  3. Under Bot Token Scopes, add the following:
  4. app_mentions:read - Receive mentions of your bot
  5. channels:history - View messages in public channels (if needed)
  6. chat:write - Send messages as the bot
  7. im:history - View direct message history
  8. im:read - View basic direct message info
  9. im:write - Start direct messages with users
  10. users:read - View user information

Step 3: Enable Events API

  1. Go to Event Subscriptions
  2. Toggle Enable Events to On
  3. For Request URL, you will enter your Raikoo webhook URL (get this after creating a trigger in Raikoo)
  4. Under Subscribe to bot events, add:
  5. app_mention - When someone mentions your bot
  6. message.im - Direct messages to your bot
  7. message.channels (optional) - Messages in public channels where the bot is present
  8. Click Save Changes

Step 4: Get Your Credentials

  1. Go to Basic Information
  2. Under App Credentials, find and copy your Signing Secret
  3. Go to OAuth & Permissions
  4. Click Install to Workspace
  5. Review and allow the permissions
  6. Copy the Bot User OAuth Token (starts with xoxb-)

Step 5: Create a Connection in Raikoo

  1. Navigate to your organization in Raikoo
  2. Click Connections in the left navigation
  3. Click Create Connection
  4. Configure the connection:
  5. Name: Give it a descriptive name (e.g., "Slack Team Bot")
  6. Description: Optional description of the connection's purpose
  7. Platform: Select Slack
  8. Go to the Credentials tab
  9. Choose your credential source:
  10. Use Raikoo's default bot: Quick setup with no additional configuration
  11. Use custom credentials: For enterprise setups with custom branding
  12. If using custom credentials, enter:
  13. Bot Token: Your Bot User OAuth Token (xoxb-...)
  14. Signing Secret: Your app's Signing Secret
  15. Click Save

Step 6: Create an Integration (Trigger)

  1. Navigate to Integrations in the left navigation
  2. Click Create Trigger
  3. Configure the trigger:
  4. Name: A descriptive name for this integration
  5. Description: What this integration does
  6. External Connection: Select the Slack connection you created
  7. Go to the Execution tab:
  8. Execution Mode: Choose "Chat Agent" for conversational AI, or "Workflow" for automated processing
  9. Project: Select the project containing your agent or workflow
  10. Chat Agent (if using Chat mode): Select the AI agent to handle messages
  11. Authentication Mode: Configure how executions are authenticated
  12. Click Save

Step 7: Configure the Slack Request URL

  1. In Raikoo, go to the Webhook tab of your trigger
  2. Copy the Webhook URL
  3. Go to your Slack app's Event Subscriptions page
  4. Paste the URL in the Request URL field
  5. Slack will send a verification challenge - Raikoo will automatically respond
  6. You should see "Verified" appear
  7. Click Save Changes

Step 8: Connect a Slack Channel

For channels (not just direct messages):

  1. In Raikoo, go to your trigger's Channels tab
  2. Copy the binding command (e.g., @Raikoo /connect ABC123)
  3. In Slack, add the bot to a channel (right-click channel > Integrations > Add apps)
  4. Send the binding command in that channel
  5. 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:

  1. Ensure the webhook URL is correct
  2. Check that your trigger is active
  3. 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:

  1. Attachments are downloaded from Slack and written to the agent's workspace as files
  2. Document conversion (if enabled) creates shadow markdown files alongside the originals (e.g., report.pdf.md)
  3. 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
  4. The AI agent is informed that files are available in its workspace and can reference them by path

Troubleshooting

Bot Not Responding to Mentions

  1. Verify the Request URL is verified in Slack Event Subscriptions
  2. Check that your trigger is set to Active in Raikoo
  3. Ensure app_mentions:read scope is added
  4. Verify the bot is added to the channel

Signature Verification Errors

  1. Ensure the Signing Secret is correct in Raikoo
  2. Check that you copied the secret without extra spaces
  3. Verify the secret has not been regenerated in Slack

Bot Cannot Send Messages

  1. Verify chat:write scope is added
  2. Check that the bot is added to the target channel
  3. Ensure the Bot Token is correct and not expired

Messages Not Reaching Raikoo

  1. Check that Event Subscriptions are enabled
  2. Verify the Request URL is correct and verified
  3. 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:

  1. Add a Send Message operation to your workflow
  2. Select your Slack connection
  3. Specify the channel ID
  4. 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:

  1. Right-click on the channel name
  2. Select View channel details
  3. Scroll to the bottom to find the Channel ID

Next Steps