DeepSeek AI Agent with Telegram and Long-Term Memory
detail.loadingPreview
A Telegram bot powered by DeepSeek AI that leverages long-term memory for personalized conversations and information storage.
About This Workflow
This n8n workflow sets up a Telegram bot that interacts with users using the DeepSeek AI model. It includes robust user validation, message routing for different message types (text, audio, image), and the ability to store and retrieve long-term memories using Google Docs. The AI is configured with specific roles, rules, and tools to ensure personalized and context-aware interactions.
Key Features
- Telegram Integration: Receives messages via webhook and sends responses back to Telegram.
- DeepSeek AI Agent: Utilizes DeepSeek AI models (DeepSeek-V3 Chat and DeepSeek-R1 Reasoning) for natural language understanding and generation.
- User Validation: Checks user ID and credentials before processing messages.
- Message Routing: Distinguishes between text, audio, and image messages.
- Long-Term Memory: Stores and retrieves user-specific information and conversation history using Google Docs.
- Contextual AI: AI system prompt includes user's first name, memory retrieval, and defined roles/rules for personalized responses.
- Error Handling: Provides error messages for both invalid users and processing failures.
How To Use
- Set up Telegram Bot: Obtain a token from BotFather and configure the
Listen for Telegram Eventswebhook node. - Configure AI Credentials: Set up and select your DeepSeek AI credentials for the
DeepSeek-R1 ReasoningandDeepSeek-V3 Chatnodes. - Google Docs Integration: Replace
[Google Doc ID]inSave Long Term MemoriesandRetrieve Long Term Memoriesnodes with your actual Google Doc ID. Ensure the Google Docs account is authorized. - User Validation: Update the
Validationnode with the expectedfirst_name,last_name, andidif you wish to enforce strict user validation. Currently, it serves as a placeholder. - Run the Workflow: Activate the workflow and send messages to your Telegram bot.
Apps Used
Workflow JSON
{
"id": "6bf8a7ff-ede9-475f-9a12-8086dfd0145c",
"name": "DeepSeek AI Agent with Telegram and Long-Term Memory",
"nodes": 17,
"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: 6bf8a7ff-ede9...
About the Author
DevOps_Master_X
Infrastructure Expert
Specializing in CI/CD pipelines, Docker, and Kubernetes automations.
Statistics
Related Workflows
Discover more workflows you might like
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.
Automated Gmail Labeling with AI
Automatically categorize incoming emails in Gmail using AI, creating new labels when necessary.
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.