Table

Tables allow you to create and manage custom data tables directly within Sim. Store, query, and manipulate structured data within your workflows without needing external database integrations.

Why Use Tables?

  • No external setup: Create tables instantly without configuring external databases
  • Workflow-native: Data persists across workflow executions and is accessible from any workflow in your workspace
  • Flexible schema: Define columns with types (string, number, currency, boolean, date, json, select) and constraints (required, unique)
  • Powerful querying: Filter, sort, and paginate data using a typed predicate grammar
  • Agent-friendly: Tables can be used as tools by AI agents for dynamic data storage and retrieval

Key Features:

  • Create tables with custom schemas
  • Insert, update, upsert, and delete rows
  • Query with filters and sorting
  • Batch operations for bulk inserts
  • Bulk updates and deletes by filter

Creating Tables

Tables are created from the Tables section in the sidebar. Each table requires:

  • Name: Alphanumeric with underscores (e.g., customer_leads)
  • Description: Optional description of the table's purpose
  • Schema: Define columns with name, type, and optional constraints

Column Types

See Table column types for the supported types and their storage behavior.

Column Constraints

  • Required: Column must have a value (cannot be null)
  • Unique: Values must be unique across all rows (enables upsert matching)

Usage Instructions

Create and manage custom data tables. Store, query, and manipulate structured data within workflows. Query Rows accepts a plain predicate — {"field":"wins","op":"gte","value":10} — for one condition. Use all (AND) or any (OR) groups for multiple or nested conditions. Operators: eq, ne, gt, gte, lt, lte, in, nin, like, ilike, nlike, nilike, contains, ncontains, startsWith, endsWith, isNull, isNotNull, isEmpty, isNotEmpty. Order is a sort spec [{"field":"wins","direction":"desc"}]. Query Rows returns every matching row when Limit is omitted (fails if the result exceeds 5MB — add a filter or a Limit). With a Limit, responses page: a non-null nextCursor means more rows exist — pass it back as the cursor. Columns to Return narrows each row to the selected columns (by stable id or name; one that no longer exists is skipped); leave it empty for every column.

Actions

Insert Row

Insert a new row into a table. IMPORTANT: You must use the "data" parameter (not "values", "row", "fields", or other variations) to specify the row contents.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
dataobjectYesRow data as JSON object

Output

ParameterTypeDescription
successbooleanWhether row was inserted
rowjsonInserted row data
messagestringStatus message

Batch Insert Rows

Insert multiple rows into a table at once (up to 1000 rows)

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowsarrayYesArray of row data objects (max 1000 rows)

Output

ParameterTypeDescription
successbooleanWhether rows were inserted
rowsarrayInserted rows data
insertedCountnumberNumber of rows inserted
messagestringStatus message

Upsert Row

Insert or update a row based on unique column constraints. If a row with matching unique field exists, update it; otherwise insert a new row. IMPORTANT: You must use the "data" parameter (not "values", "row", "fields", or other variations) to specify the row contents.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
dataobjectYesRow data to insert or update
conflictTargetstringNoUnique column to match on. Required only when the table has more than one unique column.

Output

ParameterTypeDescription
successbooleanWhether row was upserted
rowjsonUpserted row data
operationstringOperation performed: insert or update
messagestringStatus message

Update Row

Update an existing row in a table. Supports partial updates - only include the fields you want to change. IMPORTANT: You must use the "data" parameter (not "values", "row", "fields", or other variations) to specify the fields to update.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowIdstringYesRow ID to update
dataobjectYesUpdated row data

Output

ParameterTypeDescription
successbooleanWhether row was updated
rowjsonUpdated row data
messagestringStatus message

Update Rows by Filter

Update multiple rows that match filter criteria. Data is merged with existing row data.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
filterobjectYesFilter criteria using operators like $eq, $ne, $gt, $lt, $contains, $ncontains, $startsWith, $endsWith, $in, $nin, $empty, etc.
dataobjectYesFields to update (merged with existing data)
limitnumberNoMaximum number of rows to update (default: no limit, max: 1000)

Output

ParameterTypeDescription
successbooleanWhether rows were updated
updatedCountnumberNumber of rows updated
updatedRowIdsarrayIDs of updated rows
messagestringStatus message

Delete Row

Delete a row from a table

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowIdstringYesRow ID to delete

Output

ParameterTypeDescription
successbooleanWhether row was deleted
deletedCountnumberNumber of rows deleted
messagestringStatus message

Delete Rows by Filter

Delete multiple rows that match filter criteria. Use with caution - supports optional limit for safety.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
filterobjectYesFilter criteria using operators like $eq, $ne, $gt, $lt, $contains, $ncontains, $startsWith, $endsWith, $in, $nin, $empty, etc.
limitnumberNoMaximum number of rows to delete (default: no limit, max: 1000)

Output

ParameterTypeDescription
successbooleanWhether rows were deleted
deletedCountnumberNumber of rows deleted
deletedRowIdsarrayIDs of deleted rows
messagestringStatus message

Query Rows

