Templates / 🐋🤖 DeepSeek AI agent + Telegram + LONG TERM memory 🧠

🐋🤖 DeepSeek AI agent + Telegram + LONG TERM memory 🧠

Needs changes

by Joseph LePage ✓ · 34,222 views · created 2025-02-08 · Personal Productivity, AI Chatbot

Needs changes. This template uses 1 thing(s) that n8n 3.0 removes: AI Agent v1 (old agent modes). 1 breaking item(s) found. Static check, last run 2026-10-19.

What 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).

  1. Validation (Edit Fields (Set)): sets 3 fields: first_name, last_name, id
  2. Check User & Chat ID (If): checks a condition and branches into true / false
  3. Message Router (Switch): routes items into 3 branches
  4. Error message (Telegram): uses Telegram
  5. Merge: merges the data from its input branches
  6. Retrieve Long Term Memories (Google Docs): get
  7. AI Agent: runs an AI agent, with model: DeepSeek-V3 Chat; 1 tool (Save Long Term Memories)
  8. Telegram: uses Telegram
  9. Response Error message (Telegram): uses Telegram
  10. DeepSeek-R1 Reasoning (OpenAI Chat Model): uses OpenAI Chat Model

…plus 1 more step. See the full node list below.

Services it uses

TelegramGoogle DocsOpenAI Chat Model

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.0Replace 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)

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…

Excerpt from Joseph LePage's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.