Table of Contents

Managing Data in Your Chatbot: A Guide to Using Fields

Dilyara Updated by Dilyara

Managing information effectively is crucial for creating a chatbot that feels intelligent and responsive 🔑 Without the ability to store and retrieve data, your chatbot would only offer generic, one-off responses.

Fields are the solution! They allow you to capture user inputs, pull in data from external sources, and create personalized interactions that evolve with each conversation. This guide will walk you through the basics of working with fields and help you get started on your bot-building journey 🏗️

Prefer watching than reading? No problem, we've got you covered 👇

What are Fields? 📦

Fields are used in chatbots to store and manage information throughout conversations. For example, when your bot asks a question and you need to remember the answer, you save that response in a field.

Think of a field as a "box" that you can give a name and store "things" inside. These "things" can be any data — such as user responses, session information, or even data pulled from external sources like Google Sheets or Airtable.

Creating and Settings Fields 🛠️

There are several ways to create and set fields in Landbot:

Block Configuration

In Landbot, Question Blocks are designed to collect specific types of user input and save that information in fields.

Within each block, there’s a "Save user answer in the field" option, where you can create or select a field to store the data. Simply enter a name for your field and click the "Create new field" button to save it.

Some blocks automatically determine the field format based on the type of question, for example:

  • Ask for a Date block: Creates fields that store values in a date format (11/01/2025).
  • Ask for a Number block: Creates fields that store numerical values.

Other blocks, like Buttons, support multiple field formats, offering flexibility for your bot's needs. For instance, if you want to allow users to select multiple options when answering a question, the best format for the field is Multi Choice.

Set a Field Block

A dedicated block that allows you to create, establish a format and assign a value to fields during conversation flow.

Suppose that you want to set a field based on specific criteria, like saving the current date whenever a user interacts with the bot. In the Set a Field block, you can create a field called interaction_date and assign it the value of the current date using the built-in functionality,Today field.

This way, every time a user interacts with the bot, the field interaction_date will be updated with the current date, allowing you to track when the interaction took place for later use.

The Set a Field block is a powerful tool for manipulating and managing data in your chatbot. For more details on how to use this block, check out this article.
Third-Party Integrations

Fields can also be created when pulling information from external tools like Google Sheets or Airtable.

In this example, you can use the Google Sheets block to pull user data directly from a Google Sheet into your chatbot. For instance, when a user provides their email, the bot can search the sheet for that email and retrieve corresponding information like their name. This data is then saved in field, such as user_name , which can be used later in the conversation to personalize conversation.

Different Field Formats 📝

Fields can store a variety of data types, depending on the needs of your chatbot. Here are the available field formats you can use:

  • Text (string): This is the most flexible type of field. It is usually used to store simple text-based data, like names or emails, but it can also store other types of data (numbers, dates, signs, emojis, hyperlinks, etc.)
  • Date: Stores date-related information, ideal for scheduling or tracking events.
  • Number: Stores numeric data for calculations or numerical input.
  • Array (Multi Choice): Stores multiple values, such as when users select multiple options in a multi-choice question.
  • Boolean: Stores true/false values, useful for decision-making (e.g., "Yes" or "No" answers).

Use Cases for Fields 💡

Referencing Fields to Personalize Conversation

Suppose you want to personalize chatbot conversation by capturing user's name and using it throughout the interaction to create more dynamic and engaging experience. Here's how you can achieve it:

  1. Add Ask for a Name block in your flow to ask for user's name
  2. Create a field to store the user's answer. In this example it's name
  1. In subsequent messages in your conversation flow, reference the field name to personalize responses.

There are different ways to reference fields in Landbot:

  • Using the "Fields" Button (No Typing Needed)

- When you're editing a text area inside certain block (like a Send a Message or Ask a Question block), look for the "Fields" button.

- Click on it, and a list of available fields in your bot will appear.

- Select the field you want (e.g., name), and it will automatically be inserted into your text.

  • Typing "@" + Field Name

- If you already know the field name, just type @ followed by the field name directly in the text. For example, you can add @name in your message, and the bot will replace with the user’s actual name.

See how it works:

Routing Users Based on Their Answers (Conditional Logic)

You can set up conditions based on user answers stored in fields to show different paths of the conversation flow.

In this example, we have our chatbot to qualify potential customers based on their budget and company size, and categorize them as either a high-value lead or a regular lead. We can prioritize high-value leads for direct sales follow-up, while regular leads continue with the automated flow. Let's see how it can be done:

  1. Ask for the user budget using Buttons block, and save the user's selection in a custom field named user_budget
  1. Ask for the company size using Buttons block, and save the user's answer in a custom field company_size
  1. Use Conditions block to check both user_budget and company_size values.

We will segment leads to prioritize large companies with higher budgets. In the Conditions block, we will check if the budget exceeds €2000 and simultaneously verify that the company has more than 250 employees:

