Skip to content
Input & data

Save value: the bot stores data in a variable

Puts a value into a bot "cell" — fixed text or something gathered earlier — to reuse it later in the flow.

In short

The "Save value" block in the Forgebot Telegram bot builder is a flow step where the bot itself, without asking the person, puts a value into a variable (a "cell"). The value can be fixed text or something gathered earlier via {{...}}. Use it where you need to tag the customer or prepare data for the next steps.

Free plan — no card required.

The “Save value” block’s settings panel in the editor
About the block

What the "Save value" block does

Unlike the "Ask" block, here the bot asks the person nothing — it writes the value you set into a "cell" (a variable) itself. The person doesn't see it. Later in the flow the saved value can be inserted into a message via {{...}} or used in conditions and calculations — for example to mark that the customer chose pickup.

Fields

Block settings

The block's settings panel — what to fill in:

Cell name
The name of the variable to save the value into — for example chosen_city. Written in lowercase Latin letters, digits and underscore. Some system names are reserved — the panel flags a name you can't use.
Value
What exactly to store in this cell: fixed text (for example "pickup") or a value gathered earlier via {{...}}.
Attach to the person permanently
A checkbox: attach the value to the person (it stays in their card and in future conversations) or remember it only within this conversation. Only within this conversation by default.
Example

Example: mark the customer's choice

The customer tapped "Pickup" — the next step, a "Save value" block, puts "pickup" into the variable delivery_type. Later in the flow the bot checks this cell and skips asking for a delivery address.

FAQ

Frequently asked questions

How is "Save value" different from the "Ask" block?

"Ask" puts a question to the person and remembers their answer. "Save value" asks nothing — the bot itself writes the value you set into a variable. The person doesn't see it.

Why isn't the cell name accepted?

The name must be lowercase Latin letters, digits and underscore, and must not start with a digit. Some names are also reserved for the bot's system needs and can't be used. If the field turns red, change the name.

What does "attach to the person permanently" mean?

Without the checkbox the value lives only in the current conversation and is forgotten afterwards. With it, the value is attached to the person — it stays in their card and is available in later conversations with the bot.

// Start today

Launch your Telegram bot with Forgebot

Build your first flow, reply to subscribers and watch analytics — free, no code.

Free plan: 1 bot, 5 flows, 100 subscribers. No card required.