- Responding when someone mentions a support keyword
- Turning bug reports into GitHub issues
- Summarizing incidents from an alerts channel
- Running a repository task from a Slack request
Prerequisites
Before you start, make sure you have:- Agent Canvas installed and running
- An LLM configured for the backend that will run the automation
- Permission to create and install a Slack app in your workspace
- Access to install MCP servers and save secrets in Agent Canvas
Create the Slack App
The Slack integration uses Slack’s official hosted MCP server (https://mcp.slack.com/mcp), which authorizes as the user who installs the app. Create a Slack app that has the MCP server feature enabled.
- Go to the Slack API dashboard.
- Click
Create New App. - Select
From scratch. - Enter an app name, such as
OpenHands. - Choose the workspace where you want to install the app.
- Click
Create App.
Enable the Slack MCP Server and Add User Token Scopes
The hosted MCP server acts as the authorizing user, so the app needs a user token (not a bot token) with the scopes the server’s tools require.- In the Slack app settings, open
Agentsand turn on Slack MCP Server. This exposes the hosted MCP server (https://mcp.slack.com/mcp) for your app. - Open
OAuth & Permissions. - Scroll to
Scopes. - Under
User Token Scopes, clickAdd an OAuth Scope. - Add the scopes required by the Slack MCP server and your monitor.
See Slack’s MCP server scope reference for the exact scopes each tool requires.
Slack may require you to reinstall the app after changing scopes.
Install the App and Copy the User OAuth Token
- Stay on the
OAuth & Permissionspage. - Click
Install to Workspace. A workspace admin may need to approve the app. - Review the requested permissions.
- Click
Allow. - Copy the
User OAuth Token(starts withxoxp-) from theOAuth Tokenssection. The integration saves this as theSLACK_MCP_USER_TOKENsecret.
Join the Channels to Monitor
The hosted MCP server authorizes as the user who installed the app, so it can read the channels that user can see. Make sure the installing user is a member of every channel you want the automation to monitor.Add the Slack MCP Server
The Slack MCP server gives the agent tools for reading Slack channel activity and posting responses.- In Agent Canvas, check the backend switcher in the bottom-left corner.
- Make sure the active backend is the backend where you want the Slack monitor to run.
- Open
Customize. - Open
MCP Servers. - Select
Slackfrom the MCP library. - Paste the User OAuth Token (
xoxp-...). It is sent to Slack’s hosted MCP server asAuthorization: Bearer <token>. - Make sure the secret-creation toggle is on so Agent Canvas saves the token as
SLACK_MCP_USER_TOKENautomatically when you save the MCP server configuration. - Save the MCP server configuration.
Set a Token for the Monitor Itself
After connecting Slack MCP, set one of the following under OpenHands Settings → Secrets:
Without one of these, the cron run stops with “No Slack token found” even though Canvas shows the Slack prerequisite as met.
Start the Slack Channel Monitor Workflow
- Open
Automatein the left navigation. - Find
Start from a proven workflow. - Choose the Slack channel monitor workflow.
- Agent Canvas opens a new conversation with a prefilled setup prompt.
- Send the prompt as-is, or edit it first if you already know what you want.
Customize the Monitor
You do not need to know every detail before sending the prefilled prompt. The agent will ask follow-up questions to clarify:- The Slack channel or channels to monitor
- The message pattern, keyword, or mention that should trigger the agent
- What the agent should do when a message matches
- Whether the agent should reply in Slack
- Any GitHub repository or external service the agent should use
If you want the automation to watch for
@your-bot-name, tell the agent to watch for Slack bot mentions as well as the trigger phrases you set. That way, it can respond when someone mentions the bot directly, not just when a specific keyword appears.Verify the Automation
After the automation is created:- Open
Automate. - Confirm the new automation appears in the list.
- Open the automation details and check that it is enabled.
- Post a test message in a channel the bot has joined.
- Confirm that the agent run appears and performs the action you requested.

