Update Items By Filter
item.update_whereSet the same field values on EVERY row of one sheet that matches a filter, in ONE call — e.g. "Country = Germany where Country is DE or Deutschland". Prefer it over reading rows and calling item.update_many whenever the rows to change are described by a condition. filter is { operator: AND|OR, conditions: [{ column, operator, value }] } (≤ 10 conditions, operators as in sheet.aggregate) and fields maps field name → ONE literal human value (≤ 30); columns take names or codes and option/member values are matched as in item.update_humanized. File List fields are set per row with item.update_many, not here. Rows already holding the values are left alone; archived and read-only rows are skipped. When more than 20 rows would change, the user confirms first: in a chat on a preview card (the call waits for it); over MCP the call is refused with ROWS_NEED_CONFIRM, the count and a sample, and nothing changes — show the user and call again with confirmRows set to that count only once they accept. At most 1,000 rows per call — narrow the filter otherwise. The change is one batch: item.undo_batch with the returned batchId and sheetId restores the previous values. Returns { batchId, updated, unchanged, skipped, skippedCount, url }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fields | Yes | Attribute name/code → human value, as in item.create_humanized, at most 30 per row. Select/Status/Member/Team/Job values are matched to the sheet's real options. | |
| filter | Yes | ||
| sheetId | Yes | ||
| confirmRows | No | MCP only: the number of rows the user accepted after a ROWS_NEED_CONFIRM refusal. Needed when more than 20 rows would change; never set it before the user agrees. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Panel link to the sheet | |
| batchId | Yes | Id of the batch; pass it with sheetId to item.undo_batch to undo the whole batch. Null when nothing was written | |
| created | Yes | Rows created | |
| sheetId | Yes | Sheet the rows are in | |
| skipped | Yes | Rows left unchanged and why; at most 20 are listed | |
| spaceId | Yes | Space of that sheet; null for a sheet outside a space | |
| stopped | No | Set when a row failed unexpectedly: rows after it were not attempted; the rest stay written | |
| updated | Yes | Rows updated | |
| unchanged | Yes | Matching rows that already held every value | |
| skippedCount | Yes | All rows skipped, including ones not listed | |
| nothingToChange | No | Set when every matching row already held the values |