Skip to main content

Set up Slack MCP Automation

This guide walks you through the complete process of setting up a Slack MCP Automation for Otto, from creating a Slack workspace to configuring your first Automation.

Overview

By the end of this guide, you'll have:

  • An Ascend Instance with Otto enabled
  • A Slack workspace with a custom bot
  • An MCP server configured to communicate with Slack
  • Otto configured to send intelligent messages to Slack channels
  • An Automation that monitors Flow events and sends Slack notifications

Prerequisites

  • An email address to create a Slack workspace and Ascend Instance

Step 0: Create an Ascend Instance

Before setting up Slack integration, you need an Ascend Instance with Otto enabled:

  1. Navigate to the Ascend signup page
  2. Create your account by using your email address and filling out the relevant fields
  3. Verify your new Ascend Instance via the email sent to you
  4. Verify that Otto is enabled by looking for the sparkles ✨ icon in the top right corner of your Instance

Step 1: Create a Slack workspace

We're going to create a fresh Slack workspace where we can enable a bot for our Automations to send Otto's messages with:

  1. Navigate to the Slack workspace creation page
  2. If prompted to provide an email, use the same email as you used to create your Ascend instance
    • Note: If you have already Slack workspaces associated with this email, you may be routed to a page showing various workspaces. In that situation, click Get Started on the Create a New Workspace option at the bottom of the page
  3. Follow the prompts to create a new workspace. You can use the values listed below to fill out the relevant fields when you are prompted. For the values with <Insert your name>, please replace that with your name in that section:
    • Workspace Name: Ascend-<Insert your name>
    • Your Name: <Insert your name>
    • Inviting team members: Click Skip this step
    • Slack Pro: Click Start with the Limited Free Version

Step 2: Create a Slack app

Create a Slack app that will act as your Otto bot:

  1. Go to the Slack API creation page
  2. Click Create New App
  3. Select From scratch. You can use the values listed below to fill out the relevant fields when you are prompted:
    • App name: otto-automation
    • Workspace: Select Ascend-<Insert your name> from the dropdown
  4. Click Create App

Step 3: Configure bot permissions

As soon as you create your app, configure the OAuth scopes (permissions) your bot needs to interact with Slack:

  1. In your app's settings, navigate to OAuth & Permissions in the left sidebar
  2. Scroll down to the Scopes section
  3. Under Bot Token Scopes, click Add an OAuth Scope
  4. Add the following scopes:
    • chat:write - Send messages as the bot
    • channels:read - View basic information about public channels
  5. Navigate to the top of the page (in OAuth & Permissions) and click the Install to Ascend button listed under OAuth Tokens
    • Note: This button may initially be greyed out but should soon become clickable
  6. Click the green Allow or Install otto-automation button to authorize the app
note

You will need chat:write and channels:read at minimum for this to work, but you can then add additional scopes as needed later.

Step 4: Obtain Slack app bot token

In Step 6, we will need the bot's OAuth token to be added to our Ascend instance, so we're going to save that value while we work with the bot:

  1. After just installing the app, you should see that the button to install has now been replaced with a field called Bot User OAuth Token.
  2. Copy the value listed under Bot User OAuth Token. Save this value somewhere, as we'll need to access it later.
    • Note: This value should start with xoxb-

Step 5: Get your workspace and channel IDs

