Create a table with records

Learn how to create your table and add records to it.

Changes to the tables, such as adding or deleting a table, will be applied to both the live and draft environments. However, any data added to the tables will only be reflected in the environment where the data was originally added.

If you wish to populate data from one environment to another, the best approach is to export the data from the source environment and then import it into the target environment.

When exporting a bot, the Tables will not be included in the export file.

Let's imagine a scenario where a bot is helping users book their favorite yoga or Zumba class. You want to use table to check available class and then help customers to book their favourite class. Follow these steps to get started using Table.

Create a table

To add a table to your Tables:

  1. Navigate to the Tables section in the main menu.

  1. Click the + button at the top of the screen.

  2. Give the table a descriptive name and provide a brief explanation of its purpose. In this example, our table serves to store info about the dates, names and times of a yoga/zumba class booking system.

  3. Define your table columns. Specify the name of each column and select the appropriate type of variable for your column. For this example, we'll only have text columns for:

    • className

    • classDay

    • classTime

    • classTeacher

    • isBooked

  1. Click Create.

Learn more about the columns types in the dedicated article 👇

Column types

You've successfully created a table! For now, it's still empty.

Delete a table

  1. Click the three dots button

  1. Select Delete

  2. Confirm Delete

Let's now add records to the Table.

Create a new record

A record is a line of data on your table.

To populate your table with data, you can either:

Add a new record manually

  1. From your table, click on Insert record at the top-right corner of your screen.

  2. Fill the value for each column.

  1. Click Add.

You can now see your record inside the table!

Edit record

  1. Click the three dots button on the left side of the table

  2. Select Edit

  3. Edit records

  1. Click Save

Import a record

For importing more than 100 records, using an API is recommended over manual data import. Find the documentation here.

  1. From your table, click on the arrow next to the Insert record button.

  2. Select Import data.

  1. Drag and drop a CSV file.

  2. If your data is incompatible, you will get a red alert next to Preview data to be imported. Click on this section.

  1. The details unfold so that you can review the issues that need to be solved. In this example, the problem is that we have some columns headers incompatibilities.

  1. After figuring out all the issues, go to Configure import data to solve those. In this example, as it mentioned that some columns are not present in the table, deselect the columns that shouldn't be imported.

The columns selected in green will be imported, whereas the white ones won't be imported.

  1. Once you have resolved the issues, the Data incompatible tag will disappear, indicating that the data is now ready for import.

  2. Click Import as the last step.

Your table is now filled with the data that was in your .csv file!

Looking for a quick and easy bot template to play with Tables? The Gym bot is a representative use case.

Last updated