← Example scenarios

A shopping list the bot keeps for you

Write «get more milk» in plain words; the bot adds, shows and clears the list on request.

What the scenario looks like

Сообщение о покупках
Что просили сделать▶
Модель▦
Ветка по действию▶
Добавить позиции▶
Показать список▶
Очистить▶
Ответ: добавил▶
Ответ: список▶
Ответ: очистил▶
Ответ о добавлении▶
Ответ со списком▶
Ответ об очистке▶
  • Execute + Data
  • LLM
  • Execute
Open in your workspace →

A shopping list in a notes app gets lost between devices, and a dedicated app gets opened once a month. A messenger is always open, and you can write to it the way you think: “get more milk”, “what’s on the list”, “clear it”.

What is inside

  1. A message about shopping — the entry.
  2. What was asked — the parser. It turns a plain sentence into an action and a list of items: the bot has no commands, it has intent.
  3. Branch by action — three outcomes: add, show, clear.
  4. Three collection nodes and an answer for each case. The document is assembled in the write node’s own Document field: {{ … }} inside its values is substituted before the row is stored.

The list lives in a collection, not in conversation memory. Memory is forgotten when the conversation goes cold; a collection is in the database, so the list survives a bot restart and a month of silence.

Two wiring details that fail quietly

The read and clear branches get plain execution edges. A find node and a delete node read an incoming value as their filter, so an ordinary data edge would make the parsed command the filter. And a find node returns {docs, count}: you iterate output.docs, or the loop walks the object’s keys and prints empty lines while breaking nothing.

What to set up for yourself

  • The collection — the same id in three nodes.
  • The parser. Three actions are distinguished today. Add “cross off the milk” and you need a fourth branch and a conditional delete rather than a full clear.
  • The list format in the answer: currently a bulleted list, one line per addition.

What to connect

A collection under Tables and a Telegram bot. No external services.