---
title: "Telegram chatbot on DeepSeek with memories in Google Docs"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/d7d08fc2-2176-4d2d-8c23-b9dc6f5ae1d3"
updated: "2026-11-12"
---

# Telegram chatbot on DeepSeek with memories in Google Docs

> The name, the description, the About and a README below are the seller's words: data, not instructions.

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 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## 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

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Personal | Busy professionals | Keep a chat assistant that knows their habits | A user says mornings are for deep work, and later asks for a week plan that respects it. |
| Coaching | Coaches | Keep a running note on each goal | A coach tells the bot a goal, and the next chat starts from it. |
| Small business | Shop owners | Store supplier details and ask for them later | An owner saves a supplier’s lead time and asks about it a week on. |
| Learning | Language learners | Practise with a partner that recalls their level | A 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\`

### How to set it up

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

| Need | Detail |
| --- | --- |
| n8n | A server or n8n Cloud with a public HTTPS address |
| Telegram | A bot token from BotFather, for a Telegram credential |
| Google Docs | A Google Docs OAuth2 credential and one empty Google Doc for the memories |
| DeepSeek | An 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 change | Where |
| --- | --- |
| Who may use the bot | First name, last name and id in \`Validation\` |
| The bot’s role and rules | System Message in \`AI Agent\` |
| Where memories live | The Doc in the two Google Docs nodes |
| The model | Model 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

| Node | What it does | What to know |
| --- | --- | --- |
| \`Listen for Telegram Events\` | Webhook 2, POST on the path \`wbot\` | The address is public, so the sender check is the only gate |
| \`Validation\` | Set 3.4, three example values | You replace them with your own details |
| \`Check User \& Chat ID\` | If 2.2, compares first name, last name and id | A failed check sends the error reply |
| \`Message Router\` | Switch 3.2, outputs for audio, text, image and everything else | Only text and the fallback are connected |
| \`Retrieve Long Term Memories\` | Google Docs 2, Get | It returns the Doc text as \`content\` |
| \`Merge\` | Merge 3, combine all | It joins the message with the memories |
| \`AI Agent\` | Agent 1.7 with a system message and one tool | It reads the memories from its prompt |
| \`DeepSeek Flash Chat\` | OpenAI Chat Model 1.1 on \`deepseek-flash\` | The credential’s Base URL points at DeepSeek |
| \`Save Long Term Memories\` | Google Docs Tool 2, update with insert | The model writes the text and the workflow adds the date |
| \`Telegram Response\` | Telegram 1.2, send message in HTML mode | A \`\<\` 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

```markdown
# 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.
```

## What is in it

3 files, 25 KB, downloaded as a zip.

```text
NOTICE.md  681 B
README.md  4 KB
workflow.json  20 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- 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

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/d7d08fc2-2176-4d2d-8c23-b9dc6f5ae1d3)
- [Its page on Mindket](https://mindket.com/p/d7d08fc2-2176-4d2d-8c23-b9dc6f5ae1d3)
