FlowCastle/Docs/Variables: Remember What Users Tell You

Variables: Remember What Users Tell You

Your bot can remember answers and reuse them later: contact, application and system variables, the variable picker, and where the values are stored.

5 min read·Last updated: 2026-08-19
Your bot can remember answers and reuse them later: contact, application and system variables, the variable picker, and where the values are stored.

Guide

  1. 1

    What a variable is

    A variable is a named box. Your bot puts a value into it and reads that value back later.

    Your bot asks "Which city are you in?", the person answers "Berlin", and the answer goes into a variable called city. Ten messages later the bot can still say Berlin, because the value is stored against that person — not against that one message.

    You never handle the raw value yourself. Inside a message, a variable looks like a small coloured chip with the variable's name on it. Think of the chip as a placeholder — {{city}} — that FlowCastle swaps for the real value at the moment the message is sent.

    A FlowCastle message editor with First Name, city and support_email chips inside the message text

  2. 2

    The kinds of variables you will meet

    Contact variables hold one value per person. city can be Berlin for one subscriber and Lisbon for the next. Every answer you collect belongs here.

    Application variables hold one value shared by everyone. support_email is the same for all your subscribers. Use them for settings you would otherwise have to change in twenty different messages. In the variable picker this category is called App.

    Bot variables work like application variables but belong to a single bot. The Bot category only appears when your automation has more than one bot connected, so most people never see it.

    System variables are filled in for you — from the messaging platform and from the clock. You read them; you cannot set them.

    There is a fifth category, Actions, and it appears only inside a block whose action produces output. Those are the values that action just calculated.

  3. 3

    Insert a variable into a message

    Open a Message node and find the Message Text field. Under the field is a small toolbar, and the first button on it is {}.

    1. Put the cursor where the value should appear.
    2. Click {}. The variable picker opens: categories down the left, a search box across the top.
    3. Click Contact, then click city.

    The variable drops in as a chip. This is the only way that works. Typing the word city into the message text sends the word "city" to your user.

    A faster route: type {{ straight into the field. The picker opens at the cursor and filters as you keep typing.

    Need several variables in a row? Hold Ctrl, Cmd or Alt while you click and the picker stays open instead of closing after the first pick.

    The FlowCastle variable picker open under a message editor, showing the App, Contact and System categories with the contact variables city and topic

  4. 4

    System variables you already have

    Open the System category and you get two groups.

    User Fields are facts about the person: First Name, Last Name, Email, Phone, Platform ID, Subscribed At, Created At, Status, Tags, Username and Language Code.

    Expressions are worked out when the message is sent: Current Date, Current Time, Current Day of Week, Bot URL, Referral Link, Identity Token.

    First Name is the one almost every bot uses. The value comes from the messaging platform, and some accounts simply have nothing there — so write the sentence so it still reads when the name is missing.

    The System category of the FlowCastle variable picker, listing User Fields such as First Name, Last Name, Email and Phone

  5. 5

    Create a new variable

    You can create one without leaving the message you are writing.

    1. In the picker, click the category the variable belongs to — App or Contact.
    2. Click Create.
    3. Fill in Name: and pick a Type: — Text, List, Number, Date, Date & Time, Boolean or Secret.
    4. Click Create and use.

    App variables also have a Value: field, because a shared variable can hold a value right away. Contact variables do not: their value is different for every person and gets written while the bot runs.

    Keep names short, lowercase and separated with underscores — city, order_number, support_email. You will be reading them in the picker for a long time.

    The full list lives in the editor sidebar under the Variables tab, split into Application and Contact. That is where you rename, delete and reorganise.

    The inline form for a new Contact variable in the FlowCastle variable picker, with Name and Type fields

  6. 6

    Where the saved values show up

    Open Contacts and click a person. A Contact Details panel opens on the Contact Variables tab: every contact variable with the value stored for that person. You can edit a value there by hand, which is useful while you are testing.

    This page is the honest answer to "did my bot actually save that answer?". If the field is blank here, nothing was written, and rewording the message will not help.

    The Contact Variables tab of a FlowCastle contact, showing the saved city and topic values

  7. 7

    Conditions and actions use the same variables

    Variables are not only for printing. A condition can compare one and send the conversation down a different branch — if city is Berlin, offer the Berlin meetup. Actions go the other way and write to them: set a value, count something up, or store what an integration returned. Start with Condition Node Basics; the actions that read and change variables get their own guide later in this series.

  8. 8

    If a variable comes out empty

    The message prints nothing where the chip was. Nothing has been written to that variable for this person yet. Check that the question which fills it really runs before this message — Ask Questions and Collect Answers covers that wiring.

    Your user sees the variable name as plain text. It was typed instead of inserted. Delete it and insert it from the picker.

    It works for you but not for a subscriber. You probably used an application variable where you needed a contact variable. An application variable is the same for everyone by design.

    Nothing changed after your edit. Saving is not publishing. Click Deploy.

  9. 9

    Next up

    Now that your bot remembers things, teach it to react to what it remembers.

    Condition Node Basics

Next Guide

Continue with
Condition Node Basics
Use this guide to build your first Condition node in FlowCastle, choose the right variable, set the rule, and send people down the correct branch.

Related Guides

More guides to help you continue from this topic.