Skip to content

goqorhopar/-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meeting Bot - AI-Powered Sales Meeting Assistant

Node.js Gemini AI Telegram Docker License

📋 Overview

Meeting Bot is a production-ready, AI-powered assistant that automatically joins online meetings, records audio, transcribes conversations using Google Gemini AI, analyzes sales calls against a 12-point checklist, and updates CRM leads in Bitrix24.

Key Features

  • 🎙️ Automatic Meeting Recording - Joins meetings via headless browser and captures audio
  • 📝 AI Transcription - Converts speech to text using Google Gemini AI
  • 📊 Sales Analysis - Evaluates calls against a comprehensive 12-point sales checklist
  • 🔔 Telegram Integration - Control the bot and receive reports via Telegram
  • 🔄 Bitrix24 CRM Sync - Automatically updates lead records with analysis results
  • 🐳 Docker Ready - Fully containerized for easy deployment
  • 📈 Production Grade - Logging, health checks, error handling, and monitoring

🏗️ Architecture

┌─────────────┐     ┌──────────────┐     ┌─────────────┐
│  Telegram   │────▶│   Express    │────▶│   Gemini    │
│    Bot      │     │     API      │     │     AI      │
└─────────────┘     └──────────────┘     └─────────────┘
                           │
                           ▼
                    ┌──────────────┐     ┌─────────────┐
                    │   Puppeteer  │────▶│  Bitrix24   │
                    │   (Browser)  │     │     CRM     │
                    └──────────────┘     └─────────────┘
                           │
                           ▼
                    ┌──────────────┐
                    │   Recording  │
                    │   (WAV/FFmpeg)│
                    └──────────────┘

🚀 Quick Start

Prerequisites

  • Node.js 18+ or Docker
  • Google Gemini API key
  • Bitrix24 webhook URL (optional)
  • Telegram Bot token (optional)

Option 1: Docker (Recommended)

# Clone repository
git clone https://github.com/your-org/meeting-bot.git
cd meeting-bot

# Copy environment file
cp .env.example .env

# Edit .env with your credentials
nano .env

# Start with Docker Compose
docker-compose up -d

# Check logs
docker-compose logs -f

Option 2: Local Development

# Install dependencies
npm install

# Copy environment file
cp .env.example .env

# Edit .env with your credentials
# Required: GEMINI_API_KEY
# Optional: BITRIX_BASE_URL, TELEGRAM_BOT_TOKEN, ADMIN_CHAT_ID

# Start development server
npm run dev

# Or production server
npm start

Server will start on http://localhost:3000


⚙️ Configuration

Environment Variables

Variable Required Description Example
PORT No Server port 3000
NODE_ENV No Environment mode production
LOG_LEVEL No Logging level info, debug, error
GEMINI_API_KEY Yes Google Gemini API key AIza...
BITRIX_BASE_URL No Bitrix24 REST API URL https://domain.bitrix24.ru/rest/webhook/
TELEGRAM_BOT_TOKEN No Telegram bot token 123456:ABC-DEF...
ADMIN_CHAT_ID No Admin Telegram chat ID -1001234567890
REC_DIR No Recording output directory /tmp/recordings
REC_MAX_SECONDS No Max recording duration 3600
CHROME_BIN No Chrome/Chromium binary path /usr/bin/google-chrome-stable

Getting API Keys

Google Gemini API

  1. Visit Google AI Studio
  2. Create an API key
  3. Add to .env as GEMINI_API_KEY

Bitrix24 Webhook

  1. Go to your Bitrix24 portal
  2. Navigate to MarketplaceWebhooks
  3. Create an incoming webhook with permissions: CRM
  4. Copy the URL to .env as BITRIX_BASE_URL

Telegram Bot

  1. Message @BotFather on Telegram
  2. Send /newbot and follow instructions
  3. Copy the token to .env as TELEGRAM_BOT_TOKEN

📡 API Endpoints

Health Check

GET /health
# Response: ok

Join Meeting (Full Flow)

POST /join
Content-Type: application/json

{
  "meetingUrl": "https://meet.google.com/abc-defg-hij",
  "leadId": "12345"
}

# Response:
{
  "ok": true,
  "leadId": "12345",
  "transcriptChars": 5432,
  "analysis": {
    "overallScore": 85,
    "category": "B",
    "summary": "...",
    "points": { ... }
  }
}

