Create a table with records
Learn how to create your table and add records to it.
Last updated
Learn how to create your table and add records to it.
Last updated
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.
Please note that Tables cannot be exported at bot export yet.
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.
To add a table to your Tables:
Navigate to the Tables section in the main menu.
Click the + button at the top of the screen.
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.
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
Click Create.
Learn more about the columns types in the dedicated article 👇
Column typesYou've successfully created a table! For now, it's still empty.
Click the three dots button
Select Delete
Confirm Delete
Let's now add records to the Table.
A record is a line of data on your table.
To populate your table with data, you can either:
Import data that already lives somewhere else.
From your table, click on Insert record at the top-right corner of your screen.
Fill the value for each column.
Click Add.
You can now see your record inside the table!
Click the three dots button on the left side of the table
Select Edit
Edit records
Click Save
For importing more than 100 records, using an API is recommended over manual data import. Find the documentation here.
From your table, click on the arrow next to the Insert record button.
Select Import data.
Drag and drop a CSV file.
If your data is incompatible, you will get a red alert next to Preview data to be imported. Click on this section.
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.
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.
Once you have resolved the issues, the Data incompatible tag will disappear, indicating that the data is now ready for import.
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.