This workflow receives Telegram messages via a webhook, routes them by type (text, audio, image), and processes text through a LangChain AI agent that uses DeepSeek models and a long-term memory stored in Google Docs. It replies to users on Telegram and can save or retrieve summarized memories to maintain context across sessions.
What You Can Do
- Receive Telegram updates via a webhook and validate the sender
- Route incoming messages by type (text, voice, image) and process text messages with an AI agent
- Retrieve long-term memories from Google Docs and provide context-aware replies
- Save notable user information back to Google Docs as long-term memory using an AI tool
- Use DeepSeek models (OpenAI-compatible) as the language model
Quick Start
- Import this workflow to n8n
- Configure your credentials for Telegram, Google Docs, and OpenAI/DeepSeek (set API keys to ‘YOUR_API_KEY’)
- Update the webhook path to your public URL and activate the workflow
- Test by sending messages to your Telegram bot and verify memory retrieval and saving




