The Table node reads and writes rows in your Feather Tables. Use it to store workflow results, look up existing data, or sync records across runs.

## Understanding Tables

Feather Tables are Verdalia's structured storage. Tables can be created with a schema, or start empty and gain schema through explicit column edits or a first JSON import into an empty table. Workflow writes must match the current schema. Think spreadsheets, but queryable and automation-friendly.

Before using this node, create your table in the **Tables** section of the UI and make sure its schema contains the fields the workflow will write. The node references tables by slug—that short identifier you set during creation.

## Operations

### Insert

Adds new rows. Pass the exact JSON object for one row, or an array of exact row objects for multiple. Every insert creates new rows; existing data is never touched. Fields must exist in the table schema and values must match declared types.

Insert does not filter or ignore extra fields. Unknown fields fail with an unknown-column error. Always curate the row by explicitly selecting schema columns, for example `{ "title": input.title, "url": input.url, "status": "new" }`. Never pass or spread a whole upstream object, including patterns such as `{ ...input, status: "new" }`. An upstream node can add a field later; a spread silently forwards it and causes Insert to fail because no matching column exists.

If the input includes `id`, Insert uses that row ID. If `id` is omitted, the table generates one: string-ID tables use ULIDs, numeric-ID tables use sequential IDs. Duplicate IDs fail.

Use when: Ingesting new data. A Reddit scraper drops posts here. A webhook logs incoming events.

### Get

Retrieves a single row by ID. You provide the row's unique identifier, and the node returns that exact row—or fails if it doesn't exist.

Use when: Looking up a specific record. A webhook includes a `row_id` and you need the full row to decide what happens next.

### Upsert

Insert or update, depending on the input. The row object must include `id`. If that row exists, it updates. If not, it inserts with that `id`.

Upsert validates against the table schema. It does not create columns.

For idempotent imports, compute a deterministic `id` from the source record before Upsert. Reusing the same `id` across runs updates the same row instead of creating duplicates.

Use string row IDs when the workflow needs to compute the row ID itself, for example from a Discord message ID, Notion document ID, webhook ID, or compound session key. Use numeric row IDs for append-style tables where Verdalia owns ID allocation.

Use when: Syncing data that might already exist. An enrichment workflow processes leads—new ones get inserted, returning ones get updated.

### Update

Updates an existing row. You must include an `id` field, and the row must already exist.

Only supplied fields are changed, but each supplied field must already exist in the schema.

Use when: You want strict update-only behavior and missing rows should fail.

### Query

Finds rows matching filters. By default, filters come from the node settings. Sorting, limit, and offset always come from the node settings. `limit` is 0..=1000; `0` returns no rows. `offset` is execution pagination and participates in the read-cache identity.

Configured filters are literal values. They are not interpolated, so a `{{ ... }}` template typed into a filter value is compared as that exact text and matches nothing.

Enable **Dynamic filters** when the workflow should supply the full filter list at runtime — this is the only way to filter on a value computed during the run. In dynamic mode the configured filters are ignored entirely, and the input must be a JSON object with an optional `filters` array:

```json
{
  "filters": [
    { "field": "status", "operator": "eq", "value": "new" },
    { "field": "seen", "operator": "eq", "value": false }
  ]
}
```

`filters` is required. An input object that does not carry it fails the run rather than applying no filter at all, because a per-user or per-chat lookup that quietly widens to every row returns another record's data. Matching everything must be written — pass `{ "filters": [] }` — not arrived at by omission.

A filter is `{ "field", "operator", "value" }` and unknown keys are refused. In particular `{ "target", "operand" }` — the vocabulary the `query_table` **tool** speaks — is not this node's, and sending it fails rather than being read as a blank filter. `field` and `operator` are both required; a filter with no operator is refused rather than silently compared with `eq`.

Sending filters on the input while **Dynamic filters** is off also fails, rather than ignoring them and returning every row.

Dynamic mode replaces configured filters; it does not interpolate individual configured filters. `field` is a schema-resolved column name or `id`; a nested or unknown one fails as an unknown target. A blank field is skipped only among *configured* filters, where an unfilled row in the editor is not yet a filter; on the input a blank field is refused. Dynamic `value` preserves JSON string, number, boolean, and `null` primitives, and also carries the arrays and objects the membership operators read. `null` is accepted for `eq` and `neq`, required for `is_null` and `is_not_null`, and rejected for other value-bearing operators. Configured values remain strings: JSON literals become typed primitives, while other text stays text — so a configured `["a","b"]` becomes the list `includes_any`, `in`, and `not_in` need, while a bare `urgent` stays the text `includes` compares against one element. Dynamic filter input must be plain JSON; binary or undefined workflow values are rejected.

Beyond the comparisons, four operators read a collection rather than one value. `includes` tests a JSONB column for membership — one element of an array, or a key and value an object holds — and `includes_any` matches when any listed element is present. `in` and `not_in` test an ordinary column against a set. `contains` is unrelated to all of them: it is a substring of text and applies to no other column type.

