Back to Blog
Tutorials

How to Connect Slack to Your Augmi AI Agent: Complete Setup Guide

Step-by-step tutorial for creating a Slack app and connecting it to your Augmi AI agent. Covers app creation, bot permissions, Socket Mode, and troubleshooting.

Augmi Team|
slackintegrationtutorialopenclawai-agentssetup-guide
How to Connect Slack to Your Augmi AI Agent: Complete Setup Guide

Connecting your Augmi AI agent to Slack lets your agent respond to messages, handle DMs, and participate in channel conversations. This guide walks you through every step, from creating the Slack app to verifying the connection works.

Prerequisites

Before starting, make sure you have:

  • An Augmi account with an active agent (or you’re in the process of creating one)
  • Admin access to the Slack workspace you want to connect
  • About 10 minutes

Step 1: Create a Slack App

  1. Go to api.slack.com/apps
  2. Click Create New App
  3. Select From scratch
  4. Give your app a name (e.g., your agent’s name like “SalesBot” or “SupportAgent”)
  5. Select the workspace you want to install it in
  6. Click Create App

You’ll land on the app’s Basic Information page. Keep this tab open — you’ll come back to it.

Step 2: Configure Bot Permissions (OAuth Scopes)

Your agent needs specific permissions to read and send messages.

  1. In the left sidebar, click OAuth & Permissions
  2. Scroll down to Scopes > Bot Token Scopes
  3. Click Add an OAuth Scope and add the following scopes:
Scope What it does
app_mentions:read Lets the agent see when someone @mentions it
channels:history Read messages in public channels the agent is in
channels:read See the list of public channels
chat:write Send messages as the agent
groups:history Read messages in private channels the agent is invited to
groups:read See private channels the agent is invited to
im:history Read direct messages with the agent
im:read See the list of DM conversations
im:write Start new DM conversations
mpim:history Read group DMs the agent is in
reactions:write Add emoji reactions (used for message acknowledgment)
users:read See basic user info (names, avatars)
  1. Scroll back up and click Install to Workspace
  2. Review the permissions and click Allow
  3. Copy the Bot User OAuth Token — it starts with xoxb-

Save this token somewhere safe. You’ll paste it into Augmi in a later step.

Step 3: Enable Socket Mode

Socket Mode lets your agent receive events in real time without needing a public URL. This is required for Augmi agents.

  1. In the left sidebar, click Socket Mode (under Settings)
  2. Toggle Enable Socket Mode to On
  3. You’ll be prompted to create an app-level token
  4. Name it something like augmi-connection
  5. Add the scope connections:write
  6. Click Generate
  7. Copy the App-Level Token — it starts with xapp-

Save this token alongside the bot token from the previous step.

Step 4: Subscribe to Bot Events

Your agent needs to know when messages arrive. Event subscriptions tell Slack which events to forward.

  1. In the left sidebar, click Event Subscriptions
  2. Toggle Enable Events to On
  3. Under Subscribe to bot events, click Add Bot User Event and add:
Event When it fires
message.im Someone sends a DM to the agent
message.channels A message is posted in a public channel the agent is in
message.groups A message is posted in a private channel the agent is in
message.mpim A message is posted in a group DM the agent is in
app_mention Someone @mentions the agent
  1. Click Save Changes at the bottom

Step 5: Enable the Messages Tab (for DMs)

If you want users to DM your agent directly:

  1. In the left sidebar, click App Home
  2. Under Show Tabs, make sure Messages Tab is checked
  3. Optionally check Allow users to send Slash commands and messages from the messages tab

Step 6: Add Tokens to Augmi

Now paste the two tokens into Augmi.

During Agent Creation

If you’re creating a new agent:

  1. On the Connect messaging platforms step, click the Slack button
  2. Expand the setup guide by clicking “Show setup guide” if you need a reminder
  3. Paste your Bot Token (xoxb-...) in the first field
  4. Paste your App Token (xapp-...) in the second field
  5. Click Next to continue

For an Existing Agent

If your agent is already deployed:

  1. Go to your agent’s dashboard page
  2. Find the Channel Credentials section
  3. Paste the Slack bot token (xoxb-...) in the Slack bot token field
  4. Paste the Slack app token (xapp-...) in the Slack app token field
  5. Click Save Channel Credentials
  6. The agent will automatically pick up the new tokens (may take up to 60 seconds)

Step 7: Invite the Agent to Channels

After connecting, your agent can respond to DMs immediately. To have it participate in channels:

  1. Open the Slack channel you want the agent in
  2. Type /invite @YourAgentName
  3. Or click the channel name > Integrations > Add an App

By default, agents require an @mention to respond in group channels, so they won’t be noisy.

Troubleshooting

“Socket Mode is not turned on” Warning

If you see this in your agent logs, it means Socket Mode wasn’t enabled in Step 3. Go back to api.slack.com/apps, select your app, and verify Socket Mode is toggled on.

Agent Not Responding to DMs

Check these in order:

  1. Messages Tab enabled? — App Home > Show Tabs > Messages Tab should be checked
  2. message.im event subscribed? — Event Subscriptions > Bot Events should include message.im
  3. Bot token correct? — Should start with xoxb-. A common mistake is pasting the app token in the bot token field.
  4. App installed to workspace? — OAuth & Permissions page should show “Reinstall to Workspace” (not “Install to Workspace”)

Agent Not Responding in Channels

  1. Agent invited? — Use /invite @YourAgentName in the channel
  2. message.channels event subscribed? — Check Event Subscriptions
  3. @mention required? — By default, agents need an @mention in group channels. Try @YourAgentName hello

“invalid_auth” Error

Your bot token may have been revoked or is incorrect. Go to OAuth & Permissions, click Reinstall to Workspace, and copy the new token.

Agent Responds Slowly

Augmi agents use Claude as their AI backbone. Response time depends on message complexity and current API load. Typical responses take 3-10 seconds. If responses consistently take longer than 30 seconds, check your agent’s logs in the Augmi dashboard.

What’s Next

Once Slack is connected, your agent can:

  • Handle DMs — team members can chat with the agent directly
  • Participate in channels — @mention the agent in any channel it’s been invited to
  • Use emoji reactions — the agent adds a reaction to acknowledge it received your message
  • Maintain conversation context — the agent remembers the conversation within a session (resets after the configured idle period)

You can also connect additional channels like Discord, Telegram, and WhatsApp from the same agent dashboard. Each channel operates independently, so your agent can be available everywhere your team communicates.

0 views