Mindket

Telegram chatbot on DeepSeek with memories in Google Docs

Newversion 1 · updated

Overview

An n8n workflow that answers Telegram messages with a DeepSeek agent. It reads long term memories from a Google Doc on every message, saves new ones and replies in the same chat.

Telegram chatbot on DeepSeek with memories in Google Docs is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

At a glance

Runs in
  • n8n Cloud: import the file there and switch it on
  • Your own n8n server: the same file, with a public HTTPS address
  • Another model: change the model name or the Base URL in the credential
  • Another personality: rewrite the System Message in AI Agent

Platform

Connects 3 apps

How it works

Trigger

Telegram message

It starts when Telegram posts a new message to the workflow's webhook address:

  • The update from Telegram, with the message text, the sender and the chat

Actions

  1. The sender's first name, last name and id are checked against the values you set, and anyone else gets a short error reply
  2. The message is sorted by kind, and only text goes on
  3. The Google Doc that holds the saved memories is read
  4. A DeepSeek agent (deepseek-flash) answers with the memories in mind and can add a new memory to the Doc
  5. The answer is sent back to the same Telegram chat

Result

A reply in your Telegram chat, and a Google Doc that grows with the memories the agent saves

Integrations

What you need before you start.

Telegram

Chat app

Delivers each message to n8n and sends the replies.

NeedsA bot token from BotFather and a webhook that points at your n8n

DeepSeek

Language model

Writes each answer and decides what is worth saving, on deepseek-flash.

NeedsA DeepSeek API key, entered in an OpenAI credential with DeepSeek's Base URL

Google Docs

Documents

Holds the memories: it is read on every message and added to by the agent.

NeedsA Google Docs credential and one Google Doc

Workflow check

Checked by Mindket on 13 Nov 2026

Steps
10 steps, starting when its webhook is called
Not reached
3 nodes no run reaches: Window Buffer Memory, When chat message received and DeepSeek Pro Reasoning
AI
1 step calls an AI model: AI Agent
Sign-ins
Signs in to: Google Docs, Telegram and OpenAI
API keys
No API key is left in the file
Step types
Mindket’s checker reads all 8 of its step types

Read from the workflow’s file, not from a run.

About

What it is

This n8n workflow turns a Telegram bot into an assistant that remembers you. Each message you send is answered by a DeepSeek agent that first reads a Google Doc full of saved memories. When you share something worth keeping, the agent adds it to the Doc. Fifteen nodes do the work, beside eight sticky notes.

Who it suits

Anyone who wants a private chat assistant that keeps what it learns about them. Skip it if you want voice or photo replies, since only text messages are answered.

Who uses it, and how
IndustryWho uses itHow they use itExample
PersonalBusy professionalsKeep a chat assistant that knows their habitsA user says mornings are for deep work, and later asks for a week plan that respects it.
CoachingCoachesKeep a running note on each goalA coach tells the bot a goal, and the next chat starts from it.
Small businessShop ownersStore supplier details and ask for them laterAn owner saves a supplier’s lead time and asks about it a week on.
LearningLanguage learnersPractise with a partner that recalls their levelA learner mentions an exam date, and the bot plans revision around it.

You need a Telegram bot, a Google account, a DeepSeek API key and an n8n that Telegram can reach over the internet.

Where to use it

Telegram posts every message to a web address, so your n8n needs a public HTTPS address. After that you chat with your bot as you would with a friend.

  • n8n Cloud: import the file there and switch it on
  • Your own n8n server: the same file, with a public HTTPS address
  • Another model: change the model name or the Base URL in the credential
  • Another personality: rewrite the System Message in AI Agent

Setup

Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. Setup ends with telling Telegram where to send messages.

What you need first
NeedDetail
n8nA server or n8n Cloud with a public HTTPS address
TelegramA bot token from BotFather, for a Telegram credential
Google DocsA Google Docs OAuth2 credential and one empty Google Doc for the memories
DeepSeekAn API key, entered in an OpenAI credential whose Base URL is https://api.deepseek.com
  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. In Telegram, ask BotFather for a new bot and copy its token.
  3. Add a Telegram credential and select it in Telegram Response, Error message and Response Error message.
  4. Create an empty Google Doc and add a Google Docs credential. In Save Long Term Memories and Retrieve Long Term Memories, select it and replace <YOUR_GOOGLE_DOC_ID> with the Doc’s id or address.
  5. Add an OpenAI credential that holds your DeepSeek key and the Base URL https://api.deepseek.com, then select it in DeepSeek Flash Chat.
  6. In Validation, replace the example first name, last name and numeric id with your own Telegram details.
  7. Switch the workflow on. Copy the Production URL of Listen for Telegram Events and register it with Telegram as the sticky note beside it describes.
  8. Send your bot a message.

