DeepSeek AI Agent for Telegram with Long-Term Memory
detail.loadingPreview
An n8n workflow that leverages DeepSeek AI for intelligent responses on Telegram, incorporating long-term memory via Google Docs and user validation.
About This Workflow
This n8n workflow, named '🐋🤖 DeepSeek AI Agent + Telegram + LONG TERM Memory 🧠', is designed to create an interactive Telegram bot powered by the DeepSeek AI. It's built to handle incoming Telegram messages, validate users, route different message types (text, audio, image), and generate intelligent responses using DeepSeek's language models. A key feature is its ability to maintain long-term memory by saving user interactions and preferences to a Google Doc, which are then retrieved to provide personalized and contextually aware replies. The workflow also includes error handling for message processing.
Key Features
- Telegram Integration: Receives messages via webhook and sends responses back to Telegram.
- User Validation: Implements a check to ensure only authorized users can interact with the bot.
- Message Routing: Differentiates between text, audio, and image messages for appropriate handling.
- DeepSeek AI Integration: Utilizes DeepSeek's reasoning and chat models (
deepseek-reasoner,deepseek-chat) for generating AI responses. - Long-Term Memory: Stores conversational history and user preferences in a Google Doc.
- Contextual Awareness: Retrieves past memories to provide personalized and relevant responses.
- Error Handling: Includes nodes for sending error messages if processing fails.
How To Use
- Set up Telegram Bot: Configure a Telegram bot via BotFather and obtain the API token.
- Configure Webhook: Use the
Listen for Telegram Eventsnode (webhook) and ensure the webhook URL is correctly set in Telegram's BotFather settings. - Configure AI Credentials: Set up the
openAiApicredentials for DeepSeek, ensuring the correct API key and base URL (https://api.deepseek.com) are provided. - Configure Google Docs Credentials: Set up
googleDocsOAuth2Apicredentials to allow the workflow to read from and write to a Google Doc. - Specify Google Doc ID: Replace
[Google Doc ID]in theRetrieve Long Term MemoriesandSave Long Term Memoriesnodes with the actual ID of your Google Doc. - Configure User Validation: In the
Validationnode, set thefirst_name,last_name, andidto match the expected user for testing or initial setup. - Activate Workflow: Enable the workflow to start processing incoming Telegram messages.
Apps Used
Workflow JSON
{
"id": "c1102079-db52-48db-9cf4-c3191beaae42",
"name": "DeepSeek AI Agent for Telegram with Long-Term Memory",
"nodes": 8,
"category": "AI",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: c1102079-db52...
About the Author
N8N_Community_Pick
Curator
Hand-picked high quality workflows from the global community.
Statistics
Related Workflows
Discover more workflows you might like
DeepSeek AI Agent with Telegram and Long-Term Memory
A Telegram bot powered by DeepSeek AI that leverages long-term memory for personalized conversations and information storage.
AI-Powered Slack Bot for Automation Support
A workflow that receives messages via Slack webhook, processes them using an AI agent (Google Gemini) with conversational memory, and sends a response back to Slack.
Build an AI Documentation Expert Chatbot with Gemini RAG
This n8n workflow automates the creation of an AI-powered expert chatbot capable of answering questions based on your documentation. It intelligently ingests, cleans, and processes your knowledge base, preparing it for a Retrieval Augmented Generation (RAG) pipeline with Google Gemini.