Grist icon

Grist

Consume the Grist API

Actions5

Record → Create

AI-generated

Summary

Create one or more new records in a specified table of a Grist document by providing a JSON array of record objects with field values.

Inputs

  • Organization (required) — Select the Grist organization either from a searchable list or by specifying its ID.
  • Workspace (required) — Select the workspace within the selected organization, from a searchable list or by ID.
  • Document (required) — Choose the document within the organization and workspace, selectable from a searchable list or by ID.
  • Table (required) — Select the target table in the document, from a searchable list or by ID.
  • Records (JSON) (required) — Provide a JSON array of records to create, where each record is an object with a "fields" key mapping column names to their respective values.

Output shape

a single JSON object containing the response from the Grist API after creating the records

The API response includes details of the created records. Input JSON can be a string or an array of record objects. Invalid JSON input will cause an error. This operation returns the created records as output.

Examples

Example 1: Create two new records with specified Name and Age fields

Set Organization, Workspace, Document, and Table selectors, then provide a JSON like [{ "fields": { "Name": "Alice", "Age": 30 } }, { "fields": { "Name": "Bob", "Age": 25 } }] in Records (JSON).

Links

Discussion