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:
- Navigate to the Ascend signup page
- Create your account by using your email address and filling out the relevant fields
- Verify your new Ascend Instance via the email sent to you
- 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:
- Navigate to the Slack workspace creation page
- 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
- 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:
- Go to the Slack API creation page
- Click Create New App
- 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
- 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:
- In your app's settings, navigate to OAuth & Permissions in the left sidebar
- Scroll down to the Scopes section
- Under Bot Token Scopes, click Add an OAuth Scope
- Add the following scopes:
chat:write- Send messages as the botchannels:read- View basic information about public channels
- 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
- Click the green Allow or Install otto-automation button to authorize the app
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:
- 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.
- 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-
- Note: This value should start with
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:
- Open your Slack workspace in a browser
- Navigate to the channel where you want Otto to post (e.g. #new-channel)
- 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
- Look at the browser URL for your Slack workspace (e.g.
https://app.slack.com/client/T01ABC123DEF/C01XYZ456GHI) - 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
- 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
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:
- In Ascend, navigate to your Settings menu by clicking on your profile in the top right and clicking the Settings button
- Select Secrets & Vaults
- Under the Environments section, click the Default Environment
- Add the 3 following secrets (create a separate secret for each one):
SLACK_APP_TOKEN: Your Bot User OAuth Token from Step 4 (starts withxoxb-)SLACK_TEAM_ID: Your Workspace ID from Step 5 (starts withT)SLACK_CHANNEL_ID: Your Channel ID from Step 5 (starts withC)
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.
- Navigate to the Ascend homepage, then click on your Workspace
- Click on the file tree and in the
ottodirectory, open themcp.yamlfile - Ensure that the
mcp.yamlfile has at least the following within the file:- Note: The
mcp.yamlfile can contain more than this but we are only concerned with the Slack MCP servers for the purposes of this lab
- Note: The
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:
- In the same
ottodirectory, open theotto.yamlfile - Copy/paste the following code into the file:
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_ottoto 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
FlowRunErrorandFlowRunSuccessevents for comprehensive Flow monitoring
Step 10: Deploy and test
First, we'll need to deploy the changes from our Workspace into our Deployment.
- In your Workspace, click on the Source Control tab (the Git branch icon in the top right of the left sidebar)
- Click Open Git log & actions
- 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.
- Navigate to the Ascend homepage and then click on the Production Deployment
- On the left side, click on the sales Flow
- In the top right, click Run Flow, then click Run in the pop-up window
- 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.
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:
- Getting started with Ascend: See the Ascend quickstart guide for an introduction to the platform
- Managing Vault secrets: See the Vault secrets documentation for detailed instructions on storing and managing credentials
- MCP server configuration: See the MCP configuration guide for comprehensive MCP setup and configuration options
- Otto agent configuration: See the Otto configuration guide for advanced agent customization
- Otto Automations: See the Otto Automations guide for more Automation patterns and examples
Next steps
After setting up your Slack MCP Automation:
- Create additional custom agents for specialized tasks
- Explore other MCP servers for different integrations
- Set up Otto email summaries for automated reports
- Configure scheduled Automations to trigger regular Flow runs
- Build more complex workflows with multiple Otto Automations