```json
{
  "filters": [
    { "field": "tags", "operator": "includes", "value": "urgent" },
    { "field": "status", "operator": "in", "value": ["new", "triaged"] }
  ]
}
```

Against an array column `includes` wraps a single value, so the filter above asks whether `tags` holds `urgent`. Giving it an array instead means *all of* those elements; use `includes_any` for *any of*. `includes_any`, `in`, and `not_in` refuse an empty list rather than matching nothing.

Use when: Pulling batches for processing. "Give me all leads where `status` is `new`, sorted by `priority`, limit 50."

### Read cache

Get and Query can opt into process-local, per-workspace read caching with `cache.time_to_idle_seconds` and `cache.time_to_live_seconds`.

- Both durations must be 60–900 seconds.
- Time to idle must be less than or equal to time to live.
- Cache keys use the resolved table ID, not the slug.
- Cache entries are not shared across backend processes and are lost on restart.
- Missing Get rows still fail and are not cached.
- Insert, Upsert, Update, and Delete ignore cache config and invalidate cached reads for that table after a successful write.

### Limits

`limit` is 0..=1000 on Query. That is the storage ceiling, not a preview convenience: a larger value is refused when the node is saved and again when it runs, never clamped down to a page that silently drops rows. Reading past 1000 rows is `offset`, one page at a time, not a larger `limit`.

Insert, Upsert, Update, and Delete accept at most 1000 items in an input array. A larger batch fails rather than being truncated.

A result set above the workflow offload threshold is written to an execution artifact and read back by the next node with no node-visible difference — the rows arrive as rows. A result above the execution-history inline ceiling is recorded in history as a placeholder instead of the rows, so the run is unaffected but the stored preview is not the data.

### Delete

Removes rows by ID. Pass a single row ID (string for `id_format=string`, integer for `id_format=number`) to delete one row, or an array of row IDs to delete multiple. Returns `true` for single deletions, or an array of booleans for bulk deletions.

**Important**: Bulk delete uses all-or-nothing semantics. If any row in the array doesn't exist, the entire operation fails and no rows are deleted. This ensures data consistency—partial deletions don't leave your dataset in an unexpected state.

Use when: Cleanup workflows. Archiving processed records. Removing stale data after a retention period. Bulk purging of processed items.

## Inputs & Outputs

| Operation | Input | Output Socket | Output Value |
|-----------|-------|---------------|--------------|
| Insert | Exact row object or exact row array | `output` | Array of inserted rows |
| Get | Row ID (string or integer) | `output` | Single row object |
| Upsert | Row object or array | `output` | Array of upserted rows |
| Update | Row object or array | `output` | Array of updated rows |
| Query | Ignored by default. With Dynamic filters: `{ "filters": [...] }` | `output` | Array of matching rows |
| Delete | Row ID (string or integer) or array of row IDs | `output` | `true` or array of `true` |

## Example: Lead Enrichment Pipeline

```
[Cron: Daily 9am]
    ↓
[Table: Query] → filters: status = "new", limit: 20
    ↓
[Loop]
    ↓
[AI: Enrich lead data]
    ↓
[Table: Upsert] → updates each lead with enrichment, sets status = "processed"
```

The Query pulls unprocessed leads. The AI adds company info, scores, whatever. The Upsert writes results back—same rows, now enriched.

## Tips

- **Table and schema must exist first.** The node picker shows available tables; if yours isn't there, create it in the Tables UI. Add columns or infer schema from JSON import before workflow writes.
- **Writes do not create columns.** Insert, Upsert, and Update reject unknown fields and wrong types.
- **Always curate insert rows.** Explicitly select only schema columns. Never pass or spread whole upstream objects into Insert, even when their current shape matches the schema.
- **Query ignores input unless Dynamic filters is enabled.** In dynamic mode, pass the full filter list as `{ "filters": [] }`; configured filters are not interpolated field-by-field.
- **Insert can use supplied or generated IDs.** If `id` is supplied, that value is used. If omitted, string-ID tables use ULID and numeric-ID tables use a sequential ID.
- **Upsert requires `id`.** If the row exists, it updates. If not, it inserts with that `id`.
- **External IDs are valid.** For deterministic lookups, use string row IDs and set `id` to an external resource ID or compound key.
- **Bot form sessions need deterministic IDs.** See [Bot Form State With Feather Tables](../workflows/bot-form-state-with-feather-tables.md).
- **Update needs an existing `id`.** Missing rows fail. Use Upsert if you want insert-on-miss.
- **Get fails on missing rows.** If the ID doesn't exist, the workflow errors. Use Query with an ID filter if you need graceful handling of missing data.
- **Read cache is opt-in.** Enable it only for repeated Get or Query reads where brief staleness before the next table write is acceptable.
