Table

ta

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, boolean, date, json) and constraints (required, unique)
  • Powerful querying: Filter, sort, and paginate data using MongoDB-style operators
  • 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
  • Up to 10,000 rows per table, 100 tables per workspace

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

TypeDescriptionExample Values
stringText data"John Doe", "active"
numberNumeric data42, 99.99
booleanTrue/false valuestrue, false
dateDate/time values"2024-01-15T10:30:00Z"
jsonComplex nested data{"address": {"city": "NYC"}}

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.

Actions

table_insert_row

Insert a new row into a table. IMPORTANT: You must use the

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
dataobjectYesRow data as JSON object

Output

ParameterTypeDescription
successbooleanWhether row was inserted
rowjsonInserted row data
messagestringStatus message

table_batch_insert_rows

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowsarrayYesArray of row data objects (max ${TABLE_LIMITS.MAX_BATCH_INSERT_SIZE} rows)

Output

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

table_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

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
dataobjectYesRow data to insert or update

Output

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

table_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

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
rowIdstringYesRow ID to update
dataobjectYesUpdated row data

Output

ParameterTypeDescription
successbooleanWhether row was updated
rowjsonUpdated row data
messagestringStatus message

table_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: ${TABLE_LIMITS.MAX_BULK_OPERATION_SIZE})

Output

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

table_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

table_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: ${TABLE_LIMITS.MAX_BULK_OPERATION_SIZE})

Output

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

table_query_rows

Query rows from a table with filtering, sorting, and pagination

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID
filterobjectNoFilter conditions (MongoDB-style operators: $eq, $ne, $gt, $gte, $lt, $lte, $in, $nin, $contains, $ncontains, $startsWith, $endsWith, $empty)
sortobjectNoSort order as {field: "asc"|"desc"}
limitnumberNoMaximum rows to return (default: ${TABLE_LIMITS.DEFAULT_QUERY_LIMIT}, max: ${TABLE_LIMITS.MAX_QUERY_LIMIT})
offsetnumberNoNumber of rows to skip (default: 0)

Output

ParameterTypeDescription
successbooleanWhether query succeeded
rowsarrayQuery result rows
rowCountnumberNumber of rows returned
totalCountnumberTotal rows matching filter
limitnumberLimit used in query
offsetnumberOffset used in query

table_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

table_get_schema

Get the schema configuration of a table

Input

ParameterTypeRequiredDescription
tableIdstringYesTable ID

Output

ParameterTypeDescription
successbooleanWhether schema was retrieved
namestringTable name
columnsarrayColumn definitions
messagestringStatus message

Filter Operators

Filters use MongoDB-style operators for flexible querying:

OperatorDescriptionExample
$eqEquals{"status": {"$eq": "active"}} or {"status": "active"}
$neNot equals{"status": {"$ne": "deleted"}}
$gtGreater than{"age": {"$gt": 18}}
$gteGreater than or equal{"score": {"$gte": 80}}
$ltLess than{"price": {"$lt": 100}}
$lteLess than or equal{"quantity": {"$lte": 10}}
$inIn array{"status": {"$in": ["active", "pending"]}}
$ninNot in array{"type": {"$nin": ["spam", "blocked"]}}
$containsString contains (case-insensitive){"email": {"$contains": "@gmail.com"}}
$ncontainsDoes not contain (case-insensitive; matches empty cells){"email": {"$ncontains": "@spam.com"}}
$startsWithStarts with (case-insensitive){"name": {"$startsWith": "Dr."}}
$endsWithEnds with (case-insensitive){"file": {"$endsWith": ".pdf"}}
$emptyCell is empty (true) or non-empty (false){"phone": {"$empty": true}}

Combining Filters

Multiple field conditions are combined with AND logic:

{
  "status": "active",
  "age": {"$gte": 18}
}

Use $or for OR logic:

{
  "$or": [
    {"status": "active"},
    {"status": "pending"}
  ]
}

Sort Specification

Specify sort order with column names and direction:

{
  "createdAt": "desc"
}

Multi-column sorting:

{
  "priority": "desc",
  "name": "asc"
}

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 workspace100
Rows per table10,000
Columns per table50
Max row size100KB
String value length10,000 characters
Query limit1,000 rows
Batch insert size1,000 rows
Bulk update/delete1,000 rows

Notes

  • Category: blocks
  • Type: table
  • 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

On this page