If you’re building a chatbot and want it to actually feel personal (not just spit out everyone’s name), you’re in the right place. This guide is for anyone who uses Landbot, whether you’re just starting out or trying to make your bots less robotic. We’re going to get into the nuts and bolts of using dynamic variables—the real stuff that makes conversations feel less like a spam email and more like a human chat.
Let’s cut through the noise and get straight to it.
Why bother with dynamic variables?
Here’s the thing: Nobody likes talking to a bot that sounds like it’s reading from a script. People notice when a chatbot remembers their name, knows what they want, or picks up where they left off. That’s what dynamic variables do in Landbot—they help your bot remember things, use them at the right time, and actually sound…well, human.
But before you go wild with variables, know this: Personalization isn’t magic. If you overdo it, your bot can get creepy or just plain confusing. Use variables to make conversations smoother, not to show off.
Step 1: Understand what dynamic variables are (and aren’t)
Dynamic variables in Landbot are like little memory tags. They hold info your bot collects—like a user’s name, email, favorite pizza topping, or anything else you ask and store. You can drop these variables into messages so your bot says “Hi, Sarah!” instead of “Hi, user!”
What they’re good for: - Greeting users by name - Referring back to previous answers (“Last time you ordered pepperoni…”) - Customizing offers or suggestions - Routing conversations based on choices
What they’re not: - A silver bullet for engagement (bad bots stay bad, even with names) - A replacement for good conversation flow - A way to collect sensitive data you don’t actually need
Pro tip: Only use variables for stuff that really improves the chat. Don’t ask for a birthday if you’re not going to use it.
Step 2: Set up variables in Landbot
Landbot makes it simple to create and manage variables, but it’s easy to get lost if you don’t know where to look.
Creating variables
You don’t have to set up variables in advance—Landbot creates them on the fly when you collect answers. Here’s how:
- Ask a question in your flow (e.g., “What’s your name?”).
- In the question block, you’ll see a field called “Save answer as variable”.
- Give your variable a clear name. Use something obvious, like
@name
or@favorite_pizza
. The@
is Landbot’s way of marking it as a variable.
Landbot automatically stores the user’s answer in that variable.
A couple of things to keep in mind:
- Variable names are case-sensitive. @Name
and @name
are different.
- Stick to letters, numbers, and underscores. Spaces or weird symbols are a pain later.
Viewing and managing variables
- Click on the “Variables” tab in your bot builder to see all variables in play.
- You can set default values, see where each variable is used, and delete ones you don’t need.
Honest take: Naming matters. If you call everything “@answer1”, “@answer2”, you’ll regret it the first time you try to update your flow.
Step 3: Use variables to personalize messages
Here’s where the magic happens—actually using what you’ve collected to make the chat feel personal.
Inserting variables into messages
Anywhere you type a message in Landbot, you can insert a variable by typing @
and picking from the dropdown (or just type the variable name if you know it). For example:
Hi @name, great to see you again!
Landbot swaps @name
for whatever the user entered.
Where to use personalization (and where not to)
Good places to use dynamic variables: - Greetings (“Hi @name, welcome back!”) - Confirmation messages (“Your order for @favorite_pizza is on its way.”) - Follow-ups (“Last time you chose @preferred_contact, should we stick to that?”)
What to avoid:
- Over-personalizing. If every single message uses their name, it gets weird fast.
- Using variables before they’re set. If @name
is empty, you’ll end up with “Hi ,” which looks sloppy.
Pro tip: Always have a fallback. “Hi there!” works if the name is missing. Landbot supports conditional logic, so set up a check:
- If
@name
exists, say “Hi @name!” - Else, just say “Hi there!”
Step 4: Branch conversations based on variables
Personalization isn’t just sprinkling names into messages. You can use variables to steer the whole conversation.
Using logic blocks
Landbot lets you build logic directly into your flow:
- Add a Conditions or If/Else block after collecting a variable.
- Set the condition (e.g., if
@plan
is “Premium”, show special offers). - Route users down different paths based on their answers.
Examples:
- If @location
is “New York”, show local info.
- If @is_returning
is true, skip the intro.
Honest take: This is where most bots mess up. Too many branches get hard to manage, and you’ll end up with a tangled mess. Start simple, and only add complexity when you really need it.
Step 5: Use variables across sessions (don’t over-promise)
One of the coolest features in Landbot is the ability to remember users between sessions—sort of. If your bot is embedded on your site and uses cookies, Landbot can recognize returning users (unless they clear cookies or switch devices).
Storing variables for returning users
- Landbot’s Persistent Variables can store info like names or preferences.
- When a user returns, you can access those variables and pick up the conversation.
But here’s the catch: - This only works reliably if users come back on the same browser and haven’t cleared cookies. - Don’t promise users you’ll “always remember” them—tech has limits.
Pro tip: Use persistent variables for convenience, but always have a backup plan for when they’re missing.
Step 6: Integrate variables with other tools
Variables get even more useful when you connect Landbot to your other tools.
Sending variable data to other apps
- Use Webhooks or Landbot’s native integrations (like Google Sheets, Zapier, or CRM tools) to send variable data elsewhere.
- This lets you save leads, trigger emails, or kick off workflows based on what users tell your bot.
Pulling in data to personalize conversations
- You can fetch data from outside sources and set variables in Landbot—like checking a customer’s order status based on their email.
- This gets advanced quickly, so only go here if you’re comfortable with APIs or have a clear use case.
Honest take: Integrations are powerful, but they’re also where most people get stuck. If you’re not technical, stick with built-in options before trying to build your own API calls.
Step 7: Test, test, test (and don’t annoy people)
Personalization is great—until it breaks. Before you launch, hammer your bot with test conversations:
- Leave some variables blank to see what happens.
- Try weird answers (numbers where text is expected, or vice versa).
- Pretend to be a totally new user, then a returning one.
What to watch for: - Empty variables showing up in messages - Wrong branches or dead ends - Overly aggressive personalization (“Hi Sarah, age 37, from Brooklyn, who likes pineapple pizza!”—yikes)
Pro tip: Ask a friend to test. They’ll notice things you miss.
What works, what doesn’t, and what to ignore
Let’s be honest: - Personalization works best when it’s subtle and genuinely helpful. - Overusing variables feels fake—think of how you’d talk in real life. - Don’t collect info you don’t plan to use. - If something’s not working, cut it. Users would rather have a simple, reliable chat than a buggy, overpersonalized mess.
Ignore any advice that says “personalize everything.” You’re not fooling anyone with a bot that says their name in every sentence.
Keep it simple, iterate often
You don’t have to build a mind-reading bot. Start small: collect a name, use it where it makes sense, and branch conversations in ways that actually help the user. As you get more comfortable with Landbot’s variables, add more personalization—but only when it makes the experience smoother.
The best bots are the ones people don’t notice are bots. Keep things simple, fix what breaks, and don’t be afraid to scale back if you go too far. Personalization isn’t about showing off—it’s about making things easier for your users. And honestly, that’s all most people want.