googleSheets.upsertRows matches records by one or more exact header columns, updates existing matches, and appends new keys.
Example
Inputs
Providespreadsheet, source, non-empty exact keyColumns, and one or more records. Every input record must have a non-null value for every key. Partial non-key fields patch existing rows, while omitted fields become null on new rows. inputMode defaults to userEntered.
Second argument { account } selects the Google Account binding.
Output
Returns{ affectedCells, insertedRows, insertedRange?, updatedRowNumbers }. insertedRange is available for ordinary sheets, not native tables. The action fails when existing rows share a composite key or input records contain duplicate keys, preventing ambiguous updates.