Skip to main content
Use the Slack Channel Monitor when you want Agent Canvas to watch a Slack channel and trigger an OpenHands agent when a message matches your instructions. Common examples include:
  • 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
If you are new to Agent Canvas, start with Install and First-Time Setup.

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.
  1. Go to the Slack API dashboard.
  2. Click Create New App.
  3. Select From scratch.
  4. Enter an app name, such as OpenHands.
  5. Choose the workspace where you want to install the app.
  6. 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.
  1. In the Slack app settings, open Agents and turn on Slack MCP Server. This exposes the hosted MCP server (https://mcp.slack.com/mcp) for your app.
  2. Open OAuth & Permissions.
  3. Scroll to Scopes.
  4. Under User Token Scopes, click Add an OAuth Scope.
  5. Add the scopes required by the Slack MCP server and your monitor.
For a channel monitor, add at least these user token scopes: 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

  1. Stay on the OAuth & Permissions page.
  2. Click Install to Workspace. A workspace admin may need to approve the app.
  3. Review the requested permissions.
  4. Click Allow.
  5. Copy the User OAuth Token (starts with xoxp-) from the OAuth Tokens section. The integration saves this as the SLACK_MCP_USER_TOKEN secret.

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.
  1. In Agent Canvas, check the backend switcher in the bottom-left corner.
  2. Make sure the active backend is the backend where you want the Slack monitor to run.
  3. Open Customize.
  4. Open MCP Servers.
  5. Select Slack from the MCP library.
  6. Paste the User OAuth Token (xoxp-...). It is sent to Slack’s hosted MCP server as Authorization: Bearer <token>.
  7. Make sure the secret-creation toggle is on so Agent Canvas saves the token as SLACK_MCP_USER_TOKEN automatically when you save the MCP server configuration.
  8. Save the MCP server configuration.

Set a Token for the Monitor Itself

Connecting Slack from the integration card is not enough for the Slack Channel Monitor. The integration saves its token as SLACK_MCP_USER_TOKEN, which the monitor does not read. On a user token, the monitor would ignore the token owner’s own messages and reply as them, so the monitor expects a separate bot or user token.
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

  1. Open Automate in the left navigation.
  2. Find Start from a proven workflow.
  3. Choose the Slack channel monitor workflow.
  4. Agent Canvas opens a new conversation with a prefilled setup prompt.
  5. Send the prompt as-is, or edit it first if you already know what you want.
After you send the prompt, the agent starts a setup conversation. It uses the preconfigured skills and Slack access to interview you, clarify the channel monitor, and create the automation.

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.
You can edit the prefilled prompt before sending it if you want to provide any of those details up front. For example, you can ask the tell the agent to configure the automation to watch an #alerts channel, summarize new incidents, and create a GitHub issue when a message includes a production error.

Verify the Automation

After the automation is created:
  1. Open Automate.
  2. Confirm the new automation appears in the list.
  3. Open the automation details and check that it is enabled.
  4. Post a test message in a channel the bot has joined.
  5. Confirm that the agent run appears and performs the action you requested.