Skip to main content
The Composio notifier plugin provides unified notifications across multiple platforms (Slack, Discord, Gmail) using the Composio SDK. It automatically handles authentication and platform-specific formatting.

Overview

The Composio notifier provides:
  • Multi-platform support (Slack, Discord, Gmail)
  • Single configuration for all channels
  • Automatic authentication via Composio
  • Priority-based emoji indicators
  • Action button support
  • Automatic timeout handling (30s)
  • Optional peer dependency (graceful degradation)
The Composio SDK is an optional peer dependency. If not installed, the plugin will log a warning and perform no-ops without crashing.

Prerequisites

  1. Composio Account: Sign up at https://composio.dev
  2. Composio SDK: Install the optional dependency
  3. Connected Apps: Connect your Slack/Discord/Gmail accounts through Composio dashboard

Configuration

Add the Composio notifier to your agent-orchestrator.yaml:

Configuration Options

string
required
Your Composio API key. Get it from the Composio Dashboard.Falls back to COMPOSIO_API_KEY environment variable if not specified in config.
Keep your API key secure! Never commit it to version control. Use environment variables.
string
default:"slack"
Default notification platform. Must be one of:
  • slack - Send to Slack via Composio
  • discord - Send to Discord via Composio
  • gmail - Send email via Gmail
You must have the corresponding app connected in your Composio account.
string
Channel name for Slack (e.g., #agent-notifications) or Discord.Slack: Accepts channel names (#channel) or user IDs (@user)Discord: Channel names are converted to channel IDs by Composio
string
Explicit channel ID for Slack or Discord.Slack: Channel ID like C1234567890Discord: Numeric channel ID like 123456789012345678
If both channelName and channelId are provided, channelId takes precedence.
string
Email recipient address. Required when defaultApp is gmail.
The plugin will throw an error at initialization if defaultApp is gmail and emailTo is not provided.

Platform-Specific Behavior

Slack

Tool Used: SLACK_SEND_MESSAGE Payload:
Features:
  • Supports both channel names and IDs
  • Emoji-based priority indicators
  • Markdown formatting
  • Action URLs in message body

Discord

Tool Used: DISCORD_SEND_MESSAGE Payload:
Features:
  • Requires numeric channel IDs (not names)
  • Emoji-based priority indicators
  • Markdown formatting
  • Action URLs in message body
Discord requires numeric channel IDs. Channel names are passed to Composio, which attempts to resolve them to IDs.

Gmail

Tool Used: GMAIL_SEND_EMAIL Payload:
Features:
  • Fixed subject line: “Agent Orchestrator Notification”
  • Plain text body with emoji indicators
  • Action URLs listed in email body

Priority Emoji

Each notification includes a priority indicator:
Critical issues requiring immediate attention (Unicode: U+1F6A8)
Actions waiting for human decision (Unicode: U+1F449)
Warning conditions to be aware of (Unicode: U+26A0)
Informational updates (Unicode: U+2139)

Message Format

Standard Notification

With Actions

Actions without URLs are listed without links. This is common for callback-based actions that require custom handling.

Usage Examples

Slack Notifications

Discord Notifications

Email Notifications

Multi-Environment Setup

Advanced Features

Custom Message Posting

The post() method allows sending custom messages with optional channel override:

Entity ID Support

The plugin passes entityId to Composio’s executeAction() if needed for multi-tenant scenarios:

Timeout Handling

All Composio API calls have a 30-second timeout to prevent hanging:

Troubleshooting

Solution: Install the SDK
Solution: Set the API key
Or export environment variable:
Solution: Use a valid app name
Solution: Add email recipient
Composio API returns error: “App not connected”Solution:
  1. Go to Composio Dashboard
  2. Navigate to “Connected Accounts”
  3. Click “Connect” for Slack/Discord/Gmail
  4. Complete OAuth flow
  5. Retry notification
Discord requires numeric channel IDs. Channel names may not resolve.Solution: Use explicit channel ID
Find channel ID:
  1. Enable Developer Mode in Discord settings
  2. Right-click channel → Copy ID
Possible causes:
  • Network connectivity issues
  • Composio API slowness
  • Large message payload
Solution:
  • Check network connection
  • Retry the operation
  • Contact Composio support if persistent

Comparison with Other Notifiers

Source Code

View the plugin source:
  • Package: @composio/ao-plugin-notifier-composio
  • Location: packages/plugins/notifier-composio/src/index.ts