🐋🤖 DeepSeek AI agent + Telegram + LONG TERM memory 🧠
Needs changesWhat this workflow does
This AI workflow has 15 nodes and runs when an HTTP POST request hits its webhook URL (plus 1 other trigger). Along the way it connects Telegram, Google Docs and OpenAI Chat Model.
How it runs
Trigger: When an HTTP POST request hits its webhook URL (plus 1 other trigger).
- Validation (Edit Fields (Set)): sets 3 fields: first_name, last_name, id
- Check User & Chat ID (If): checks a condition and branches into true / false
- Message Router (Switch): routes items into 3 branches
- Error message (Telegram): uses Telegram
- Merge: merges the data from its input branches
- Retrieve Long Term Memories (Google Docs): get
- AI Agent: runs an AI agent, with model: DeepSeek-V3 Chat; 1 tool (Save Long Term Memories)
- Telegram: uses Telegram
- Response Error message (Telegram): uses Telegram
- DeepSeek-R1 Reasoning (OpenAI Chat Model): uses OpenAI Chat Model
…plus 1 more step. See the full node list below.
Services it uses
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 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) 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 (12)
- If
n8n-nodes-base.if - Telegram
n8n-nodes-base.telegram - Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Switch
n8n-nodes-base.switch - AI Agent
@n8n/n8n-nodes-langchain.agent - Merge
n8n-nodes-base.merge - Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow - Chat Trigger
@n8n/n8n-nodes-langchain.chatTrigger - Google Docs Tool
n8n-nodes-base.googleDocsTool - Google Docs
n8n-nodes-base.googleDocs - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
This n8n workflow template is designed to integrate a DeepSeek AI agent with Telegram, incorporating long-term memory capabilities for personalized and context-aware responses. Here's a detailed breakdown: --- Core Features Telegram Integration - Uses a…