Worksheets
Store and manage structured data in flexible, spreadsheet-like tables with typed columns, saved views, and event-driven automations.
Key Concepts
Worksheets provide a structured way to store tabular data within Ergon. They work like collaborative spreadsheets — each worksheet is a table with typed columns, and every row represents a single data record. The data model is intentionally simple so it can adapt to a wide range of use cases, from inventory tracking to CRM contact lists.
Folders
Folders are the top-level containers that group related worksheets together. Each folder belongs to a single company and can hold any number of worksheets. A folder carries a name, and optional description, icon, and color, making it easy to organize your workspace the way your team thinks about the data.
Worksheets
A worksheet lives inside a folder and represents a single data table. It defines the schema (via columns) and holds the rows that contain your actual data. You can think of each worksheet as one tab in a traditional spreadsheet application — self-contained, with its own column definitions and row set.
Columns
Columns define the schema of a worksheet. Each column has a name and a field_type. Supported types include text, number, date, checkbox, select, multi_select, formula, worksheet_ref, and more. Columns act as the contract for what data each row can contain — every cell value must conform to the column's type.
Rows
Rows are the individual data records in a worksheet. Each row is identified by a unique ID and ordered by a position value. Rows themselves are lightweight — the actual data lives in cell values, one per row–column intersection.
Cell Values
A cell value is the single piece of data at the intersection of a row and a column. It is stored as a JSON value, which means it can hold a string, number, boolean, array, or object depending on the column type. For example, a multi_select column stores an array of selected values, while a text column stores a plain string.
Column Types
Every column has a field_type that determines what kind of data it accepts and how that data is validated, displayed, and queried.
Basic Types
The foundational types cover most everyday data needs: text for free-form strings, number for integers and decimals, date for timestamps, and checkbox for true/false flags. These types require no additional configuration beyond a name.
Select & Multi-Select
Select columns restrict input to a predefined set of choices, supplied as options.choices — a list of strings. The difference between select and multi_select is straightforward: a select column allows exactly one choice per cell, while a multi_select column allows any number. Choices are managed as part of the column definition and can be added or removed at any time.
Formula
Formula columns compute their values automatically based on an expression you provide in the formula_expression field. Expressions can reference other columns in the same worksheet, perform arithmetic, apply string functions, or use conditional logic. Because formula values are computed, they are read-only — you cannot directly set a cell value on a formula column.
Reference
Reference columns (worksheet_ref) create links between worksheets. The column's reference_config specifies which target worksheet and column the reference points to. When a user fills in a reference cell, they select a row from the target worksheet, establishing a relationship between the two records. This is useful for modeling associations like “each order references a customer” or “each task references a project.”
List Columns
Any column can be turned into a list by setting is_list: true. A list column stores an ordered array of values of its underlying type in a single cell. This is useful when a record needs to hold a variable-length collection — for example, a list of tags, a set of email addresses, or a sequence of steps.
The following example creates a worksheet with several column types:
# 1. Create a folder
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/companies/{company_id}/folders \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"name": "Product Catalog"}'
# 2. Create a worksheet inside the folder
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/folders/{folder_id}/worksheets \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"name": "Inventory"}'
# 3. Add columns
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/columns \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"name": "Product Name", "field_type": "text"}'
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/columns \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{"name": "Price", "field_type": "number"}'
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/columns \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "Category",
"field_type": "select",
"options": {"choices": ["Electronics", "Furniture", "Clothing"]}
}'
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/columns \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "In Stock",
"field_type": "checkbox"
}'You can add, reorder, and remove columns at any time without losing existing row data. Cell values for removed columns are deleted, but adding a new column simply initializes every row with an empty cell for that column.
Views
Views are saved presentation configurations for a worksheet. They control how the data is displayed — which columns are visible, in what order, which filters are active, and how rows are sorted — without changing the underlying data itself.
Each view specifies a type (currently grid) and a config object holding optional filter rules, per-column settings (visibility, order, width), and a sort string. You can create as many views as you need: one for a quick summary, one filtered to a specific category, another sorted by date. Switching between views is instant because the data never changes — only the presentation does.
A view can be marked as is_default to indicate that it should load automatically when someone opens the worksheet. Only one view per worksheet can be the default at a time.
# Create a filtered view showing only in-stock electronics
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/views \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d '{
"name": "In-Stock Electronics",
"type": "grid",
"config": {
"filters": [
{"column_id": "{category_col_id}", "operator": "eq", "value": "Electronics"},
{"column_id": "{in_stock_col_id}", "operator": "eq", "value": true}
],
"columns": [
{"column_id": "{name_col_id}", "visible": true, "position": 0},
{"column_id": "{price_col_id}", "visible": true, "position": 1},
{"column_id": "{category_col_id}", "visible": true, "position": 2}
],
"sort": "{price_col_id}:asc"
},
"is_default": false
}'Views are purely presentational. Editing a cell value while a view is active writes to the same underlying row — there is no separate copy of the data per view.
Import & Export
Worksheets support bulk data operations so you can move data in and out of the platform efficiently. You can import data from CSV or Excel files and export worksheets to the same formats.
Importing Data
When importing, you upload a CSV or Excel file. The platform reads the header row and matches each header to an existing column by name, automatically creating a new text column for any header it doesn't recognize. A new row is then created for each record in the file.
Exporting Data
Exports let you download a worksheet's data as a CSV or Excel file via the format query parameter. This is useful for generating reports, sharing data with external teams, or creating backups.
# Import a CSV file (columns are matched by header name)
curl -X POST https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/import \
-H "Authorization: Bearer {token}" \
-F "[email protected]"
# Export the full worksheet as CSV
curl -X GET https://platform.ergondata.ai/api/v1/worksheets/worksheets/{worksheet_id}/export?format=csv \
-H "Authorization: Bearer {token}" \
-o export.csvImport matches file headers to existing columns by name. Any header that doesn't match an existing column is added as a new text column, so cleaning up your file headers before import keeps your schema tidy.
Automations
Worksheets emit domain events (worksheets.rows.created, worksheets.rows.updated, worksheets.column.updated, …) and accept actions (worksheets.rows.create, worksheets.rows.update_cells, worksheets.rows.delete) that the central Automations service wires together. Authoring rules, conditions, and recursion safeguards all live in the Automations service.
From a folder you only need to grant the automation access to the folder (or to specific worksheets within it); the Automations rule editor will then surface the available trigger events and actions.
This guide covers the core concepts. For complete endpoint documentation, request and response schemas, and additional examples, see the Worksheets API Reference.