Query rows with a typed predicate filter and cursor pagination. A single filter can be a plain condition: \{"field":"wins","op":"gte","value":10\}. Use all (AND) or any (OR) groups for multiple or nested conditions. Operators: eq, ne, gt, gte, lt, lte, in, nin, like, ilike, nlike, nilike, contains, ncontains, startsWith, endsWith, isNull, isNotNull, isEmpty, isNotEmpty. Order is a sort spec, e.g. [\{"field":"wins","direction":"desc"\}]. Omit limit to return the entire result — the query fails if it exceeds the 5MB budget (narrow with a filter or set a limit). With a limit, a page can end early at the byte budget: a non-null nextCursor means more rows exist — pass it back as cursor to continue; never infer completion from page size.

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
filterjsonNoPredicate condition, e.g. \{"field":"wins","op":"gte","value":10\}. Use all or any for multiple conditions; omit to match all rows.
columnsarrayNoStable column IDs or table column names to include in each row data object. Omit or pass an empty array to return all columns. A reference that matches no column is ignored.
orderjsonNoSort spec, e.g. \[\{"field":"wins","direction":"desc"\}\].
limitnumberNoMaximum rows per page. Omit to return the entire matching result — fails if it exceeds the 5MB budget. With a limit, pages may byte-cut early and set nextCursor when more remain.
cursorstringNoOpaque pagination cursor returned by a prior query. Omit for the first page.

Output

ParameterTypeDescription
successbooleanWhether the query succeeded
rowsarrayQuery result rows
rowCountnumberNumber of rows returned
totalCountnumberTotal rows matching the predicate (computed on the first page only)
limitnumberLimit used in the query
nextCursorstringCursor to fetch the next page, or null on the last page

Get Row

Get a single row by ID

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowIdstringYesRow ID to retrieve

Output

ParameterTypeDescription
successbooleanWhether row was retrieved
rowjsonRow data
messagestringStatus message

Get Schema

Get the schema configuration of a table

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID

Output

ParameterTypeDescription
successbooleanWhether schema was retrieved
namestringTable name
columnsarrayColumn definitions (each includes its stable id)
columnCountnumberNumber of columns
rowCountnumberNumber of rows in the table
maxRowsnumberMax rows per table for the workspace's plan
messagestringStatus message

Filter Operators

A filter is a predicate. One condition is an object naming a column, an operator, and a value:

{"field": "status", "op": "eq", "value": "active"}
OperatorDescriptionExample
eqEquals{"field": "status", "op": "eq", "value": "active"}
neNot equals{"field": "status", "op": "ne", "value": "deleted"}
gtGreater than{"field": "age", "op": "gt", "value": 18}
gteGreater than or equal{"field": "score", "op": "gte", "value": 80}
ltLess than{"field": "price", "op": "lt", "value": 100}
lteLess than or equal{"field": "quantity", "op": "lte", "value": 10}
inIn array{"field": "status", "op": "in", "value": ["active", "pending"]}
ninNot in array{"field": "type", "op": "nin", "value": ["spam", "blocked"]}
contains / ncontainsContains, or does not contain (case-insensitive){"field": "email", "op": "contains", "value": "@gmail.com"}
like / nlikePattern match, * wildcard (case-sensitive){"field": "name", "op": "like", "value": "Dr.*"}
ilike / nilikePattern match, * wildcard (case-insensitive){"field": "name", "op": "ilike", "value": "*jo*"}
startsWithStarts with (case-insensitive){"field": "name", "op": "startsWith", "value": "Dr."}
endsWithEnds with (case-insensitive){"field": "file", "op": "endsWith", "value": ".pdf"}
isNull / isNotNullCell is (not) null{"field": "phone", "op": "isNull"}
isEmpty / isNotEmptyCell is (not) empty{"field": "phone", "op": "isEmpty"}

Most columns are scalar (string, number, boolean, date) or opaque JSON; use ilike with *value* for substring matching on text.

Select columns accept only a subset of these operators, and a query using any other operator on one is rejected rather than returning no rows:

ColumnAllowed operators
Single-selecteq, ne, in, nin, isEmpty, isNotEmpty
Multi-selectcontains, ncontains, isEmpty, isNotEmpty

A multi-select cell holds a list of options, so match it with contains (by option name) rather than ilike.

Combining Filters

Wrap conditions in all for AND:

{
  "all": [
    {"field": "status", "op": "eq", "value": "active"},
    {"field": "age", "op": "gte", "value": 18}
  ]
}

Use any for OR:

{
  "any": [
    {"field": "status", "op": "eq", "value": "active"},
    {"field": "status", "op": "eq", "value": "pending"}
  ]
}

Groups nest, so mixed logic is a group inside a group:

{
  "all": [
    {"field": "status", "op": "eq", "value": "active"},
    {"any": [
      {"field": "plan", "op": "eq", "value": "pro"},
      {"field": "score", "op": "gte", "value": 90}
    ]}
  ]
}

Omit the filter entirely to match every row.

Sort Specification

Order is a list of column/direction pairs, applied in order:

[{"field": "createdAt", "direction": "desc"}]

Multi-column sorting:

[
  {"field": "priority", "direction": "desc"},
  {"field": "name", "direction": "asc"}
]

Pagination

Omit Limit to return every matching row in one response; the query fails if the result exceeds 5MB, so narrow with a filter rather than guessing a limit.

With a Limit, results page. A page can end at the limit or at the 5MB byte budget, whichever comes first, so a short page does not mean the end. Pass the returned nextCursor back as Cursor to fetch the next page and stop only when nextCursor is null — never infer completion from the row count.

Built-in Columns

Every row automatically includes:

ColumnTypeDescription
idstringUnique row identifier
createdAtdateWhen the row was created
updatedAtdateWhen the row was last modified

These can be used in filters and sorting.

Limits

ResourceLimit
Tables per workspaceDepends on workspace plan and deployment settings
Rows per tableDepends on workspace plan and deployment settings
Columns per table1,000
Max row size400KB by default; configurable on self-hosted deployments
String value length10,000 characters
Query limit1,000 rows
Batch insert size1,000 rows
Bulk update/delete1,000 rows

Notes

  • Tables are scoped to workspaces and accessible from any workflow within that workspace
  • Data persists across workflow executions
  • Use unique constraints to enable upsert functionality
  • The visual filter/sort builder provides an easy way to construct queries without writing JSON