Upsert Record
upsert_recordAdd a row to a pane's record collection, or return the existing row if the record key already exists. Use to insert todos, line items, comments, and more.
Instructions
Create a row in a pane's record collection, or return the existing row if record_key is already present (deduped:true). Use to add a todo, a line item, a comment, etc. The collection must be declared in the pane's record schema with 'agent' allowed to write. If you're still designing the pane, call get_skill first for the records-vs-events decision and the x-pane-collections schema grammar. Returns { record, deduped }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The record body — any JSON value valid against the collection schema. | |
| pane_id | Yes | The pane id. | |
| collection | Yes | The record collection name. | |
| record_key | No | Optional stable key. Reusing an existing key returns the existing row (deduped:true). |