Templates / Build a Telegram AI assistant with MemMachine, OpenAI, and voice support

Build a Telegram AI assistant with MemMachine, OpenAI, and voice support

Needs changes

by David Olusola ✓ · 494 views · created 2026-01-08 · Personal Productivity, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What to replace before upgrading

Removed in 3.0Replace with
AI Agent v1 (old agent modes)
7. AI Agent (v1.7)
Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.

Nodes used (14)

TelegramOpenAIAI AgentGmailGoogle SheetsGoogle CalendarMCP ClientOpenAI Chat Model

What it does

Build a Telegram assistant with MemMachine and voice support An AI assistant that NEVER forgets using MemMachine for persistent cross-session memory, with voice transcription support and productivity tools. ⚠️ Important Deployment Note: This workflow is designed for self-hosted n8n instances. If you're using n8n Cloud, you'll need to deploy MemMachine to a cloud server and update the HTTP Request URLs in nodes 4, 5, and 9. What This Template Does This workflow creates an intelligent personal assistant that maintains perfect memory across all conversations, whether you message today or weeks from now. It supports both text and voice messages, automatically transcribes voice using OpenAI Whisper, and provides tools for Gmail, Google Sheets, and Google Calendar. Key Features - 🧠 Perfect Memory - Remembers every conversation using MemMachine - 🎤 Voice Transcription - Supports voice messages via OpenAI Whisper - 📧 Gmail Integration - Send and read emails - 📊 Google Sheets - Read and write spreadsheet data - 📅 Google Calendar - Create and manage events - 🔧 MCP Tools - Extensible tool architecture - 💬 Smart Context - References past conversations naturally Real-World Example Day 1 - Text Message: - User: "Send an email to [email protected] about the Q1 report" - AI: Uses Gmail tool "Email sent to John about the Q1 report!" Day 3 - Voice Message: - 🎤 User: "What did I ask you to do for John?" - AI: "On January 5th, you asked me to email John about the Q1 report, which I sent." Day 7 - Text Message: - User: "Follow up with John" - AI: "I'll send a follow-up email to [email protected] about the Q1 report that we discussed on Jan 5th." The AI remembers who John is, what you discussed, and when it happened - all without you having to repeat yourself! How It Works Message Flow For Text Messages: 1. Telegram Trigger receives message 2. Extract user data and message text 3. Store message in MemMachine 4. Search conversation history (last 30 memories) 5. AI processes with full context + tools 6. Store AI response for future reference 7. Send reply to user For Voice Messages: 1. Telegram Trigger receives voice message 2. Download voice file 3. OpenAI Whisper transcribes to text 4. Extract transcribed text and user data 5. Store in MemMachine (same as text flow) 6. Process with AI + tools 7. Send reply to user Requirements Services & Credentials - MemMachine - Open-source memory system (self-hosted via Docker) - Telegram Bot Token - From @BotFather - OpenAI API Key - For AI responses and voice transcription - Gmail OAuth - For email integration (optional) - Google Sheets OAuth - For spreadsheet access (optional) - Google Calendar OAuth - For calendar management (optional) Installation MemMachine Setup bash Clone and start MemMachine git clone https://github.com/MemMachine/MemMachine cd MemMachine docker-compose up -d Verify it's running curl http://localhost:8080/health Workflow Configuration Deployment Options This workflow supports two deployment scenarios: Option 1: Self-Hosted n8n (Recommended) - Both n8n and MemMachine run locally - Best for: Personal use, development, testing - Setup: 1. Run MemMachine: docker-compose up -d 2. Use http://host.docker.internal:8080 in HTTP Request nodes (if n8n in Docker) 3. Or use http://localhost:8080 (if n8n installed directly) Option 2: n8n Cloud - n8n hosted by n8n.io, MemMachine on your cloud server - Best for: Production, team collaboration - Setup: 1. Deploy MemMachine to cloud (DigitalOcean, AWS, GCP, etc.) 2. Expose MemMachine via HTTPS with SSL certificate 3. Update HTTP Request URLs in nodes 4, 5, 9 to: https://your-memmachine-domain.com 4. Ensure firewall allows n8n Cloud IP addresses Configuration Steps 1. Import this template into your n8n instance 2. Update MemMachine URLs (nodes 4, 5, 9): - Self-hosted n8n in Docker: http://host.docker.internal:8080 - Self-hosted n8n (direct install): http://localhost:8080 - n8n Cloud: https://your-memmachine-domain.com 3. Set Organization IDs (nodes

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.