Overview
The Slack Bot interface allows you to deploy agents that users can interact with directly in Slack. Once configured, your agent appears as a bot user in your workspace, ready to respond to messages, participate in channels, and assist with tasks without leaving the Slack environment.Prerequisites
Before deploying an agent to Slack, you’ll need:- Administrator or Platform Admin access in Airia
- Slack workspace administrator privileges
- A deployed agent ready to connect to Slack
Creating a Slack App
The first step is to create a Slack app and obtain its OAuth bot token, which you’ll use to connect Airia to your Slack workspace.Step 1: Create a New Slack App
- Navigate to https://api.slack.com/apps
- Click Create New App
- Select From scratch
- Enter an App Name (this will be the name of your bot in Slack)
- Select your Workspace from the dropdown
- Click Create App
Step 2: Enable Agents & AI Apps
- In the left sidebar, navigate to Features > Agents & AI Apps
- Toggle the Enable switch to activate this feature
- This enables your bot to use Slack’s AI and agent capabilities
Step 3: Enable Chat Tab
- In the left sidebar, navigate to Features > App Home
- Scroll down to the Show Tabs section
- Make sure the Messages Tab (Chat Tab) is enabled
- Check the box for “Allow users to send Slash commands and messages from the messages tab”
- This allows users to send direct messages to your bot
Step 4: Configure OAuth Scopes
Your Slack bot needs specific permissions to interact with users and channels:- In the left sidebar, navigate to Features > OAuth & Permissions
- Scroll down to the Scopes section
- Under Bot Token Scopes, click Add an OAuth Scope
- Add each of the following scopes:
assistant:write- Allows the bot to act as an AI assistantchat:write- Enables the bot to send messageschannels:read- Lets the bot view basic public channel informationchannels:history- Allows the bot to read message history in public channelsgroups:read- Lets the bot view private channels it has been invited togroups:write- Enables the bot to send messages to private channels it has been invited togroups:history- Allows the bot to read message history in private channels and group DMsmpim:history- Allows the bot to read message history in multi-person direct messagesim:history- Allows the bot to read direct message historyusers:read- Enables the bot to view basic user informationusers:read.email- Allows the bot to read user email addressesfiles:read- Enables the bot to access shared files
channels:* scopes only grant access to public channels — private channels require the groups:* scopes. Without groups:read and groups:write, a bot that has been invited to a private channel will not be able to resolve that channel when an agent tries to send a message to it, and the agent will report that the channel cannot be found.Step 5: Install the App to Your Workspace
- In the left sidebar, navigate to Settings > Install App
- Click Install to Workspace
- Review the permissions and click Allow
- You’ll be redirected back to the app settings page
Step 6: Copy the Bot OAuth Token
- After installation, you’ll see the Bot User OAuth Token on the OAuth & Permissions page
- The token starts with
xoxb- - Click Copy to copy the token to your clipboard
- Keep this token secure - you’ll need it in the next step
Configuring Your Slack Bot Deployment in Airia
Now you’ll create the Slack Bot deployment and connect it to your agent:Step 1: Create a Slack Bot Interface
- Navigate to your agent in the Airia platform
- Click on the Interfaces section in Agent Settings
- Click Add Interface or New Deployment
- Select Slack Bot as the interface type
Step 2: Add Your Slack Credential
- In the credential dropdown, select an existing Slack credential or click to add a new one
- If adding a new credential, paste your Bot OAuth Token (the
xoxb-token from Step 6 above) - This connects your deployment to your Slack workspace using the OAuth token
Step 3: Configure Execution Settings
Choose how the agent should execute when triggered from Slack: Anonymous- Execute without user context
- No user mapping required
- All messages are processed with the same permissions
- Best for: Public bots where user identity isn’t important
- Execute as the user who created this agent
- Uses agent creator’s permissions for all executions
- No additional configuration needed
- Best for: Bots with consistent permission requirements
- Map Slack users to existing Airia users
- Each user’s execution uses their own Airia permissions
- Requires user mapping to be configured
- Best for: Enterprise deployments with role-based access control
Step 4: Copy the Webhook URL
After configuring the execution settings:- Airia generates a Webhook Events API URL
- Click the Copy button to copy this URL
- Keep this URL handy - you’ll need it to configure Event Subscriptions in Slack
- Click Done to save the deployment
Configuring Event Subscriptions in Slack
Return to your Slack app configuration to enable event subscriptions using the webhook URL from Airia:Step 1: Enable Event Subscriptions
- Go back to https://api.slack.com/apps and select your app
- In the left sidebar, navigate to Features > Event Subscriptions
- Toggle Enable Events to On
- In the Request URL field, paste the webhook URL you copied from Airia
- Slack will verify the URL (you should see a green checkmark if successful)
Step 2: Subscribe to Bot Events
- Scroll down to Subscribe to bot events
- Click Add Bot User Event and add each of the following events:
message.im- Messages sent to your bot via direct messagemessage.channels- Messages posted in public channels the bot is a member ofmessage.groups- Messages posted in private channels the bot is a member ofmessage.mpim- Messages posted in multi-person direct messages the bot is a member ofapp_mention- When someone @mentions your bot in a channel or group DM
- Click Save Changes
message.im event is required for direct message support. The remaining events (message.channels, message.groups, message.mpim, and app_mention) are required for channel and group DM support. If you only need direct message interactions, you can subscribe to message.im alone.Testing Your Slack Bot
Your Slack bot is now fully configured and ready to use:- The bot will appear in your Slack workspace under Apps
- Send a direct message to the bot
- The message should be received by your Airia agent
- You should receive a response from the agent through the bot
User Mapping (For “Existing Airia User” Mode)
If you selected “Existing Airia User” as your execution configuration, Airia will automatically map Slack users to Airia users based on email addresses.How Automatic Mapping Works
Airia automatically matches Slack users to Airia users when:- Both the Slack account and Airia account use the same email address
- The
users:read.emailscope is granted to your Slack app (required)
- Airia retrieves the user’s email from Slack using the bot’s permissions
- Searches for an Airia user with a matching email address
- Executes the agent with that Airia user’s permissions and context
Using Your Slack Bot
Once deployed, users can interact with your agent through direct messages, channel @mentions, and group DMs.Direct Messages
Users can send direct messages to the bot for one-on-one interactions:- Find the bot in the Slack sidebar under Apps
- Click to open a direct message conversation
- Type a message and send
- The bot will respond directly in the conversation
Channel and Group DM Interactions
Users can @mention the bot in channels and group DMs:- Add the bot to a public or private channel, or include it in a group DM
- @mention the bot followed by your message (e.g.,
@YourBot what is our refund policy?) - The bot will respond in a thread attached to the mention
- Users can continue the conversation by replying in the thread — the bot will respond to all thread replies without requiring another @mention
Slack Context Variables
When your agent is triggered from Slack, the following variables are automatically available during execution. You can reference them in prompts, tool fields, Python code blocks, and agent router steps to build context-aware workflows.Best Practices
Security
- Webhook URL Protection: Keep your webhook URL secure and don’t share it publicly
- Scope Minimization: Only request the OAuth scopes your bot actually needs
- Access Control: Configure your agent’s policies to control what data the bot can access
- Audit Logs: Regularly review bot activity in Airia’s monitoring feeds
- Execution Context: Choose the appropriate execution configuration based on your security requirements
User Experience
- Clear Bot Identity: Use a descriptive bot name and profile picture
- Response Time: Ensure your agent is optimized for quick responses in direct messages
- Error Handling: Configure graceful error messages when the bot can’t fulfill requests
- Context Awareness: Enable chat history in your agent’s configuration to maintain conversation context
- User Guidance: Communicate to users that the bot is available via direct messages
Agent Configuration
- Clear Instructions: Provide clear system prompts that define the bot’s role and capabilities
- Tool Access: Ensure your agent has access to necessary tools and data sources
- Rate Limiting: Configure appropriate usage limits to prevent abuse
- Monitoring: Set up alerts for errors or unusual activity
- Markdown Compatibility: Slack only supports a subset of markdown (bold, italics, strikethrough, inline code, code blocks, blockquotes, and lists). Since AI agents typically respond in markdown, include a prompt instruction for your agent to avoid using unsupported formatting like tables, nested lists, HTML, or complex markdown syntax. For example, add to your system prompt: “When responding in Slack, use only basic markdown: bold (text), italics (text), strikethrough (
text), inline code (code), code blocks (```), blockquotes (>), and simple lists. Do not use tables, nested lists, or HTML formatting.”
Use Cases
IT Support Bot
Deploy an agent that helps employees with common IT issues via direct messages:- Password resets
- Software troubleshooting
- Access requests
- Ticket status lookups
- IT knowledge base queries
HR Assistant
Create a bot that assists with HR-related questions through private conversations:- Benefits information
- PTO policies
- Onboarding guidance
- Company policy lookups
- Personal HR inquiries
Personal Productivity Assistant
Build an agent that helps individuals manage their work:- Task reminders
- Meeting preparation
- Document summarization
- Quick research queries
- Personal knowledge management
Sales Assistant
Deploy a bot that supports sales team members individually:- CRM data lookups
- Lead qualification
- Account information
- Quick competitive intelligence
- Sales playbook access
Troubleshooting
Bot is not responding to messages
Bot is not responding to messages
- Verify the Slack credential in Airia has the correct OAuth token
- Ensure the webhook URL is correctly configured in your Slack app’s Event Subscriptions
- Confirm all required OAuth scopes are granted in your Slack app
- Check that the agent deployment is active in Airia
- Review error logs in Airia’s monitoring feeds (Conversation Feed)
- Verify the bot is still installed in your workspace
- Ensure the required event subscriptions are configured (
message.imfor DMs;app_mention,message.channels,message.groups,message.mpimfor channels and group DMs)
Slack says 'Your URL didn't respond with the expected challenge'
Slack says 'Your URL didn't respond with the expected challenge'
- Ensure your Airia deployment is active and saved
- Copy the webhook URL again from Airia (don’t manually type it)
- Check that there are no extra spaces or characters when pasting
- Wait a moment after creating the deployment before verifying in Slack
- If the issue persists, delete and recreate the deployment in Airia
Agent says it can't find a private channel the bot was invited to
Agent says it can't find a private channel the bot was invited to
channels:* scopes, private channels are invisible to it — even channels it was explicitly invited to. The agent’s channel lookup returns no match and the send-message call fails with a “channel not found” style error.To resolve:- Return to your Slack app’s OAuth & Permissions page
- Add
groups:read,groups:write, andgroups:historyunder Bot Token Scopes - Click Reinstall to Workspace to apply the new scopes (existing tokens do not automatically gain new permissions)
- Make sure the bot has been invited to the private channel with
/invite @YourBotNamefrom inside that channel - Retry the agent action
Bot responds but can't access files or user information
Bot responds but can't access files or user information
- Return to your Slack app’s OAuth & Permissions page
- Verify all required scopes are present (especially
files:readandusers:read.email) - If you added new scopes, reinstall the app to your workspace
- The bot should automatically pick up the new permissions after reinstallation
Bot doesn't appear online in Slack
Bot doesn't appear online in Slack
- The Slack credential in Airia may have an invalid or expired OAuth token
- The Slack app may not be properly installed to the workspace
- The deployment may not be properly saved in Airia
- Try regenerating the OAuth token in Slack and updating the credential in Airia
- Check your internet connectivity and Slack workspace status
Bot responds to some users but not others
Bot responds to some users but not others
- If using “Existing Airia User” execution mode, verify affected users have an Airia account with the same email as their Slack account
- Confirm the
users:read.emailscope is granted to your Slack app - Check if affected users have blocked the bot in Slack
- Review your agent’s policies in Airia for user-level restrictions
- Ensure the users are members of the workspace
Bot responses are slow or timing out
Bot responses are slow or timing out
- Review your agent’s configuration for inefficient steps
- Check if external tool integrations are responding slowly
- Monitor token consumption and rate limits
- Consider simplifying complex agent workflows
- Check Airia platform status for any service issues
How do I update my bot's name or profile picture?
How do I update my bot's name or profile picture?
- Go to https://api.slack.com/apps
- Select your app
- Navigate to Features > App Home
- Update the Display Name and Bot User Icon
- Changes appear immediately in your workspace
Can I deploy the same agent to multiple Slack workspaces?
Can I deploy the same agent to multiple Slack workspaces?
- Create a separate Slack app for each workspace
- Obtain a unique OAuth token for each app
- Add each token as a separate credential in Airia
- Create separate Slack Bot deployments for each workspace
- Each deployment operates independently
How does the bot work in channels and group DMs?
How does the bot work in channels and group DMs?
message.channels, message.groups, message.mpim, and app_mention events.The bot can't maintain conversation context
The bot can't maintain conversation context
- Edit your agent in Airia’s Agent Studio
- Navigate to AI steps in your agent flow
- Enable “Include the chat history” option for all LLM steps
- This allows the agent to reference previous messages in the conversation
Bot responses show broken formatting or raw markdown
Bot responses show broken formatting or raw markdown
- Bold:
*text* - Italics:
_text_ - Strikethrough:
~text~ - Inline code:
`code` - Code blocks:
``` - Blockquotes:
> - Simple lists (bulleted and numbered)
- Tables
- Nested lists
- HTML formatting
- Complex markdown syntax
- Some heading styles
- Images embedded in markdown
code), code blocks (```), blockquotes (>), and simple lists. Do not use tables, nested lists, or HTML formatting.”This ensures your agent generates responses that display correctly in Slack without formatting errors.Managing Your Slack Bot
Monitoring Activity
Track your bot’s usage and performance:- Navigate to Feeds in Airia
- Select Conversation Feed to view bot interactions
- Review Token Consumption for usage patterns
- Check Agent Executions for performance metrics
Updating Configuration
To modify your bot’s behavior:- Edit the agent in Airia’s Agent Studio
- Make your changes to prompts, tools, or flow logic
- Save the agent
- Changes take effect immediately for new conversations
- Navigate to the Interfaces section in Agent Settings
- Click on your Slack Bot deployment
- Update execution configuration or other settings
- Click Done to save changes
Updating OAuth Token
If your OAuth token needs to be regenerated or updated:- Go to https://api.slack.com/apps and select your app
- Navigate to OAuth & Permissions
- If needed, click Revoke and then Reinstall App to Workspace to get a new token
- Copy the new Bot User OAuth Token
- In Airia, navigate to Settings > Credentials
- Find your Slack credential and update it with the new token
- Your deployments will automatically use the updated credential
Regenerating Webhook URL
If your webhook URL is compromised or you need a new one:- Navigate to your Slack Bot deployment in Airia
- Click Delete to remove the existing deployment
- Create a new Slack Bot deployment (you can reuse the same credential)
- Copy the new webhook URL
- Update the Request URL in your Slack app’s Event Subscriptions
Removing the Bot
To deactivate a Slack bot deployment:- In Airia, navigate to your agent’s Interfaces section
- Click on the Slack Bot deployment
- Click Delete at the bottom of the configuration screen
- Confirm the deletion
- Optionally, uninstall or delete the Slack app from your workspace at https://api.slack.com/apps
Security Considerations
Data Privacy
- Message Content: All messages sent to your bot are processed by your Airia agent
- Data Retention: Configure data retention settings in Airia’s admin settings
- Compliance: Ensure your deployment meets your organization’s compliance requirements
- User Consent: Communicate to users how their messages will be processed
Access Control
- Workspace Membership: Only workspace members can interact with your bot
- Channel Restrictions: Control which channels the bot can access
- Policy Enforcement: Use Airia’s policy features to filter sensitive content
- Role-Based Access: Configure agent-level permissions for different user groups
Incident Response
Prepare for security incidents:- Quick Deactivation: Know how to quickly delete the deployment in Airia to stop the bot
- Webhook Security: If webhook URL is exposed, regenerate it immediately
- Audit Logging: Monitor bot activity in Airia’s Conversation Feed and Agent Executions
- Incident Procedures: Document steps to disable the bot quickly if needed
- User Reporting: Provide a way for users to report issues with the bot
Support
For additional help with Slack Bot deployment:- Review Slack’s API documentation
- Check Airia’s monitoring feeds for error details
- Contact your Airia account administrator
- Reach out to Airia support for platform-specific issues
