Slack
Integrate Otto with Slack to send automatic alerts and messages for your Ascend flows and automations.
Prerequisites​
Before setting up the Slack integration, ensure you have:
- Deployment: Your Automations need to be deployed in order to run
- MCP Server Configuration: Follow the MCP setup guide for foundational setup
- Otto Agent Configuration: Configure Agents using the Otto configuration guide
- Slack Bot Token: Store your Slack bot token as a Vault secret
- Slack Team ID: The unique identifier for your Slack workspace
- Channel IDs: The IDs of Slack channels where Otto should send messages
Organization​
The Slack integration requires three configuration files in specific subfolders within your Ascend Project:
otto/mcp.yaml
otto/otto.yaml
automations/otto-notifications.yaml
- Screenshot
- File tree

├── automations
│  ├── downstreams.yaml
│  ├── extract-load.yaml
│  ├── otto-notifications.yaml
│  └── transform-demo.yaml
├── connections
├── data
├── flows
├── macros
├── otto
│  ├── agents
│  ├── mcp.yaml
│  ├── otto.yaml
│  └── rules
Configuration​
Set up Slack MCP server​
Configure the Slack MCP server connection. For general MCP setup details, see the MCP setup guide.
mcpServers:
slack:
command: npx
args:
- --cache
- /tmp/npm-cache
- -y
- "@modelcontextprotocol/server-slack"
env:
SLACK_BOT_TOKEN: ${vaults.environment.SLACK_APP_TOKEN}
SLACK_TEAM_ID: <YOUR_SLACK_TEAM_ID>
SLACK_CHANNEL_IDS: <YOUR_SLACK_CHANNEL_ID>
Slack-specific configuration:
@modelcontextprotocol/server-slack
- The npm package providing Slack MCP functionalitySLACK_BOT_TOKEN
- Your Slack bot's authentication tokenSLACK_TEAM_ID
- Your Slack workspace identifierSLACK_CHANNEL_IDS
- Comma-separated list of channel IDs where Otto can post
Configure Otto Agents​
Grant your Otto Agents access to the Slack MCP server. For detailed configuration options, see the Otto configuration guide.
otto:
agents:
"Otto Chat":
mcp_servers:
- slack
Create Automation​
The otto-notifications.yaml
file defines when and how Otto sends Slack notifications. This follows standard Automation conventions:
automation:
name: otto-notifications
enabled: true
triggers:
events:
- sql_filter: json_extract_string(event, '$.data.flow') = 'transform-demo'
types:
- FlowRunError
- FlowRunSuccess
actions:
- type: run_otto
name: run-otto
config:
prompt: >-
# Instructions
You are being invoked at the end of a flow run. Your job is to assess
changes in flow run behavior, and send a Slack message to keep other users updated.
You cannot ask for help or clarification; you must do this end-to-end on your own based
on your own judgement. Your last action should always be to post a message to Slack.
## Flow run analysis rules
Analyze flow success / failure by fetching the maximum number of flow runs.
1) If the flow run was a success and the previous flow run was also a
success, send a
funny message congratulating the team on another smooth run.
2) If the flow run was a success and the previous flow run was not,
send an exciting
and congratulatory messages celebrating the flow is now fixed, and congratulating
whichever user did the fixing (check git history).
3) If the flow run was a failure and the previous flow run was also a
failure, send a sad
message imploring somebody to fix it.
4) If the flow run was a failure and the previous flow run was not,
send a big alert message.
You should try to identify who broke the flow, and even @ mention them if you can. You
should also try to analyze the changes and suggest fixes if possible.
Additionally, you should make heavy use of git history and file reading calls to help track
down details that may be relevant.
## Slack message and notification
At the end of your analysis, you must post a message to Slack in the appropriate channel.
Your slack post message should:
- include a link to the flow run:
https://[runtime.link_url]/flows/[flow_name]/[run_name]
- be formatted for Slack rendering, which is different than markdown
- when @ mentioning users, look up their profile so you can reference their actual id
Automation details:
- Event trigger: The automation monitors for
FlowRunError
orFlowRunSuccess
events from your specified Flow - Otto analysis: When triggered, Otto analyzes the Flow run history and determines the appropriate response
- Intelligent messaging: Otto crafts contextual messages based on Flow patterns:
- Success after success: Celebratory messages for consistent performance
- Success after failure: Congratulatory messages highlighting the fix
- Failure after success: Alert messages identifying potential causes
- Failure after failure: Urgent messages requesting immediate attention
- Slack delivery: Otto posts the formatted message to your configured Slack channel
Otto notification Automations work for manual Flow runs, but they're most powerful when combined with scheduled Automations.
For example, when testing a new production pipeline, you can create an Automation to run it every hour, then configure Otto Slack alerts to keep your team updated on progress.
Next steps​
After setting up the Slack integration:
- Test the configuration by triggering a Flow run in your Deployment
- Monitor Slack channels for Otto's messages
- Adjust the prompt and triggers based on your team's needs
- Configure additional MCP servers using the MCP setup guide
- Explore additional Otto capabilities for enhanced automation