Communication Channels
Meet Your Users Where They Are
Kaman's multi-channel architecture enables your AI agents and workflows to communicate through 14 distinct channels, from business messaging platforms to scheduled automation. Each channel is a configured instance that routes messages to your agents and workflows.
Channel Architecture
Channel Types Overview
| Channel | Type | Method | Use Case |
|---|---|---|---|
| Slack | Messaging | Webhook | Team collaboration, bot commands |
| Microsoft Teams | Messaging | Webhook + Bot | Enterprise collaboration |
| Mattermost | Messaging | Webhook | Self-hosted team chat |
| Discord | Messaging | Webhook | Community engagement |
| Telegram | Messaging | Webhook | Global messaging, bots |
| WhatsApp Business | Business | Webhook | Customer communication |
| WhatsApp (Baileys) | Personal | Socket | Direct WhatsApp integration |
| Twilio SMS | Business | Webhook | SMS notifications |
| Email (IMAP/SMTP) | Business | Polling | Traditional email |
| Gmail | Business | Polling + OAuth | Google email integration |
| HTTP Webhook | Integration | Webhook | Custom integrations |
| Cron | Automation | Scheduled | Time-based triggers |
| Google Workspace | Automation | Polling | Drive file monitoring |
| Odoo Events | Automation | Polling | ERP event monitoring |
Messaging Platforms
Slack Channel
Full Slack integration with bot mentions, direct messages, and slash commands.
Configuration:
| Field | Description |
|---|---|
botToken | Slack Bot User OAuth Token (xoxb-*) |
signingSecret | Slack App Signing Secret |
defaultChannel | Default channel ID (optional) |
appId | Slack App ID (optional) |
Features:
- Bot mention detection in channels
- Direct message handling
- Slash command support
- Response streaming
- Events API integration
Setup: Create app at https://api.slack.com/apps, enable Events API, add bot scopes
Microsoft Teams Channel
Bot Framework and incoming webhook integration for enterprise Teams.
Configuration:
| Field | Description |
|---|---|
webhookUrl | Incoming webhook URL (optional) |
appId | Bot Framework App ID (optional) |
appPassword | Bot Framework App Password (optional) |
tenantId | Azure AD Tenant ID (optional) |
Features:
- Bot Framework activity handling
- Adaptive card actions
- OAuth2 bot authentication
- Message card formatting
- Dual mode (webhook + Bot Framework)
Setup: Azure Portal Bot Channels Registration + Teams admin approval
Mattermost Channel
Self-hosted team chat integration via outgoing webhooks.
Configuration:
| Field | Description |
|---|---|
MM_URL | Mattermost server URL |
channelId | Target channel ID |
token | API authentication token |
Features:
- Channel message reception
- Response streaming
- Token-based authentication
Setup: Configure outgoing webhook in Mattermost admin panel
Discord Channel
Discord Bot API with slash commands and interactive components.
Configuration:
| Field | Description |
|---|---|
botToken | Discord Bot Token |
applicationId | Discord Application ID |
publicKey | Application Public Key (optional) |
defaultChannelId | Default channel for messages (optional) |
Features:
- Slash command handling
- Message component interactions (buttons, selects)
- Interaction token-based responses
- 2000 character message splitting
- PING endpoint verification
Setup: Discord Developer Portal + configure interaction endpoint URL
Telegram Channel
Telegram Bot API with webhook integration.
Configuration:
| Field | Description |
|---|---|
botToken | Telegram Bot Token (from @BotFather) |
parseMode | Message format: HTML, Markdown, MarkdownV2 |
disableWebPagePreview | Link preview control (optional) |
Features:
- Message and edited message handling
- Callback query (inline button) support
- Bot command detection (/start, /help)
- 4096 character message splitting
- Multiple parse mode support
Setup: Create bot via @BotFather, configure webhook via Telegram API
Business Communication
WhatsApp Business Channel
Official Meta WhatsApp Business API integration.
Configuration:
| Field | Description |
|---|---|
phoneNumberId | WhatsApp Business Phone Number ID |
accessToken | WhatsApp Business API Access Token |
webhookVerifyToken | Verification token for webhooks |
apiVersion | WhatsApp API version (default: v18.0) |
Features:
- Text message handling
- Interactive button reply support
- Webhook verification (hub.challenge)
- Message and interactive payload parsing
Setup: Meta Developers console + configure webhook endpoint
WhatsApp (Baileys) Channel
Direct WhatsApp integration via personal phone number using Baileys library.
Configuration:
| Field | Description |
|---|---|
phoneNumber | WhatsApp phone with country code (e.g., 972501234567) |
Features:
- Pairing code authentication (no QR scanning)
- Full media support (images, video, audio, documents)
- Session persistence via S3 storage
- Automatic reconnection
- Message buffering per session
- Status notifications (pairing, connected, logged_out)
Setup: Enter phone number → receive pairing code → link device
Special: This channel maintains a persistent WebSocket connection and requires the cron system for connection management.
Twilio SMS Channel
SMS sending and receiving via Twilio.
Configuration:
| Field | Description |
|---|---|
accountSid | Twilio Account SID |
authToken | Twilio Auth Token |
twilioPhoneNumber | Twilio phone number (E.164 format) |
messagingServiceSid | Messaging Service SID (optional) |
Features:
- SMS message reception
- Status callback handling
- TwiML response format
- 1500 character message splitting
- Messaging Service support
Setup: Twilio console phone number configuration + webhook URL
Email Channel (IMAP/SMTP)
Traditional email integration with polling-based reception.
Configuration:
| Field | Description |
|---|---|
smtpHost | SMTP server hostname |
smtpPort | SMTP port (587 or 465) |
smtpSecure | Use SSL (boolean) |
imapHost | IMAP server hostname |
imapPort | IMAP port (993 or 143) |
imapSecure | Use SSL (boolean) |
username | Email account username |
password | Email password or app password |
fromEmail | From address for outgoing |
checkInterval | Poll interval in minutes (default: 5) |
Features:
- IMAP email polling
- SMTP outgoing email
- Unread email detection
- Subject-aware replies
- Attachment support
Setup: For Gmail, enable app passwords; for others, use standard IMAP/SMTP credentials
Gmail Channel
Gmail API with OAuth2 for enhanced integration.
Configuration:
| Field | Description |
|---|---|
clientId | Google OAuth2 Client ID |
clientSecret | Google OAuth2 Client Secret |
refreshToken | OAuth2 Refresh Token |
redirectUri | OAuth2 Redirect URI (optional) |
checkInterval | Poll interval in minutes (default: 5) |
Features:
- OAuth2 authentication
- History-based change detection (efficient polling)
- Multipart message handling
- Base64 email encoding for sending
Setup: Google Cloud Console + OAuth consent screen + Gmail API enablement
Automation & Integration
HTTP Webhook Channel
Generic webhook for custom integrations with any system.
Configuration:
| Field | Description |
|---|---|
responseWebhookUrl | Response endpoint URL (optional) |
webhookSecret | HMAC-SHA256 secret for verification (optional) |
messageField | JSON path to message (e.g., "data.message") |
sessionIdField | JSON path to session ID |
responseHeaders | Custom response headers (JSON) |
syncResponse | Wait for response (boolean, default: false) |
Features:
- Flexible JSON payload parsing
- HMAC-SHA256 signature verification
- Custom field path extraction (dot notation)
- Synchronous or asynchronous response modes
- 30-second timeout for sync responses
Use Cases:
- Custom application integration
- Third-party service webhooks
- Internal system automation
- API-triggered workflows
Cron Channel
Time-based scheduled execution using cron expressions.
Configuration:
| Field | Description |
|---|---|
cronSchedule | Cron expression (minute hour day month weekday) |
message | Message to send on trigger |
timezone | Timezone (default: UTC) |
enabled | Enable/disable flag |
Cron Expression Examples:
| Expression | Description |
|---|---|
0 9 * * * | Daily at 9:00 AM |
0 9 * * 1-5 | Weekdays at 9:00 AM |
*/15 * * * * | Every 15 minutes |
0 0 1 * * | First day of month at midnight |
30 8 * * 1 | Mondays at 8:30 AM |
Features:
- 5-field cron expression support
- Timezone awareness
- Manual trigger capability
- Job status monitoring
- Proper cleanup on destruction
Use Cases:
- Daily report generation
- Scheduled data sync
- Reminder notifications
- Periodic health checks
Google Workspace Channel
Google Drive folder monitoring for file changes.
Configuration:
| Field | Description |
|---|---|
clientId | Google OAuth2 Client ID |
clientSecret | Google OAuth2 Client Secret |
refreshToken | OAuth2 Refresh Token |
folderId | Google Drive folder ID to monitor |
checkInterval | Poll interval in minutes (default: 10) |
fileTypes | Comma-separated file types (e.g., "pdf,docx") |
webhookUrl | Drive push notification webhook (optional) |
Features:
- File change detection (create/update/delete)
- File type filtering
- Drive API watch/push notifications
- Response document creation
Use Cases:
- Document processing automation
- File-triggered workflows
- Content moderation
- Backup notifications
Odoo Events Channel
Odoo ERP database event monitoring.
Configuration:
| Field | Description |
|---|---|
odooUrl | Odoo server URL |
database | Odoo database name |
username | Odoo username |
password | Odoo password or API key |
models | Comma-separated models (e.g., "sale.order,crm.lead") |
events | Event types (create, write, unlink) |
checkInterval | Poll interval in minutes (default: 5) |
Features:
- Model event tracking (create, write, unlink)
- JSON-RPC API calls
- Mail message creation
- Multi-model monitoring
- Write date tracking for changes
Use Cases:
- Order processing automation
- CRM lead handling
- Inventory alerts
- Customer communication
Channel Instances
Each channel can have multiple configured instances:
Downstream Routing
Each channel instance routes messages to a specific target:
| Target Type | Format | Description |
|---|---|---|
| Agent | agent::agentId_expertIndex | LangGraph AI agent |
| App | app::appId_expertIndex | Application |
| Workflow | workflow::workflowId | DAG workflow execution |
| Function | function::functionId | Single function call |
Message Flow
Capabilities Matrix
| Channel | Webhook | Polling | OAuth | Media | Streaming |
|---|---|---|---|---|---|
| Slack | Yes | No | Yes | No | Yes |
| Teams | Yes | No | Yes | No | Yes |
| Mattermost | Yes | No | No | No | Yes |
| Discord | Yes | No | Yes | No | Yes |
| Telegram | Yes | No | No | No | Yes |
| WhatsApp Business | Yes | No | No | No | Yes |
| WhatsApp (Baileys) | No | No | No | Yes | Yes |
| Twilio SMS | Yes | No | No | No | Yes |
| No | Yes | No | Yes | Yes | |
| Gmail | No | Yes | Yes | Yes | Yes |
| HTTP Webhook | Yes | No | No | No | Yes |
| Cron | No | No | No | No | Yes |
| Google Workspace | No | Yes | Yes | No | Yes |
| Odoo Events | No | Yes | No | No | Yes |
Identity Resolution
Channels automatically identify users across external platforms and link them to Kaman accounts:
How It Works:
- Each channel resolves the sender's external identity (phone number, email, Slack ID, etc.)
- The platform looks up the external identity in the Auth Service
- If matched, the user inherits their Kaman permissions, credits, and context
- If unmatched, verification flows (Telegram phone verification, email OTP) can link the account
Supported Identity Types:
| Channel | Identity Field |
|---|---|
| Telegram | Phone number, Telegram user ID |
| Phone number | |
| Slack | Slack user ID, email |
| Email/Gmail | Email address |
| Discord | Discord user ID |
| Teams | Azure AD user ID |
Manage Connected Identities: Users can view and manage their linked external accounts from Settings > Connected Identities.
Tool Confirmation Through Channels
When an agent needs to execute a sensitive tool, it can ask for confirmation directly through the channel:
User Responses:
| Response | Effect |
|---|---|
| yes | Approve this one execution |
| no | Deny this execution |
| always | Auto-approve this tool for the session |
Artifact Delivery
Agents can send generated files and artifacts directly through channels:
| Channel | Supported Artifacts |
|---|---|
| Telegram | Documents, images, audio, video |
| Slack | Files via file upload API |
| Discord | File attachments |
| WhatsApp (Baileys) | Documents, images, audio, video |
| Email/Gmail | Email attachments |
| Teams | File attachments |
| Mattermost | File attachments |
| Twilio SMS | Media URLs |
Scheduling & Reminders
Agents can schedule messages and reminders through any channel:
Capabilities:
- One-shot reminders ("remind me in 2 hours")
- Recurring schedules using cron expressions
- Timezone-aware scheduling
- Automatic cleanup of one-shot jobs after execution
Powered by BullMQ: Scheduled jobs are managed through the cron channel system with Redis-backed persistence.
Getting Started
1. Choose Your Channel
Select the channel(s) that match where your users are:
- Internal teams: Slack, Teams, Mattermost
- Customers: WhatsApp, SMS, Email
- Automation: Cron, HTTP Webhook
- Communities: Discord, Telegram
2. Create a Channel Instance
- Go to Channels in the platform
- Select your channel type
- Fill in the configuration fields
- Choose the downstream target (agent or workflow)
- Activate the instance
3. Configure the External Platform
Follow the setup instructions for your channel:
- Create bots/apps in external platforms
- Configure webhook URLs
- Set up OAuth if required
- Test the connection
4. Test and Monitor
- Send a test message
- Check the response
- Monitor in Observatory telemetry
- Adjust configuration as needed
Communication Channels - 14 ways to connect with your AI, with identity resolution and tool confirmation built in