Analyze Transcript Only

POST /analyze
Content-Type: application/json

{
  "transcript": "Full meeting transcript text..."
}

# Response:
{
  "success": true,
  "report": {
    "overallScore": 85,
    "category": "B",
    "points": { ... },
    "summary": "..."
  }
}

🤖 Telegram Bot Commands

Command Description
/start Welcome message and help
/process Start meeting analysis flow
/analyze Analyze a transcript directly
/status Check bot status

Usage Flow

  1. Send /process to start
  2. Bot asks for meeting URL
  3. Send the URL
  4. Bot asks for Bitrix Lead ID
  5. Send the Lead ID
  6. Bot processes and returns analysis

Or use /analyze to analyze existing transcripts:

  1. Send /analyze
  2. Paste the transcript text
  3. Receive structured analysis report

📊 Sales Analysis Checklist

The bot evaluates meetings against 12 criteria:

  1. Business Analysis - Understanding client's current business state
  2. Pain Points Discovery - Identifying problems and needs
  3. Objection Handling - How objections were addressed
  4. Lead Generation Model Reaction - Client's response to the approach
  5. Service Interest - Specific aspects that interested the client
  6. Opportunities Found - Potential value propositions identified
  7. Manager Mistakes - Errors made during the call
  8. Path to Close - Progress toward closing the deal
  9. Conversation Tone - Overall atmosphere
  10. Dialogue Control - Who dominated the conversation
  11. Recommendations - Specific improvement suggestions
  12. Client Category - A (hot), B (warm), C (cold) classification

🧪 Testing

# Run tests (when implemented)
npm test

# Test health endpoint
curl http://localhost:3000/health

# Test join endpoint
curl -X POST http://localhost:3000/join \
  -H "Content-Type: application/json" \
  -d '{"meetingUrl": "https://example.com/meeting", "leadId": "123"}'

📁 Project Structure

meeting-bot/
├── src/
│   ├── index.js          # Main entry point & Express server
│   ├── config.js         # Configuration management
│   ├── browser.js        # Puppeteer browser automation
│   ├── recording.js      # Audio recording utilities
│   ├── transcribe.js     # Speech-to-text via Gemini
│   ├── gemini.js         # AI analysis & checklist
│   ├── bitrix.js         # Bitrix24 CRM integration
│   └── telegram.js       # Telegram bot handler
├── .env.example          # Environment template
├── .gitignore
├── Dockerfile
├── docker-compose.yml
├── package.json
└── README.md

🔒 Security Considerations

  • Environment Variables: Never commit .env files
  • API Keys: Store securely, rotate regularly
  • Rate Limiting: Implement for production use
  • Input Validation: All inputs are validated
  • HTTPS: Use reverse proxy (nginx) in production
  • Access Control: Restrict API access in production

🚨 Troubleshooting

Browser Launch Fails

# Ensure Chromium is installed
which chromium-browser || which google-chrome-stable

# Update CHROME_BIN in .env
CHROME_BIN=/usr/bin/chromium-browser

Recording Issues

# Check PulseAudio is running
pulseaudio --check

# Install audio tools
apt-get install ffmpeg sox pulseaudio-utils

Gemini API Errors

  • Verify API key is valid
  • Check quota limits in Google Cloud Console
  • Ensure transcript isn't too large (>1MB)

Bitrix24 Connection Failed

  • Verify webhook URL is correct
  • Check webhook permissions include CRM
  • Test URL in browser: {webhook_url}/crm.lead.get.json

📈 Performance Optimization

  • Concurrent Meetings: Queue system for multiple simultaneous meetings
  • Caching: Cache Gemini responses for similar transcripts
  • Database: Add PostgreSQL/MongoDB for persistence
  • Redis: Session management and rate limiting
  • CDN: Serve static assets via CDN

🛣️ Roadmap

  • Multi-platform meeting support (Zoom, Teams, etc.)
  • Real-time transcription streaming
  • Sentiment analysis
  • Action items extraction
  • Follow-up email generation
  • Calendar integration
  • Multi-language support
  • Custom checklists
  • Analytics dashboard

📄 License

MIT License - see LICENSE file for details.


🤝 Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

📞 Support


Made with ❤️ by your team

About

Бот-ассистент встреч: запись, транскрипция, анализ Gemini, Bitrix24

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors