botnest
Documentation
Guide

Data and variables

Store and pass information between steps.

A chip inserts a value

${message.text} means “the incoming message's text”. It is a chip in the editor and the user's actual text during a run.

  1. Run the block that obtains the data.
  2. Give its result a clear name, such as answer.
  3. Insert ${answer} or one of its fields in a later step.

The result name must match the reference. After renaming it, check every use. A branch only has data that was actually obtained along its execution path.

Events provide different data

  • Message: ${message.text}, ${message.message_id}.
  • Button: ${callback.data}, click details and available message information.
  • Reaction: author, chat, message reference and reaction changes; the full message text may be absent.
  • Schedule: no incoming message or its author.

Use the icon beside an event output for the exact field list. Do not assume every event contains every message field.

What survives between runs

Step results belong to the current run. Use variables and tables for memory.

Scope Use
Chat Conversation stage and current-chat data
Flow Data for one flow
Bot Shared data across the bot's chats

A variable holds one value. A table holds records with columns: requests, products or members. Read using the same name and scope used for writing.

Data blocks → · Parse JSON →