Telegram Bot With a Built-In Database
Store what people tell your bot, look it up again seconds or months later, and answer from your own tables.
Most chatbots forget everything the moment a conversation ends. This one does not have to. Collections are tables that live beside your bot, and blocks read and write them while someone is typing.
Collections, columns and rows
You create a collection on the Data tab of the dashboard: give it a name, add columns, and you have a table. A bot can hold up to 20 collections, each with up to 32 columns and 50,000 rows, and a single row can hold up to 16 KB of text.
Each collection is created with one of two scopes, and the scope cannot be switched afterwards:
Shared
One table for the whole bot. A product list, an FAQ, a table of discount codes β everybody reads the same rows.
Per user
Rows belong to the person who created them. Someone's saved order, their preferences, their answers β each person sees their own rows and nobody else's.
The five storage blocksPro
Save Data
Writes a new row. In a per-user collection the row is tied to whoever is chatting.
Find Data
Looks for one row. It has two outputs, Found and Not found, so the flow can answer either way.
Find Many
Returns a set of matching rows, up to 100 at a time.
Update Data
Changes the rows that match your conditions, up to 100 at a time.
Delete Data
Clears out whichever rows your conditions match.
Conditions compare a column with a value using ==, != or contains, and the value can be a variable. Matching on {{user_input}} β whatever the person last typed or tapped β is what turns a table into a lookup.
Reading the result back
A Find block writes what it found into variables named after the result variable you choose. Set the result variable to product and a row with columns name and price gives you {{product_name}} and {{product_price}} to drop into the next message.
Worked example: a code lookup
Someone sends a code and the bot answers from your table.
Worked example: a sign-up you can read later
Ask a question, wait for the answer, store it, confirm it.
Every row lands on the Data tab, where you can sort through them, correct a typo by hand, add rows yourself, or delete what you no longer need.
If Pro ends: creating a new collection needs Pro, but the collections and rows you already have stay exactly where they are. You can still open them on the Data tab, edit rows and copy your data out.
What it replaces
No separate database to host, no connection string, no table migrations. The trade is scale: this is sized for bot-shaped work β catalogues, FAQs, sign-ups, codes, per-person preferences β not for a data warehouse.
Questions
Do I need to set up a database server?
No. Collections are built into the dashboard on the Data tab. There is nothing to host, connect or migrate.
How much can one bot store?
Up to 20 collections per bot, each holding as many as 50,000 rows across 32 columns, with a 16 KB ceiling on a single row.
Can every person have their own private rows?
Yes. Create the collection with the per-user scope and each row belongs to the person who made it, so one person never reads another's rows.
How does a bot find the right row?
A Find block compares a column against a value using equals, not equals or contains. The value is usually a variable such as the message the person just sent.
Can I edit stored rows by hand?
Yes. The Data tab lists your collections and their rows so you can add, correct or delete entries yourself.
Build yours today
Start a collection, point a Find block at it, and let your bot answer from your own rows.
Start with a free 14-day Pro trial β no credit card, it begins when you connect your bot.
Get Started Free