Table Store Query
Table Store Query runs a read-only SQL query against your workspace’s table stores and emits the result set as a JSON array. Use it to look up reference data, join stores, or check whether a record already exists before inserting. You find it on the node picker’s Storage shelf.
Configuration
Section titled “Configuration”

| Field | Type | Default | Description |
|---|---|---|---|
Query (query) | string ✦ (required) | — | One SELECT over this workspace’s tables; matching rows are returned as the node output. Writes and every other table are refused. |
Parameters (parameters) | key-value map (optional) | — | Named parameters bound into the query’s placeholders. |
On error (onError) | string ✦ (optional) | — | What to do when the query fails on the data: fail the flow, or continue. |
Fields marked ✦ accept expressions.
Try this node — run it once against your own workspace, with your credentials, without building a flow first.
Query syntax
Section titled “Query syntax”There are two ways to inject dynamic values into the SQL string:
1. parameters map. Write a :name placeholder in the query and
add a matching key under “Parameters”. Each value runs through the
expression engine, then goes into the query as a quoted string that the
database reads as data, never as SQL. Use this for every data value:
SELECT id, name, emailFROM table_store_d85k0rv160khb1q83lc0WHERE email = :email AND status = :statusparameters: email → {{ $prev->email }} status → active2. Expression engine directly. The query field itself runs through
the expression engine, so echo tags and $prev/$start references
resolve to text inside the SQL before it runs. Reserve this for
structural parts of the query, such as a table name or a column list;
pass data values through the parameters map instead.
What a query can read
Section titled “What a query can read”The query runs with its own narrow database access, not with your workspace’s full access:
- This workspace’s table stores, and nothing else. A query that names any other table, including another workspace’s store or a system table, is refused before it runs, and the error names the table.
- One statement. Write a
SELECT, aWITH … SELECTor aVALUES. A second statement after a semicolon is refused. One trailing semicolon is fine. - No changes.
INSERT,UPDATE,DELETE, aWITHthat deletes, and functions that write are all refused by the database. To change rows, use Table Store Insert, Table Store Upsert, Table Store Update or Table Store Delete. - 30 seconds. A query that runs longer is cancelled.
Output
Section titled “Output”The node emits a JSON array of row objects whose keys are column names:
[ { "id": "cust-001", "name": "Alice", "email": "alice@example.com" }, { "id": "cust-002", "name": "Bob", "email": "bob@example.com" }]If no rows match, the output is an empty array [].
Whole numbers and booleans come out as JSON numbers and true/false.
Decimal and money columns come out as strings, so 12.5000 keeps its
scale and no precision is lost. Dates and times come out as text such as
2026-09-24 10:11:12.
An Agent can call this node as a tool. Because the database enforces that the query only reads this workspace’s table stores, it counts as a read-only tool and runs without pausing for approval, also in read-only mode.
With On error set to Continue with an error envelope, a refusal of the data (a value the database cannot cast, a query that runs past its time limit) completes the node with {"error": true, "message": "…"} instead of failing the run, so a later step can log it. A missing table always fails the run. A query Publicus refuses always fails the run.
Examples
Section titled “Examples”Look up an existing record by email:
SELECT idFROM table_store_d85k0rv160khb1q83lc0WHERE email = :emailLIMIT 1parameters: email → {{ $prev->email }}Pipe the output into a Conditional Exit
with condition count($prev) > 0 to stop the flow when the customer
already exists.
Aggregate across rows:
SELECT COUNT(*) AS total_countFROM table_store_d85k0rv160khb1q83lc0WHERE status = :statusparameters: status → {{ $start->statusFilter }}Related
Section titled “Related”- Table Store Insert and Table Store Upsert write rows.
- Tables covers declaring stores and their columns.
- Database Select queries an external database with bound parameters.