Flows/Database Operations

Database Operations

Work with your Base databases, tables, rows, and columns programmatically in your flows.

Database Hierarchy

Base
Tables
Rows
Columns

Base Operations

Base Utilities
Create, manage, and query bases

Create Base

Create a new database with a name and optional description

Get Base

Retrieve base details by ID

List Bases

Get all bases accessible to the user

Search Bases

Find bases by name or description

Table Operations

Create Table
Create a new table with columns

Creates a new table in a base with the specified columns and configuration.

# Example: Create orders table
Base ID: {{#1.baseId}}
Table Name: Orders
Columns:
- customer_name (text)
- amount (number)
- status (select)
- order_date (date)
Get Table Schema
Retrieve table structure and column definitions

Returns the complete schema of a table including all columns, their types, and configurations.

Output:

{
  "id": "tbl_abc123",
  "name": "Customers",
  "columns": [
    { "id": "col_1", "name": "name", "type": "text" },
    { "id": "col_2", "name": "email", "type": "email" },
    { "id": "col_3", "name": "status", "type": "select",
      "options": ["active", "inactive"] }
  ]
}

List Tables

Get all tables in a base

Duplicate Table

Create a copy of a table with data

Import Table

Import CSV/JSON data into table

Delete Table

Permanently delete a table

Row Operations

Append Row
Append a new row to a table

Creates a new row with the specified column values.

# Example: Create customer from webhook
Table: Customers
Columns:
name: {{#1.customer.name}}
email: {{#1.customer.email}}
status: "active"

Output:

{
  "id": "rec_xyz789",
  "name": "John Smith",
  "email": "john@example.com",
  "status": "active",
  "createdAt": "2025-01-15T10:30:00Z"
}
Search Rows
Find rows matching criteria

Search for rows using column conditions. Supports multiple conditions with AND/OR logic.

# Example: Find active customers
Table: Customers
Where:
status = "active"
AND created_at > "2025-01-01"
Limit: 100
Sort: created_at DESC

Common Pattern: Process Search Results

Search RowsIteratorProcess Each
Update Row
Modify an existing row

Updates specific columns on an existing row. Only specified columns are modified; others remain unchanged.

# Example: Update order status
Row ID: {{#1.orderId}}
Columns:
status: "completed"
completed_at: {{nowISO}}
Upsert Row
Create or update based on unique column

Creates a row if it doesn't exist, or updates it if a matching row is found (based on a unique column like email).

# Example: Sync customer from CRM
Table: Customers
Match On: email
Columns:
email: {{#1.email}}
name: {{#1.name}}
last_sync: {{nowISO}}

Perfect for: Syncing data from external systems where you want to update existing rows or create new ones automatically.

Get Row

Retrieve a single row by ID

List Rows

Get all rows in a table

Delete Row

Permanently delete a row

Column Operations

Column Utilities
Manage table columns dynamically

Add Column

Add a new column to a table

Update Column

Modify column name or configuration

Convert Column Type

Change column type (e.g., text to number)

Duplicate Column

Create a copy of an existing column

Supported Column Types:

TextNumberSelectMulti-SelectDateDateTimeCheckboxEmailURLFile

Common Patterns

Webhook to Database

WebhookAppend RowResponse

Receive data via webhook, store in database, return the created row ID.

Data Sync

HTTP RequestIteratorUpsert

Fetch data from external API, iterate through results, upsert each row.

Table Event Handler

Table TriggerIFUpdate Related

When a row changes, check conditions, update related rows.

Database Operations - Flows Guide - Serenities