# Telegram bot

> Save notes to MMW and ask your memory questions from Telegram with the @mmwhub_bot bot.

On this page you will link Telegram to your MMW account, save notes and search memory through the @mmwhub_bot bot, and see what happens to your messages.

## What you get

- A note sent to the bot is saved to your memory with the source `telegram`.
- For a question, the bot finds the answer in memory: up to 3 records, with date and source.
- A forwarded message is saved together with its author.
- Your assistants see the same records: Claude, ChatGPT, Cursor and other clients using a key from the same account.

## Prerequisites

- An MMW account with an active subscription; see the [Quickstart](/start/quickstart/).
- Telegram. The bot works in private chats only.

## Linking

1. Open your account at [app.mmwhub.tech](https://app.mmwhub.tech) → Integrations.

2. Choose Connect Telegram, then Open bot. Telegram opens @mmwhub_bot and the link is made automatically.

3. If the button does not open the bot, copy the code from your account and send it to the bot:

   ```text
   /link CODE
   ```

   The code works once and is valid for 10 minutes.

4. The bot confirms that your MMW account is connected.

## How to use it

Just write to the bot; it works out whether you sent a note or a question:

```text
Skis are on the balcony
```

The bot saves the note.

```text
Where are the skis?
```

The bot finds the record and answers from it, with the date and source.

If the bot misreads you, use the commands:

| Command | What it does |
|---|---|
| `/save text` | Save the text as a note, no guessing. |
| `/find question` | Search memory, no guessing. |
| `/undo` | Undo the last saved record. |
| `/unlink` | Disconnect the bot from your account. Takes effect immediately. |
| `/help` | Command help. |

Answers to questions are composed by a language model from a language model provider, based on the records found in your memory.

## Verify

1. Send the bot: `Supplier Alpha gives 7% off if paid before the 15th`.

2. Send: `What discount does Alpha give?` The bot should answer from the saved record, with date and source.

3. Open your account, Knowledge base: the record is there with the source `telegram`.

4. Ask any connected assistant: "What are supplier Alpha's terms? Check MMW." It finds the same record.

## Support chat

A support operator may write to you through the bot or offer to open a support chat. The chat opens **only after you agree**: the bot shows Yes and No buttons.

- While the support chat is open, your messages go to the operator and are **not saved to memory**.
- The chat closes on its own after 24 hours of silence, or with `/unlink`.

## Privacy

- Messages pass through a relay server in Germany. It does not store or log message texts, and it holds no database and no MMW credentials.
- Every message re-checks the link, so `/unlink` takes effect at once.
- A message Telegram delivers twice never creates a second record.
- Secrets in notes are removed, as with any write to MMW (Memory Guard).

## Common problems

A code is valid for 10 minutes and works once. Get a new one: your account → Integrations → Connect Telegram.

After several wrong codes linking is temporarily blocked. Wait 15 minutes and get a new code.

The bot works in private chats only. Message it directly.

A single note sent through the bot is limited to 4,000 characters. Save long documents through an assistant instead.

## What's next