✅ For leads that meet both conditions, the green output of the Conditions block will be triggered, and we can send Slack notification to the Sales team for immediate follow-up, and use Calendly integration so leads can book a call directly in the chatbot flow.

❌ For leads that do not meet these conditions, we will guide them through a self-service product recommendation flow, by connecting the red output of the Conditions block to continue the flow. Here's how the flow would look like:

Retrieving and Displaying Data from External Tools

In this example, we demonstrate how you can use Landbot to retrieve order status information from a Google Sheet.

When a customer interacts with your bot, they’ll provide their Order ID, and the bot will look up their order details (specifically the Order Status) from the Google Sheet and provide them with the status of their order. Here's how the process works:

  1. Ask for the Order ID using Ask for a Number block, and save the user's response in a field order_id
  1. Use Google Sheets block to fetch the order_status from your database based on order_id

Here's a sample spreadsheet with information on customer orders:

When configuring Google Sheets block, we will use GET method to retrieve the status of the customer's order from the database. For that, we need to:

  • Choose the reference column (Order ID) from our spreadsheet and add the field order_id to identify the row from which data will be obtained.
  • To save the corresponding data, we need to specify the column of the spreadsheet (Order Status) and assign the field where this data will be stored (order_status):
  1. ✅ If the provided Order ID is in your database, the green output of the Google Sheets block will be triggered and we can display this information to the user by adding corresponding fields in the Send a Message block
  1. ❌ In case the provided Order Id is not in your speadsheet, the bot will follow the red output of the Google Sheets block, and we will redirect the user to try again, by connecting this message back to the block where we ask for Order ID (Ask for a Number in our example):

Here's the final chatbot view:

Storing Uploaded Files in the Chatbot

In this use case, we’ll walk through how to allow users to upload a file in the chatbot. Let’s say you want to collect a user’s resume through the chatbot for a job application:

  1. Ask Users to Upload a File

Use the Ask for a File block to let users to upload their resume, and store their input in the field resume

For more information on how to use Ask for a File block, please refer to this article 👀
  1. How Uploaded Files Are Stored

Once the user uploads their file, Landbot will automatically store the file on its servers. Instead of storing the actual file in the corresponding field (resume) , only the URL pointing to that file will be stored there.

  1. Accessing the Uploaded File

To access the file, you should reference the URL stored in the corresponding field. Here are few options on how to do that:

  • From the Bot's Analyze Section:

You can find the resume field from the Analyze section of the bot, where you'll be able to access the uploaded file through the stored URL:

  • Using the Field in the Bot Flow

You can use the field resumein the bot flow to send an email with the file URL or store it in your CRM for further processing. For example, here we use Send an Email block to send this information:

Here's the final chatbot view:

Advanced Use Cases 🚀

Beyond the common use cases we covered, fields can be used in more advanced scenarios to enhance automation, personalization, and integrations. Here are a few powerful ways to leverage fields in your chatbot:

Using Hidden Fields for Tracking & Personalization

Hidden fields allow you to capture and pass URL parameters or UTM tags into the bot. This is useful for tracking campaign sources, pre-filling user details, or customizing responses based on external parameters.

👉 Explore the setup in this tutorial

Creating a Verification System with Google Sheets

Fields can be used to verify user credentials, such as checking a membership ID or confirming an email address against a Google Sheets database. This is useful for gated content, exclusive access, or order verification.

👉 Explore the setup in this tutorial

Displaying Dynamic Images & Media

You can use fields to dynamically display images, GIFs, or videos. For example, if a user selects a product category, you can show an image of the recommended product using a dynamic URL.

👉 Explore the setup in this tutorial

FAQs & Troubleshooting 🛠️

❓ Where can I access the information and users' responses stored in the bot?

Every user's input is stored in the corresponding fields you create in your bot. You can access all collected data from the Analyze > Conversations' Data section of the bot:

👉 Check out this article to get more information on the Bot's Analyze section

❓ Why isn’t my field value being saved?

If a field value isn't being stored, consider these possible reasons:

  • The field may not be correctly created or assigned in the bot flow. If it doesn’t exist, the user’s input won’t be saved.
  • The user may not have reached that part of the conversation, meaning no value has been assigned to that field.

❓ How can I reset or clear a field’s value?

You can use Set a Field block to assign an empty value to already existing field. For that, switch to Unset mode and select a field:

❓ Can I change the field's format once it is created?

No, once a field’s format is set (e.g., text, number), it cannot be changed. If you need a different format, you’ll need to create a new field with the correct format and update your bot flow accordingly.

❓Is there a size limit for storing data in Arrays?

Yes, arrays have a size limit of 1MB. If this limit is exceeded, it will cause errors, for example, in the Dynamic Data block. To avoid this, ensure your stored data remains within the allowed size.

Was this article helpful?

Builder's keyboard shortcuts and mechanics! 🏗

Contact