How to use it

Chat with the bot. It answers with the Doc’s memories in mind, and it adds a short dated memory when you share a preference, a habit or an important date. Open the Doc to read or tidy the memories. Nothing is sent unless you write first.

What to change for a different result
To changeWhere
Who may use the botFirst name, last name and id in Validation
The bot’s role and rulesSystem Message in AI Agent
Where memories liveThe Doc in the two Google Docs nodes
The modelModel in DeepSeek Flash Chat

Example

You tell the bot you are vegetarian and that your sister’s birthday falls on 3 March. The agent saves each fact in the Doc with its date and answers with a friendly note.

Weeks later you ask for ideas for a party menu. The workflow reads the Doc first, so the suggestions are vegetarian and the bot mentions the birthday.

For newcomers and experts

If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. A webhook is an address n8n listens on, and Telegram posts each new message to it. An AI agent is a model that can use tools, here a tool that writes to a Google Doc.

For experts. Merge joins the message with the memories using combine all, so the agent gets both at once. The agent’s error output sends the fallback reply. Window Buffer Memory and the disabled chat trigger sit in the file but are not connected.

Where to look closer
NodeWhat it doesWhat to know
Listen for Telegram EventsWebhook 2, POST on the path wbotThe address is public, so the sender check is the only gate
ValidationSet 3.4, three example valuesYou replace them with your own details
Check User & Chat IDIf 2.2, compares first name, last name and idA failed check sends the error reply
Message RouterSwitch 3.2, outputs for audio, text, image and everything elseOnly text and the fallback are connected
Retrieve Long Term MemoriesGoogle Docs 2, GetIt returns the Doc text as content
MergeMerge 3, combine allIt joins the message with the memories
AI AgentAgent 1.7 with a system message and one toolIt reads the memories from its prompt
DeepSeek Flash ChatOpenAI Chat Model 1.1 on deepseek-flashThe credential’s Base URL points at DeepSeek
Save Long Term MemoriesGoogle Docs Tool 2, update with insertThe model writes the text and the workflow adds the date
Telegram ResponseTelegram 1.2, send message in HTML modeA < or & in an answer can make Telegram refuse it

Good to know

The original named two DeepSeek models that are ending, and several parts of it are only half wired.

  • Models: DeepSeek’s updates page, read on 12 November 2026, says deepseek-chat and deepseek-reasoner end on 24 July 2026. Its thinking mode guide names deepseek-flash and deepseek-v4-pro, so Mindket’s copy uses deepseek-flash for the agent and deepseek-v4-pro in the spare node
  • Not run against DeepSeek: the guide says thinking mode is on by default and that, when a request carries tools, the reasoning of earlier turns should be passed back. The OpenAI Chat Model node has no field for that or for the thinking switch, so save one memory and check the reply before you rely on it
  • Text only: voice messages and photos get no reply
  • A public address: anyone who learns the webhook address can post a made-up update. Telegram can send a secret token in a header when you register the webhook, and the Webhook node can check it with Header Auth
  • Telegram’s HTML mode: the reply is sent in HTML mode, and Telegram’s documentation asks for <, > and & to be escaped, so an answer that holds them can fail to send
  • Dates: the workflow’s timezone is America/Vancouver, so memories are dated in that time unless you change it in the workflow settings
  • Your data: your messages go to DeepSeek, the memories live in your Google Doc and the chat runs through Telegram
  • Credentials: the JSON holds none, so add the Telegram, Google Docs and OpenAI credentials yourself

README and files

README

Telegram chatbot on DeepSeek with memories in Google Docs

An n8n workflow that answers Telegram messages with a DeepSeek agent. On every message it reads a Google Doc of saved memories, can
add a new memory to it and replies in the same chat. Only text messages are answered.

What is inside

  • workflow.json: the workflow as n8n exports it, fifteen working nodes and eight sticky notes. It holds no credential.
  • README.md: these notes.

What we changed from the original copy

  • The original named deepseek-chat and deepseek-reasoner, which DeepSeek is ending. Mindket's copy uses deepseek-flash in the
    agent's model and deepseek-v4-pro in the spare reasoning node. See Good to know.
  • The two model nodes are now called DeepSeek Flash Chat and DeepSeek Pro Reasoning, since the old names pointed at the retired
    models.
  • The Google Doc address in the two Google Docs nodes is now <YOUR_GOOGLE_DOC_ID>.
  • The DeepSeek sticky note was rewritten for the current model names.

