Table Block
User-defined data tables
The Table block lets you create and manage custom data tables, storing, querying, and manipulating structured data directly inside a workflow. Reach for it when you need persistent, queryable state that outlives a single block run.
Overview
| Property | Value |
|---|---|
| Type | table |
| Category | blocks |
| Color | #10B981 |
When to Use
- Persist structured records (users, leads, events) that other steps or future runs can read back.
- Query rows with filters, sorting, and pagination to drive downstream logic.
- Insert single rows, batch-insert many rows, or upsert to avoid duplicates.
- Update or delete rows either by their row ID or by a filter that matches many rows at once.
- Fetch a row by ID to pass its data to a later block in the workflow.
- Inspect a table's schema (name and column definitions) dynamically at runtime.
Configuration
Operation
Dropdown (required). Selects the action to perform. Defaults to query_rows.
| Label | ID |
|---|---|
| Query Rows | query_rows |
| Insert Row | insert_row |
| Upsert Row | upsert_row |
| Batch Insert Rows | batch_insert_rows |
| Update Rows by Filter | update_rows_by_filter |
| Delete Rows by Filter | delete_rows_by_filter |
| Update Row by ID | update_row |
| Delete Row by ID | delete_row |
| Get Row by ID | get_row |
| Get Schema | get_schema |
Table ID
Required for every operation. The identifier of the target table (e.g. tbl_customers).
Row ID
Required for get_row, update_row, and delete_row. Identifies a single row (e.g. row_xxxxx).
Row Data (JSON)
A JSON object of column/value pairs. Required for insert_row, upsert_row, update_row, and update_rows_by_filter. Example: {"email": "alice@example.com", "age": 30}.
When using block references in a JSON value, wrap them in double quotes: {"name": "{{prev_block.name}}"}.
Rows Data (Array of JSON)
An array of row objects for batch_insert_rows. Example: [{"email": "a@x.com"}, {"email": "b@x.com"}].
Filter (JSON)
A JSON filter object. Behaviour differs by operation:
- For
query_rows— optional; narrows which rows are returned. - For
update_rows_by_filteranddelete_rows_by_filter— required; selects which rows are affected.
Supported operators:
| Operator | Meaning | Example |
|---|---|---|
$eq | Equals | {"status": {"$eq": "active"}} or {"status": "active"} |
$ne | Not equals | {"status": {"$ne": "archived"}} |
$gt | Greater than | {"age": {"$gt": 18}} |
$gte | Greater than or equal | {"score": {"$gte": 100}} |
$lt | Less than | {"stock": {"$lt": 10}} |
$lte | Less than or equal | {"rating": {"$lte": 3}} |
$in | Value in array | {"tier": {"$in": ["gold", "platinum"]}} |
$nin | Value not in array | {"tier": {"$nin": ["free"]}} |
$contains | String contains | {"email": {"$contains": "@example.com"}} |
Sort (JSON)
Sort order for query_rows only. Format: {"column_name": "asc" | "desc"}. Example: {"createdAt": "desc", "name": "asc"}.
Limit
Maximum number of rows to return or affect. Applies to query_rows (default 100), update_rows_by_filter, and delete_rows_by_filter.
Offset
Number of rows to skip before returning results. Applies to query_rows only (default 0).
Inputs & Outputs
Inputs — every field that can be wired into the block:
operation(string) — Table operation to performtableId(string) — Table identifierdata(json) — Row data for insert/updaterows(json) — Array of row data for batch insertrowId(string) — Row identifier for ID-based operationsfilter(json) — Filter criteria for query/update/delete operationssort(json) — Sort order (JSON)limit(number) — Query or bulk operation limitoffset(number) — Query result offset
Outputs — fields available on {{table_1.<field>}} in downstream blocks:
success(boolean) — Operation success statusrow(json) — Single row data (returned byget_row,insert_row,upsert_row,update_row)operation(string) — Operation performed (insertorupdate) —upsert_rowonlyrows(json) — Array of rows (returned byquery_rows,batch_insert_rows)rowCount(number) — Number of rows returned (query_rows)totalCount(number) — Total rows matching the filter (query_rows)insertedCount(number) — Number of rows inserted (batch_insert_rows)updatedCount(number) — Number of rows updated (update_rows_by_filter)updatedRowIds(json) — IDs of updated rows (update_rows_by_filter)deletedCount(number) — Number of rows deleted (delete_row,delete_rows_by_filter)deletedRowIds(json) — IDs of deleted rows (delete_rows_by_filter)name(string) — Table name (get_schema)columns(json) — Column definitions (get_schema)message(string) — Operation status message
Tools
Each operation maps to a dedicated internal tool. The block selects the correct tool automatically based on the operation field.
- Insert Row (
table_insert_row) — Inserts a single new row into the table using thedataparameter. - Upsert Row (
table_upsert_row) — Inserts or updates a row based on unique column constraints. Returns which operation (insertorupdate) was performed. - Batch Insert Rows (
table_batch_insert_rows) — Inserts multiple rows at once from an array of row objects. - Update Row (
table_update_row) — Updates a single row by its row ID. Supports partial updates (only include fields to change). - Update Rows by Filter (
table_update_rows_by_filter) — Updates all rows matching the filter criteria. Merged with existing row data. - Delete Row (
table_delete_row) — Deletes a single row by its row ID. - Delete Rows by Filter (
table_delete_rows_by_filter) — Deletes all rows matching the filter criteria. Supports an optionallimitfor safety. - Query Rows (
table_query_rows) — Retrieves rows with optional filter, sort, limit, and offset. Returnsrows,rowCount, andtotalCount. - Get Row (
table_get_row) — Retrieves a single row by its row ID. - Get Schema (
table_get_schema) — Returns the table's name and column definitions.
YAML Example
table_1:
type: table
name: "Table"
inputs:
operation: "query_rows"
tableId: "tbl_customers"
filter: '{"status": {"$eq": "active"}}'
sort: '{"createdAt": "desc"}'
limit: 100
offset: 0
connections:
outgoing:
- target: next-block-id