Retrieve the IDs needed to configure your MCP server. Specifically, the workspace and channel ID, which are present in the URL of a Slack workspace when opened in a browser:

  1. Open your Slack workspace in a browser
  2. Navigate to the channel where you want Otto to post (e.g. #new-channel)
  3. Add the new Slack app to the channel you want Otto to post in by using the command: /invite @otto-automation
    • Note: If Otto does not appear, please check that you did all the steps in Step 3
  4. Look at the browser URL for your Slack workspace (e.g. https://app.slack.com/client/T01ABC123DEF/C01XYZ456GHI)
  5. The Workspace ID is the part after /client/ (e.g., T01ABC123DEF)
    • Note: The Workspace ID will always start with the letter T in the URL
  6. The Channel ID is the last part of the URL (e.g., C01XYZ456GHI)
    • Note: The Channel ID will always start with the letter C in the URL
tip

If you get stuck on this step or are unsure what the exact values you're getting are, you can follow Slack's guide to finding workspace and channel IDs.

Step 6: Store credentials in Ascend

Store your Slack credentials securely using Environment Vault secrets:

  1. In Ascend, navigate to your Settings menu by clicking on your profile in the top right and clicking the Settings button
  2. Select Secrets & Vaults
  3. Under the Environments section, click the Default Environment
  4. Add the 3 following secrets (create a separate secret for each one):
    • SLACK_APP_TOKEN: Your Bot User OAuth Token from Step 4 (starts with xoxb-)
    • SLACK_TEAM_ID: Your Workspace ID from Step 5 (starts with T)
    • SLACK_CHANNEL_ID: Your Channel ID from Step 5 (starts with C)

Step 7: Configure the Slack MCP server

Create or update your mcp.yaml file in the otto directory of your Ascend Project to hook up your Slack MCP server.

  1. Navigate to the Ascend homepage, then click on your Workspace
  2. Click on the file tree and in the otto directory, open the mcp.yaml file
  3. Ensure that the mcp.yaml file has at least the following within the file:
    • Note: The mcp.yaml file can contain more than this but we are only concerned with the Slack MCP servers for the purposes of this lab
otto/mcp.yaml
mcpServers:
slack:
command: npx
args:
- --cache
- /tmp/npm-cache
- -y
- "@zencoderai/slack-mcp-server"
env:
SLACK_BOT_TOKEN: ${vaults.environment.SLACK_APP_TOKEN}
SLACK_TEAM_ID: ${vaults.environment.SLACK_TEAM_ID}
SLACK_CHANNEL_IDS: ${vaults.environment.SLACK_CHANNEL_ID}

This configuration sets up a bridge between Otto and Slack by installing the Slack MCP server and connecting it to your Slack workspace using the credentials you stored in Step 6. The server runs automatically when Otto needs to interact with Slack.

Step 8: Configure Otto agents

Grant your Otto agents access to the Slack MCP server by creating or updating your otto.yaml file:

  1. In the same otto directory, open the otto.yaml file
  2. Copy/paste the following code into the file:
otto/otto.yaml
otto:
agents:
"chat":
mcp_servers:
- slack

This configuration allows the "chat" agent to use the Slack MCP server. You can add the slack MCP server to any existing agents or create new agents as needed.

Step 9: Explore the Slack notification Automation

Your Ascend Project includes a pre-configured Automation that monitors Flow events and sends Slack notifications. Let's examine how it works.

In the automations directory of your Ascend Project, you'll find the otto-slack-success.yaml and otto-slack-failure.yaml files. These files are intended to send a comprehensive summary (depending on the triggered event) to describe what happened in the flow run.

How these Automations work:

  • Type: Uses run_otto to leverage Otto's AI capabilities
  • Agent: Specifies "chat" as the agent (configured in Step 8 with Slack MCP access)
  • Prompt: Instructs Otto to analyze Flow run patterns and craft contextual messages
  • Triggers: Monitors both FlowRunError and FlowRunSuccess events for comprehensive Flow monitoring

Step 10: Deploy and test

First, we'll need to deploy the changes from our Workspace into our Deployment.

  1. In your Workspace, click on the Source Control tab (the Git branch icon in the top right of the left sidebar)
  2. Click Open Git log & actions
  3. Click Merge to Deployment and then click Production within the dropdown menu

This will push our changes from our Workspace to our Deployment so that when the Automations trigger on the flow run, we'll see them send a message to our Slack channel.

We can now test the Automation by triggering a Flow run in the Deployment.

  1. Navigate to the Ascend homepage and then click on the Production Deployment
  2. On the left side, click on the sales Flow
  3. In the top right, click Run Flow, then click Run in the pop-up window
  4. Upon completion of the flow run (and a little more time for the Automation to run), you should see a new Slack message!

Depending on how the Flow completed (success or failure), you should see a slightly different message. Take a look and see if this matches with the information you're expecting Otto to provide you.

tip

If you don't see a message in Slack:

  • Check the Automation logs in Ascend for errors
  • Verify your Vault secrets (bot token, team/channel IDs) are correct
  • Ensure your bot is installed in the workspace
  • Check that your bot has the necessary permissions

Additional resources

If you were interested in more detailed explanations or digging a little deeper on any of the topics above, check out some of these links to explore those topics:

Next steps

After setting up your Slack MCP Automation: