Insert Row
The Insert Rows stage allows you to create one or more new rows in any Supabase table. You can insert a single record or multiple records in one operation.
Input Parameters
| Parameter | Variable | Required | Description |
| Table Name | {{tableName}} | Yes | The name of the table to insert into |
| Body Payload | {{bodyPayload}} | Yes | JSON string containing row data (single object or array) |
Body Payload Format
Single Row:
"{\"field1\": \"value1\", \"field2\": 123}"
Multiple Rows:
"[{\"field1\": \"value1\"}, {\"field1\": \"value2\"}]"
Output
| Output | Variable | Description |
| Inserted Rows | {{insertedRows}} | Array of newly created row objects with generated IDs |
| Success | {{success}} | Boolean indicating if the insert succeeded |
Usage Examples
Example 1: Insert Single Row
| Parameter | Value |
| tableName | customers |
| bodyPayload | "{\"name\": \"John Doe\", \"email\": \"[email protected]\", \"status\": \"active\"}" |
Example 2: Insert with Numbers
| Parameter | Value |
| tableName | products |
| bodyPayload | "{\"sku\": \"PROD-001\", \"name\": \"Widget\", \"price\": 29.99, \"stock\": 100}" |
Example 3: Insert Multiple Rows
| Parameter | Value |
| tableName | categories |
| bodyPayload | "[{\"name\": \"Electronics\", \"sort_order\": 1}, {\"name\": \"Clothing\", \"sort_order\": 2}]" |
Important Notes
- Auto-generated fields like id and created_at don't need to be included
- All required fields (NOT NULL) must be included
- If unique constraint exists, duplicate values will error (use Upsert instead)
Update Rows Stage
Overview
The Update Rows stage allows you to modify existing records in any table based on filter conditions. You can update one or multiple rows.
Input Parameters
| Parameter | Variable | Required | Description |
| Table Name | {{tableName}} | Yes | The name of the table to update |
| Filters | {{filters}} | Yes | Filter string to identify which rows to update |
| Body Payload | {{bodyPayload}} | Yes | JSON string with fields to update |
Output
| Output | Variable | Description |
| Updated Rows | {{updatedRows}} | Array of updated row objects |
| Success | {{success}} | Boolean indicating if the update succeeded |
Usage Examples
Example 1: Update Single Row by ID
| Parameter | Value |
| tableName | users |
| filters | id=eq.123 |
| bodyPayload | "{\"status\": \"active\"}" |
Example 2: Update with Multiple Conditions
| Parameter | Value |
| tableName | inventory |
| filters | warehouse_id=eq.1&product_id=eq.100 |
| bodyPayload | "{\"quantity\": 50}" |
Example 3: Update Multiple Fields
| Parameter | Value |
| tableName | orders |
| filters | order_id=eq.ORD-001 |
| bodyPayload | "{\"status\": \"shipped\", \"shipped_at\": \"2024-12-11\"}" |
Example 4: Update All Matching Rows
| Parameter | Value |
| tableName | products |
| filters | category=eq.electronics |
| bodyPayload | "{\"discount_percent\": 10}" |
Important Notes
- Multiple rows may be updated if filter matches multiple records
- Use specific filters (unique ID) to update exactly one row
- Only include fields you want to change in bodyPayload