Documentation

Composio notifier

Route notifications through the Composio toolkit — Slack, Discord, or Gmail.

Slot: notifier · Name: composio

macOSSupported
LinuxSupported
WindowsSupported

Uses the Composio toolkit to deliver notifications. Handy when you already have Composio set up for other agent tooling — a single credential covers Slack, Discord, and Gmail. Discord supports a low-friction webhook mode and an advanced bot mode.

Setup

Run the interactive Composio setup hub:

ao setup composio

The hub lets you choose Slack, Discord webhook, Discord bot, or Gmail. AO asks for the Composio API key, userId, required target details, which notification priorities the notifier should receive, then reviews the config before writing. When you run ao setup composio, the selected app is written to the canonical notifiers.composio target. You can skip the app picker with --slack, --discord-webhook, --discord-bot, or --gmail. Discord webhook mode does not need a Composio connected account; Discord bot mode uses a bot token once to create a connected account and stores only the resulting connectedAccountId. Gmail mode uses an existing Gmail connected account, or creates a Composio connect link from an existing Gmail auth config.

Dedicated commands use the same guided setup but write app-specific targets:

ao setup composio-slack        # writes notifiers.composio-slack
ao setup composio-discord      # writes notifiers.composio-discord
ao setup composio-discord-bot  # writes notifiers.composio-discord-bot
ao setup composio-mail         # writes notifiers.composio-mail

You can also run the scriptable Slack setup directly:

export COMPOSIO_API_KEY=ak_...
ao setup composio-slack --user-id aoagent --channel "#agents" --non-interactive

All Composio setup commands accept --routing-preset urgent-only, --routing-preset urgent-action, or --routing-preset all.

If you already know the Slack connected account id, pass it directly:

ao setup composio-slack --connected-account-id ca_... --non-interactive

Run the Discord webhook setup when you only need channel notifications:

export COMPOSIO_API_KEY=ak_...
ao setup composio-discord --webhook-url "https://discord.com/api/webhooks/..." --non-interactive

Run the Discord bot setup when you need a bot identity and channel-id based delivery:

export COMPOSIO_API_KEY=ak_...
ao setup composio-discord-bot --channel-id "1234567890" --bot-token "$DISCORD_BOT_TOKEN" --non-interactive

The bot token is used once to create a Composio connected account. AO writes only the resulting connectedAccountId.

Run the Gmail setup when you want AO notifications by email:

export COMPOSIO_API_KEY=ak_...
ao setup composio-mail --email-to [email protected] --non-interactive

Connect Gmail in Composio first, or choose Gmail in ao setup composio and generate a connect link from an existing Gmail auth config. AO does not create Gmail OAuth/auth configs. The setup command finds an active Gmail connected account for the configured userId and writes its connectedAccountId. If multiple Gmail accounts are available, pass the one AO should use:

ao setup composio-mail --email-to [email protected] --connected-account-id ca_...

You can also ask AO to print a Composio Gmail connect URL:

ao setup composio-mail --email-to [email protected] --connect

AO uses an existing Composio Gmail auth config for that link. If you need a specific custom Gmail auth config, pass it explicitly:

ao setup composio-mail --email-to [email protected] --connect --auth-config-id ac_...

If Google blocks a Gmail connection, fix the Gmail auth config in Composio, then rerun ao setup composio-mail.

Use

notifiers:
  composio:
    plugin: composio
    defaultApp: slack # slack | discord | gmail
    userId: aoagent # Composio user id
    connectedAccountId: ca_... # preferred when available
    channelName: "#agents" # Slack
    emailTo: [email protected] # required when defaultApp=gmail
    composioApiKey: ak_... # optional override; otherwise uses env

  composio-discord:
    plugin: composio
    defaultApp: discord
    mode: webhook
    webhookUrl: https://discord.com/api/webhooks/...
    userId: aoagent

  composio-discord-bot:
    plugin: composio
    defaultApp: discord
    mode: bot
    channelId: "1234567890"
    userId: aoagent
    connectedAccountId: ca_...

  composio-mail:
    plugin: composio
    defaultApp: gmail
    emailTo: [email protected]
    userId: aoagent
    connectedAccountId: ca_...

  composio-slack:
    plugin: composio
    defaultApp: slack
    userId: aoagent
    connectedAccountId: ca_...
    channelName: "#agents"

Config

KeyRequiredDefaultWhat it does
defaultAppslackWhich Composio app to target: slack, discord, or gmail
modeDiscord onlyautowebhook uses Discord webhooks; bot uses bot channel messages
userIdoptionalaoagentComposio user id for connected-account lookup
entityIdoptionalBackward-compatible alias for userId
authConfigIdsetup onlyExisting Composio Gmail auth config used by --connect
connectedAccountIdSlack/Gmail/botSpecific connected account to use; not used for Discord webhook mode
channelNamefor SlackSlack channel name
channelIdDiscord botDiscord channel id for bot mode
webhookUrlDiscord webhookDiscord webhook URL for webhook mode
emailTo✓ when gmailRecipient address
composioApiKeyoptionalenv COMPOSIO_API_KEYOverride the API key from config
toolVersionoptionalapp defaultTool version passed to @composio/core
toolVersionsoptionalApp-specific tool versions, for example { slack: "20260508_00" }

Slack defaults to 20260508_00; Discord defaults to 20260429_01; Gmail defaults to 20260506_01. Discord uses Composio's discordbot toolkit for both webhook and bot modes. Webhook mode calls DISCORDBOT_EXECUTE_WEBHOOK with the Discord webhook id/token from webhookUrl, so no Composio Discord connect link is required. If mode is omitted for Discord, AO uses webhook when webhookUrl is present and bot otherwise.

When to use

  • Your org already has Composio set up.
  • You want to route notifications to Gmail as a fallback for people who don't live in Slack/Discord.
  • You'd rather manage one Composio credential than three webhook URLs.