Build a Telegram AI assistant with MemMachine, OpenAI, and voice support
Needs changesWhat this workflow does
This AI workflow has 21 nodes and runs when an MCP client calls one of its tools (plus 1 other trigger). Along the way it connects Telegram, OpenAI, Gmail and Google Sheets and 3 more. It also calls host.docker.internal:8080 over HTTP.
How it runs
Trigger: When an MCP client calls one of its tools (plus 1 other trigger).
- 2. Message Type (Switch): routes items into 2 branches
- 3a. Download Voice (Telegram): work with file
- 3d. Extract Text Data (Edit Fields (Set)): sets 5 fields: text, chat_id, user_id…
- 3b. Transcribe Voice (OpenAI): transcribe (audio)
- Unifier (Code): runs custom JavaScript code
- 3c. Extract Voice Data (Edit Fields (Set)): sets 5 fields: text, chat_id, user_id…
- 4. Store User Query (HTTP Request): calls host.docker.internal:8080 (POST)
- 5. Search Memory (HTTP Request): calls host.docker.internal:8080 (POST)
- 6. Format Memory (Code): runs custom JavaScript code
- 7. AI Agent (AI Agent): runs an AI agent, with model: OpenAI Chat Model; 1 tool (MCP Client)
…plus 4 more steps. See the full node list below.
Services it uses
HTTP calls to: host.docker.internal:8080
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in 7. AI Agent (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace 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)
- Telegram Trigger
n8n-nodes-base.telegramTrigger - Switch
n8n-nodes-base.switch - Telegram
n8n-nodes-base.telegram - OpenAI
@n8n/n8n-nodes-langchain.openAi - Edit Fields (Set)
n8n-nodes-base.set - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - AI Agent
@n8n/n8n-nodes-langchain.agent - MCP Server Trigger
@n8n/n8n-nodes-langchain.mcpTrigger - Gmail Tool
n8n-nodes-base.gmailTool - Google Sheets Tool
n8n-nodes-base.googleSheetsTool - Google Calendar Tool
n8n-nodes-base.googleCalendarTool - MCP Client Tool
@n8n/n8n-nodes-langchain.mcpClientTool - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
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…