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
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
- A message about shopping — the entry.
- 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.
- Branch by action — three outcomes: add, show, clear.
- 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.