Primary operator interface for Matthew and Dr. Rockhead
Telegram is the control channel for operators — not patients. Matthew and Dr. Rockhead receive all system alerts, briefings, and action prompts here. Patients never interact with Telegram; their channel is WhatsApp/IG/widget.
/billing slash commandTELEGRAM_BOT_TOKEN. One bot per tenant in production.TELEGRAM_CHAT_ID.Required environment variables:
TELEGRAM_BOT_TOKEN — bot authentication token from BotFatherTELEGRAM_CHAT_ID — staff group or private chat ID for proactive alerts and briefingsTelegram is the operator notification and control surface for these journeys:
src/telegram.js — Bot wiring, slash command registration (/voice, /billing, etc.). Key exports: startTelegramBot(), sendNotification(). Note: sendNotification is lazy-required in other modules to avoid circular dependencies.src/telegram_message.js — Handles all inbound text and media messages from operators. Entry: handleTelegramMessage() at line 26. Dispatches to AI or direct action handlers.src/telegram_callbacks.js — Inline button callback handler for core flows: onboarding, voice setup, storyboard, ad education. Entry: handleCallbackQuery().src/telegram_callbacks_content.js — Inline button callbacks for content/campaign/Blotato/pipeline flows. Entry: handleContentCallback().src/telegram_media.js — Processes document, voice note, photo, and video uploads sent by operators. Key exports: handleDocument(), handleVoice(), sendResponse().src/telegram_actions/ — Action dispatcher directory. Seven domain handler files: voice_calendar.js, social_content.js, system_admin.js, media.js, care_analytics.js, crm_team.js, settings_links.js. Unified entry via index.js → executeAction().