Grist icon

Grist

Consume the Grist API

Actions5

Record → Upsert

AI-generated

Summary

Upsert records in a specified Grist table by matching on specified columns, updating existing records or creating new ones as needed.

Inputs

  • Organization (required) — Select the Grist organization under which the workspace and documents reside.
  • Workspace (required) — Select the workspace within the chosen organization.
  • Document (required) — Select the document within the organization and workspace.
  • Table (required) — Select the table within the document where records will be upserted.
  • Records (JSON) (required) — Provide a JSON array of record objects each containing a "where" key (criteria columns to match existing records) and a "fields" key (columns and values to update or insert).
  • On Many Matches — Choose the behavior when multiple records match the "where" criteria: update only the first match, update all matches, or skip the operation.
  • Options — Configure additional options such as preventing new record creation when no match is found (No Add) or preventing updates to existing records (No Update).

Output shape

a list containing JSON objects with the upsert operation response from Grist

Each item in the output list corresponds to the API response after upserting records. The response reflects inserts and updates done. No automatic pagination applies since the input is a specified list of records to process.

Links

Discussion