Learn how to distribute your AI agent across multiple platforms: Web, Telegram, Discord, and Slack.
What is Multi-Channel Distribution?
Multi-channel distribution means your agent can interact with users on different platforms:
- Web: Built-in chat interface at
app.flutch.ai - Telegram: Bot integration for messaging app
- Discord: Bot for community servers
- Slack: Integration for workplace communication (coming soon)
Key benefit: Write your agent logic once, deploy everywhere. Users choose their preferred platform.
Accessing Distribution Settings
- Log in to console.flutch.ai
- Navigate to Agents → Select your agent
- Go to Settings → Distribution section
URL: https://console.flutch.ai/agents/{agentId}/settings
Channel Overview
Web (Always Enabled)
Status: ✅ Always active (cannot be disabled)
What you get:
- Public chat URL:
https://app.flutch.ai/a/{agentId} - Embeddable widget for your website
- Mobile-responsive interface
- Conversation persistence
- Streaming responses
Use cases:
- Primary user interface
- Embedding on your website
- Sharing with testers
- Public demos
No configuration needed - works immediately after deployment.
Telegram Bot
Status: ⚠️ Requires bot token
What you get:
- Users interact via Telegram app
- Push notifications
- Mobile + desktop support
- Group chat support (optional)
- Conversation context preserved
Use cases:
- Customer support via messaging
- Personal assistant bots
- Community engagement
- Automated notifications
Discord Bot
Status: ⚠️ Requires bot token and webhook
What you get:
- Bot presence in Discord servers
- Channel-specific conversations
- Role-based access control (via Discord)
- Rich embeds and reactions
- Multi-server deployment
Use cases:
- Community support servers
- Gaming communities
- Developer communities
- Team collaboration
Slack Integration
Status: 🚧 Coming soon
What you'll get:
- Workplace assistant
- Channel integration
- Direct messages
- Slash commands
- Enterprise SSO support
Use cases:
- Internal company assistant
- HR/IT support bot
- Workflow automation
- Knowledge base access
Setting Up Telegram Bot
Step 1: Create Telegram Bot
- Open Telegram and find @BotFather
- Send
/newbotcommand - Follow prompts:
BotFather: Alright, a new bot. How are we going to call it? You: My Awesome Agent BotFather: Good. Now let's choose a username for your bot. You: my_awesome_agent_bot BotFather: Done! Here's your token: 123456789:ABCdefGHIjklMNOpqrsTUVwxyz - Copy the token (you'll need it in next step)
Step 2: Configure in Flutch
- Go to agent settings in console.flutch.ai
- Find Telegram Bot section
- Click Enable Telegram
- Paste your bot token
- Click Save
Flutch automatically:
- Configures webhook:
https://app.flutch.ai/api/public/tg/webhook/{agentId} - Registers it with Telegram
- Starts listening for messages
Step 3: Test Your Bot
- Find your bot in Telegram (search for username you created)
- Click Start
- Send a message
- Bot responds using your agent logic
Example conversation:
bashYou: Hello! Bot: Hi! I'm your AI assistant. How can I help you today? You: What can you do? Bot: I can help with [your agent's capabilities]. What would you like to know?
Telegram Bot Settings (Optional)
Configure bot behavior via BotFather:
bash/setdescription - Set bot description (shown in chat) /setabouttext - Set about text (shown in bot profile) /setuserpic - Set bot profile picture /setcommands - Set bot commands menu
Example commands:
bash/setcommands start - Start conversation help - Show available commands reset - Start new conversation
Setting Up Discord Bot
Step 1: Create Discord Application
- Go to Discord Developer Portal
- Click New Application
- Enter application name: "My Awesome Agent"
- Navigate to Bot section
- Click Add Bot
- Copy Bot Token (click "Reset Token" if needed)
Step 2: Configure Bot Permissions
- In Discord Developer Portal → Bot section
- Enable required intents:
- ✅ Server Members Intent (read members)
- ✅ Message Content Intent (read messages)
- In OAuth2 → URL Generator:
- Scopes:
bot - Permissions:
Send Messages,Read Message History,Embed Links
- Scopes:
- Copy generated URL
Step 3: Invite Bot to Server
- Paste OAuth2 URL in browser
- Select server (you must have "Manage Server" permission)
- Authorize bot
- Bot appears in server member list (offline until configured)
Step 4: Configure in Flutch
- Go to agent settings in console.flutch.ai
- Find Discord Bot section
- Click Enable Discord
- Paste your bot token
- Webhook URL is shown:
https://app.flutch.ai/api/public/discord/webhook/{agentId} - Click Save
Bot comes online in your Discord server!
Step 5: Test Your Bot
Option A: Direct Message
- Find bot in server member list
- Right-click → Message
- Send a message
- Bot responds
Option B: Channel Mention
- In any channel, mention bot:
@MyBot hello - Bot responds in same channel
Example conversation:
bashYou: @MyBot what's the weather like? MyBot: I don't have access to weather information, but I can help with [your agent's capabilities]. What would you like to know?
Discord Bot Behavior
When bot responds:
- Direct mentions:
@MyBot message - Direct messages (DMs)
- Replies to bot's messages
When bot ignores:
- Regular channel messages without mention
- Messages from other bots
- System messages
Thread support:
- Conversations in DMs maintain context
- Channel conversations use Discord thread as context
- Each thread = separate conversation
Setting Up Slack (Manual)
Note: Slack integration is in beta. Configuration requires manual webhook setup.
Step 1: Create Slack App
- Go to Slack API
- Click Create New App → From scratch
- Enter app name: "My Awesome Agent"
- Select workspace
- Click Create App
Step 2: Configure Bot Token
- In app settings → OAuth & Permissions
- Add scopes:
chat:write- Send messageschat:write.public- Send to public channelsim:history- Read DMsim:read- List DMs
- Click Install to Workspace
- Copy Bot User OAuth Token (starts with
xoxb-)
Step 3: Set Up Event Subscriptions
- In app settings → Event Subscriptions
- Enable events
- Request URL:
https://app.flutch.ai/api/public/slack/webhook/{agentId} - Subscribe to bot events:
message.im- Direct messagesapp_mention- When bot is mentioned
- Save changes
Step 4: Configure in Flutch
- Go to agent settings in console.flutch.ai
- Find Slack Integration section
- Click Enable Slack
- Paste Bot User OAuth Token
- Verify webhook URL matches Event Subscriptions URL
- Click Save
Step 5: Test Your Bot
- Open Slack workspace
- Find bot in Apps section
- Send direct message
- Or mention in channel:
@MyBot hello
Embedded Web Widget
Want to embed chat on your own website?
Step 1: Get Embed Code
- Go to agent settings
- Web section → Embed Widget
- Copy embed code:
html<script src="https://app.flutch.ai/embed.js"></script> <script> FlutchChat.init({ agentId: 'your-agent-id', position: 'bottom-right', // or 'bottom-left' theme: 'light', // or 'dark' primaryColor: '#0066FF' }); </script>
Step 2: Add to Your Website
Paste before closing </body> tag:
html<!DOCTYPE html> <html> <head> <title>My Website</title> </head> <body> <script src="https://app.flutch.ai/embed.js"></script> <script> FlutchChat.init({ agentId: 'abc123', position: 'bottom-right', theme: 'light', primaryColor: '#0066FF' }); </script> </body> </html>
Step 3: Customize Appearance
Widget options:
javascriptFlutchChat.init({ agentId: 'abc123', // Position position: 'bottom-right', // 'bottom-left', 'top-right', 'top-left' // Theme theme: 'light', // 'dark', 'auto' primaryColor: '#0066FF', // Behavior autoOpen: false, // Auto-open on page load greeting: "Hi! How can I help?", // First message // Size width: '400px', height: '600px', // Advanced allowFileUpload: true, showTimestamps: true, enableNotifications: true });
Widget API
Control widget programmatically:
javascript// Open chat FlutchChat.open(); // Close chat FlutchChat.close(); // Send message programmatically FlutchChat.sendMessage("Hello from website!"); // Listen for events FlutchChat.on('message', (message) => { console.log('User sent:', message); }); FlutchChat.on('response', (response) => { console.log('Agent responded:', response); });
Managing Multiple Channels
Viewing Active Channels
Dashboard shows all enabled channels:
bash✅ Web Active app.flutch.ai/a/abc123 ✅ Telegram Active @my_awesome_agent_bot ✅ Discord Active MyBot#1234 ⚪ Slack Disabled -
Channel-Specific Settings
Each channel can have separate configuration:
Per-channel settings:
- Enable/disable channel
- Rate limiting
- Access control (coming soon)
- Custom prompts (coming soon)
Unified Conversation History
All conversations from all channels are stored together:
- View in Message Audit
- Same thread can span multiple channels (if user provides ID)
- Analytics aggregate across channels
Monitoring Usage by Channel
Analytics dashboard shows:
- Messages per channel
- Most active channel
- Channel-specific costs
- User distribution across channels
Example:
bashChannel Usage (Last 7 Days): - Web: 1,245 messages (45%) - Telegram: 980 messages (35%) - Discord: 550 messages (20%) - Slack: 0 messages (0%) Total: 2,775 messages
Security & Access Control
Bot Token Security
Important rules:
- ✅ Never commit bot tokens to git
- ✅ Store tokens securely in Flutch settings
- ✅ Rotate tokens if compromised
- ❌ Don't share tokens publicly
- ❌ Don't hardcode tokens in code
If token is compromised:
- Regenerate token in platform (BotFather/Discord/Slack)
- Update token in Flutch settings immediately
- Check Message Audit for suspicious activity
Rate Limiting
Protect your agent from abuse:
Global limits:
- 60 messages per minute per user
- 1000 messages per hour per channel
- Automatic backoff for violations
Configure in settings:
bashRate Limits: - Messages per minute: 60 - Messages per hour: 1000 - Backoff duration: 60 seconds
Channel-Specific Access
Telegram:
- Public bots: Anyone can start conversation
- Private bots: Share link, user must click Start
- Group bots: Admin adds bot to group
Discord:
- Server-level: Bot must be invited by admin
- Channel-level: Permissions control where bot responds
- Role-based: Use Discord roles for access control
Slack:
- Workspace-level: Admin installs app
- Channel-level: Invite bot to specific channels
- Enterprise: SSO integration (coming soon)
Troubleshooting
Telegram Bot Not Responding
Check:
- Bot token is correct
- Webhook is configured (automatic in Flutch)
- Bot is not blocked by user
- Agent is deployed and active
Test webhook:
bashcurl https://app.flutch.ai/api/public/tg/webhook/{agentId} # Should return: {"status": "ok"}
Check logs:
bashflutch logs <agent-id> --grep "telegram"
Discord Bot Offline
Check:
- Bot token is correct and not expired
- Message Content Intent is enabled
- Bot has permissions in channel
- Agent is deployed and active
Test bot:
- Send DM to bot
- Check Message Audit for message
- Check logs for errors
Webhook Not Working
Common issues:
-
Webhook URL wrong:
- Copy exactly from Flutch settings
- Format:
https://app.flutch.ai/api/public/{platform}/webhook/{agentId}
-
SSL certificate issues:
- Webhooks require HTTPS
- Flutch handles this automatically
-
Firewall blocking:
- Ensure platform can reach Flutch servers
- Check platform status page
Widget Not Showing
Check:
- Embed script is loaded before init
- Agent ID is correct
- No JavaScript errors in console
- Website allows iframes (CSP policy)
Debug in browser console:
javascript// Check if FlutchChat is loaded console.log(FlutchChat); // Check initialization FlutchChat.debug = true; FlutchChat.init({ agentId: 'abc123' });
Best Practices
1. Start with Web, Add Channels Gradually
- Deploy to web first, ensure it works
- Add one channel at a time
- Test thoroughly before adding next channel
2. Use Channel-Appropriate Language
Consider platform culture:
- Telegram: More casual, emoji-friendly
- Discord: Gaming/community terminology
- Slack: Professional, workplace language
Configure different system prompts per channel (coming soon).
3. Monitor Channel-Specific Issues
Some issues are channel-specific:
- Telegram: Formatting (Markdown syntax)
- Discord: Mentions and embeds
- Web: Mobile responsiveness
4. Set Clear Expectations
Tell users what your bot can do:
- Use bot description (Telegram/Discord)
- Welcome message on first interaction
- Help command explaining capabilities
5. Handle Rate Limits Gracefully
When rate limited:
- Don't ignore messages silently
- Send clear message: "Too many requests, try again in 60s"
- Log rate limit hits for analysis
6. Keep Tokens Secure
- Store in Flutch settings, not in code
- Use environment variables for local testing
- Rotate periodically
- Audit token usage
Analytics by Channel
Track performance per channel:
Metrics available:
- Messages per channel
- Response time by channel
- Token usage by channel
- User satisfaction by channel (if using feedback)
- Error rate by channel
Use insights to:
- Prioritize channels with most usage
- Identify channel-specific issues
- Optimize for each platform
- Allocate resources effectively
Next Steps
- Monitor Performance: Measures & Analytics to track channel usage
- Debug Issues: Debugging Guide for channel-specific problems
- Configure Agent: Agent Settings to optimize for each channel
Tip: Start with web only, ensure your agent works perfectly, then expand to other channels!
Screenshots Needed
TODO: Add screenshots for:
- Distribution settings page
- Telegram bot configuration
- Discord bot setup
- Web widget customization
- Channel usage analytics