Workflows
Data Table
Read and write a project's Data Table as a workflow step — the register that lets a run remember.
The Data Table node (data_table) reads and writes one of your project's Data Tables: create and change tables, and insert, get, update, upsert and delete rows. It is documented in full in the Data Tables section — The Data Table node covers every operation, mapping, condition and flag, with examples checked against the shipped schema. This page is its entry in the node reference.
Configuration
| Field | Type | Description |
|---|---|---|
resource | table | row | What the operation acts on. See Operations at a glance. |
operation | string | The operation, for example insert, get, update, upsert, bulkUpsert, delete, exists, create, list, rename, addColumn, removeColumn. |
tableId | string | The table, from this workflow's project. See Choosing the table. |
tableName | string | The table's name — kept for display, and the name for Create table. |
columns | list | Create table: the columns, each a name and a type. |
returnExistingIfExists | boolean | Create table: return the table if one by that name exists, instead of failing. |
newTableName | string | Rename table: the new name. |
columnName | string | Add / Remove column: the column. |
columnType | string | Add column: its type. |
mapping | manual | automatic | How a write's cells are set. See Writing cells. |
mappingRows | list | Manual mapping: one row per column. |
automaticSource | object | Automatic mapping: where the values come from. |
conditions | list | Which rows to match. See Conditions. |
conditionMatch | all | any | Whether every condition or any one must hold. |
orderBy | list | Sort order for Get and List tables. |
limit | integer | How many rows or tables to return. |
returnAll | boolean | Get: return every matching row. |
keyColumns | list | Bulk upsert: the column names a row is matched on. See Bulk upsert by key. |
rowsSourceMode | array | file | Bulk upsert and an automatic insert: whether the rows come from an array expression or a file. |
rowsFileExpression | string | The file holding the rows (JSON array or JSONL), when rowsSourceMode is file. |
cursor | string | Get: the nextCursor of a previous page. See Paging with a cursor. |
readOutput | rows | file | Get: a page of rows, or every matching row as one JSONL file. |
dryRun | boolean | Report what a destructive operation would do, without doing it. |
optimizeBulk | boolean | Insert: write many rows in one statement. |
applyToAllRows | boolean | Update / Delete with no conditions: confirm it is meant for every row. |
allowTableDelete | boolean | Delete table: confirm it. |
See Flags and guards for the last five.
Output
| Field | Type | Description |
|---|---|---|
resource | string | table or row. |
operation | string | The operation that ran. |
table.id | string | The table's id. |
table.name | string | The table's name. |
affected | number | Rows (or tables) affected. |
dryRun | boolean | Whether this was a dry run. |
Each operation's own result is described in What the node outputs.
Limits and errors
See Limits and failures.
Example
name: Register contract
description: Adds each new contract to the contract register.
graph:
nodes:
- id: new-contract
type: trigger_form
position: { x: 0, y: 0 }
data:
authMode: none
fields:
- { name: title, label: Contract title, type: text, required: true }
- id: register
type: data_table
position: { x: 280, y: 0 }
data:
resource: row
operation: insert
table: dataTables.contract-register
tableName: Contract register
mapping: manual
mappingRows:
- {
id: map-1,
column: Contract,
value: '{{ trigger.body.title }}',
valueMode: expression,
}
edges:
- { id: contract-to-register, source: new-contract, target: register }In a Package
Declare the table under dataTables: in the manifest; the node references it as dataTables.<name>. See Data Tables in a Package.
- Travels:
resource,operation,tableName,columns,returnExistingIfExists,newTableName,columnName,columnType,mapping,mappingRows,automaticSource,conditions,conditionMatch,orderBy,limit,returnAll,keyColumns,rowsSourceMode,rowsFileExpression,cursor,readOutput,dryRun,optimizeBulk,applyToAllRows,allowTableDelete - Converted:
tableId→table(adataTables.<name>reference) - Never carried: none