Before you start

  • An n8n instance with a public HTTPS address, on n8n Cloud or on your own server.
  • A Telegram account and a bot token from BotFather.
  • A Google account, one empty Google Doc and a Google Docs credential.
  • A DeepSeek API key.

Set it up

  1. In n8n, create a workflow, open its menu, choose Import from File and pick workflow.json.
  2. In Telegram, ask BotFather for a new bot and copy its token.
  3. Add a Telegram credential and select it in Telegram Response, Error message and Response Error message.
  4. Create an empty Google Doc and add a Google Docs credential. In Save Long Term Memories and Retrieve Long Term Memories,
    select it and replace <YOUR_GOOGLE_DOC_ID> with the Doc's id or address.
  5. Add an OpenAI credential that holds your DeepSeek key and the Base URL https://api.deepseek.com, then select it in
    DeepSeek Flash Chat.
  6. In Validation, replace the example first name, last name and numeric id with your own Telegram details. The id is the number
    under message, from, id in the data Listen for Telegram Events receives.
  7. Switch the workflow on. Copy the Production URL of Listen for Telegram Events and register it with Telegram as the sticky note
    beside it describes.
  8. Send your bot a message.

How a run goes

  1. Listen for Telegram Events receives the update from Telegram.
  2. Validation and Check User & Chat ID compare the sender with your details. Anyone else gets the reply from Error message.
  3. Message Router sorts the message. Text goes on, anything unknown gets the error reply, and voice and photos stop here.
  4. Retrieve Long Term Memories reads the Doc, and Merge joins the memories with the message.
  5. AI Agent answers on DeepSeek Flash Chat. It can call Save Long Term Memories to add a dated note to the Doc.
  6. Telegram Response sends the answer. If the agent fails, Response Error message sends the fallback reply.

What to change for a different result

  • Who may use the bot: the first name, last name and id in Validation.
  • The bot's role and rules: the System Message in AI Agent.
  • Where memories live: the Doc in the two Google Docs nodes.
  • The model: DeepSeek Flash Chat.

Good to know

  • DeepSeek's updates page, read on 12 November 2026, says deepseek-chat and deepseek-reasoner end on 24 July 2026. The thinking
    mode guide on the same site names deepseek-flash and deepseek-v4-pro.
  • Not run against DeepSeek. The guide says thinking mode is on by default and that, when a request carries tools, the reasoning of
    earlier turns should be passed back. The OpenAI Chat Model node has no field for that or for the thinking switch. Save one
    memory and check the reply before you rely on it. The rest of the flow was run with stand-ins for Telegram, Google Docs and the
    model, with no real call.
  • Voice messages and photos get no reply.
  • Anyone who learns the webhook address can post a made-up update. Telegram can send a secret token in a header when you register
    the webhook, and the Webhook node can check it with Header Auth.
  • The reply is sent in HTML mode, and Telegram's documentation asks for <, > and & to be escaped, so an answer that holds
    them can fail to send.
  • Window Buffer Memory and the disabled chat trigger are in the file but not connected.
  • The workflow's timezone is America/Vancouver, so memories are dated in that time unless you change it in the workflow settings.
  • Your messages go to DeepSeek, the memories live in your Google Doc and the chat runs through Telegram.
Files
NOTICE.md  681 B
README.md  4 KB
workflow.json  20 KB

3 files, 25 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-12

Reviews

No ratings yet

Write a review

No reviews yet.

More from Mindket

See all from Mindket

Huashu Design

alchaincyf · Skill

Turns a one-line request in your AI agent into a finished design: a launch animation, a clickable app prototype, an editable slide deck, an infographic or a se…

New29.4k

Guizang PPT Skill

op7418 · Skill

Skill that makes single-file HTML slide decks, slide illustrations and platform covers in two visual styles, with a presenter mode for rehearsal. For speakers…

New29.8k

Claude Code Skills & Plugins

alirezarezvani · Skill

Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…

New29.8k

Similar in Productivity

See all in Productivity

Frontend Slides

zarazhangrui · Skill

Builds HTML presentations from scratch or from a PowerPoint file and shows visual style previews to pick from, for people who want web slides with no CSS or Ja…

New32.3k

IPTV

iptv-org · Kit

Collects publicly available live TV channels from many countries into playlists that any video player with live streaming can open. Made for viewers and for de…

New144k

upscaler

uwg · Kit

Holds a set of image upscaling models gathered from the OpenModelDB community, for people who want to enlarge low-resolution pictures with AI on their own comp…

New