Skip to main content

Otto Automations

curriculum

If you're working on this page as part of the Ascend Curriculum, click here to navigate back or here to move onto the next section.

Otto Automations combine Otto's AI capabilities with Ascend's Automations to create intelligent, event-driven workflows that automatically respond to Flow events, analyze data patterns, and take actions across various platforms and services.

This guide demonstrates how to create Otto Automations using Slack notifications. That said, the patterns shown here can be adapted for many different use cases including database operations, file management, API integrations, and more.

preview feature

We're still working on this one! Expect changes and note that standard SLAs don't apply, so don't rely on this for production workloads yet. Refer to our release stages to learn more.

Prerequisites​

Before setting up the Slack Otto Automations, ensure you have:

Organization​

Otto Automations follow a consistent organizational pattern within your Ascend Project. They require three types of configuration files in specific sub-folders:

  • otto/mcp.yaml - Configures MCP server connections for external services
  • otto/otto.yaml - Configures Otto agents and grants them access to MCP servers
  • automations/<automation-name>.yaml - Defines the Automation trigger and Otto prompt
folder

Configuration​

Set up Slack MCP server​

Configure the Slack MCP server connection. For general MCP setup details, see the MCP setup guide.

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}

Slack-specific configuration:

  • @zencoderai/slack-mcp-server - Slack MCP functionality
  • SLACK_BOT_TOKEN - Your Slack bot's authentication token
  • SLACK_TEAM_ID - Your Slack workspace identifier
  • SLACK_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/otto.yaml
otto:
agents:
"Otto Chat":
mcp_servers:
- slack

Create Automation​

The otto-notifications.yaml file defines when and how Otto sends Slack notifications using the run_otto Automation pattern:

automations/otto-notifications.yaml
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: >-

To customize the Flow Event, simply replace transform-demo with the name of the Flow you want to monitor.

trigger automation on all flow run errors

Use this Events config to trigger an Automation on every Flow run failure instead of specifying individual Flows:

...
triggers:
events:
- types:
- FlowRunError
...

Prompt Otto in an Automation​

  • (Required) Specify a Prompt to trigger Otto to complete additional tasks
  • (Optional) Specify an Agent name to leverage an existing custom agent that will execute your Prompt
note

This configuration uses a run_otto Automation type, whereas the more specialized Otto email summaries use the activity_summary Automation type.

enable your automation

Set enabled: true in your Automation configuration to make it active in Deployments. When enabled: false, your Automation won't execute even when trigger conditions are metβ€”perfect for temporarily disabling Automations without deleting them.

Automation details​

  • Event trigger: The Automation monitors for FlowRunError or FlowRunSuccess 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
note

Otto Automations work for manual Flow runs in Deployments, 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 Otto Automation:

  • 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