Meet Your New AI Record Label on Telegram! This bot connects musicians with Recoup's AI-powered music industry assistant directly through Telegram.
This Telegram bot gives you your own personal instance of the Recoup AI, powered by the Recoup Chat API. The AI has access to real music industry data and tools to help you:
- Spotify Integration - Search artists, get album data, track top songs
- Streaming Insights - Analyze play counts and listener demographics
- Catalog Management - Access and organize your song catalogs
- Instagram Analytics - Profile insights, comment analysis, engagement metrics
- X/Twitter Trends - Track trending topics, search conversations
- Multi-Platform Posts - Retrieve and analyze posts across social networks
- Fan Segmentation - Identify and categorize your fanbase
- Audience Insights - Understand listener demographics and behaviors
- Comment Management - Track and respond to fan interactions
- Image Generation - Create promotional artwork and visuals
- Content Strategy - Get personalized marketing recommendations
- Industry Insights - Real-time music industry trends and data
- Artist Analytics - Comprehensive artist profile data and socials
- Release Planning - Strategic guidance for launches
- Marketing Automation - AI-powered promotional strategies
Before setting up your own bot, try the official Recoup AI bot: π @recoup_ai_bot
- Node.js 18+ installed on your machine
- A Telegram Bot Token (get one from @BotFather)
- Recoup API Credentials (https://recoupable.com)
- Open Telegram and message @BotFather
- Send
/newbotand follow the instructions - Choose a name and username for your bot
- Save the bot token you receive - you'll need it!
# Clone this repository
git clone https://github.com/Recoupable-com/Recoup-Telegram-Bot.git
cd Recoup-Telegram-Bot
# Install dependencies
npm installCreate a .env file in the project root:
# Your Telegram Bot Token from @BotFather
TELEGRAM_BOT_TOKEN=your_telegram_bot_token_here
# Recoup API Credentials (contact Recoup for these)
RECOUP_ACCOUNT_ID=your_account_id
RECOUP_ARTIST_ID=your_artist_id
RECOUP_ROOM_ID=your_room_idNote: visit Recoup to get your API credentials (
RECOUP_ACCOUNT_ID,RECOUP_ARTIST_ID, andRECOUP_ROOM_ID).
# Start the bot
npm startThat's it! Your bot is now running. Find it on Telegram and start chatting! π
Recoup-Telegram-Bot/
βββ bot.js # Main entry point
βββ lib/
β βββ const.js # Application constants
β βββ checkEnvVariables.js # Environment validation
β βββ handleMessage.js # Message orchestration
β βββ recoup/
β β βββ generateChatResponse.js # Recoup API client
β βββ telegram/
β βββ splitMessage.js # Telegram utilities
βββ .env # Your environment variables (create this)
βββ package.json # Dependencies
βββ README.md # This file
| Variable | Required | Description |
|---|---|---|
TELEGRAM_BOT_TOKEN |
β Yes | Your bot token from @BotFather |
RECOUP_ACCOUNT_ID |
β Yes | Your Recoup account ID |
RECOUP_ARTIST_ID |
β Yes | Your artist ID in Recoup |
RECOUP_ROOM_ID |
β No | Chat room ID (optional, for conversation history) |
For production deployment, this bot uses PM2 for process management:
# Install PM2 globally
npm install -g pm2
# Start the bot with PM2
pm2 start ecosystem.config.cjs
# View logs
pm2 logs recoup-telegram-bot
# Restart the bot
pm2 restart recoup-telegram-bot
# Stop the bot
pm2 stop recoup-telegram-botThe bot automatically restarts every 12 hours to ensure optimal performance.
This repository includes a GitHub Actions workflow for automated deployment to DigitalOcean. See .github/workflows/deploy.yaml for details.
This bot uses the Recoup Chat API which gives the AI access to multiple music industry data sources and tools.
The AI can automatically use these tools when you ask questions:
Music Platforms:
- π΅ Spotify - Search, albums, top tracks, artist data
- πΌ Music Catalogs - Song management and organization
Social Media:
- πΈ Instagram - Profiles, posts, comments, engagement
- π¦ X/Twitter - Search, trends, sentiment analysis
- π± Social Posts - Cross-platform content analysis
Audience & Fans:
- π₯ Fan Segments - Audience categorization and insights
- π¬ Comments - Track and analyze fan interactions across platforms
Content Creation:
- π¨ Image Generation - AI-powered promotional artwork
- π Artist Analytics - Comprehensive performance metrics
For complete API documentation, visit: docs.recoupable.com
- β Handles long messages (auto-splits messages over Telegram's 4096 character limit)
- β Stateless design (conversation history managed by Recoup API)
- β ES Modules for modern JavaScript
- β Modular architecture following SOLID principles
- β Production-ready with PM2 process management
This bot is designed specifically for musicians and music industry professionals. Unlike generic AI assistants, Recoup AI has direct access to:
- Live Spotify, Instagram, and X/Twitter data
- Your actual streaming numbers and social metrics
- Real-time industry trends and insights
- Fan segmentation and audience analysis
- AI image generation for promo materials
- Multi-platform social media intelligence
- Catalog and release management
The AI is trained on music industry knowledge and has access to the Recoup API suite, giving you insights powered by real data from streaming platforms, social networks, and fan engagement metrics.
Example questions you can ask:
- "What are the trending topics on X/Twitter related to my genre?"
- "Analyze my Spotify listener demographics"
- "Generate promotional images for my next release"
- "Show me engagement metrics from my latest Instagram posts"
- "Help me segment my fanbase for targeted marketing"
npm startThe codebase follows the Single Responsibility Principle with clear separation of concerns:
bot.js- Entry point and configurationlib/checkEnvVariables.js- Environment validationlib/handleMessage.js- Message handling orchestrationlib/recoup/generateChatResponse.js- Recoup API integrationlib/telegram/splitMessage.js- Telegram message utilitieslib/const.js- Centralized constants
MIT License - see LICENSE file for details.
Copyright (c) 2025 sweetman.eth
- π Recoup Website
- π€ Official Recoup AI Bot
- π Recoup API Documentation
- π¬ Create Your Own Telegram Bot
Need help?
- Try the official Recoup AI bot first
- Check the API documentation
- Contact Recoup for API access
Made with β€οΈ by sweetman.eth for the music community