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

ParameterVariableRequiredDescription
Table Name{{tableName}}YesThe name of the table to insert into
Body Payload{{bodyPayload}}YesJSON string containing row data (single object or array)


 

Body Payload Format

Single Row:

"{\"field1\": \"value1\", \"field2\": 123}"

Multiple Rows:

"[{\"field1\": \"value1\"}, {\"field1\": \"value2\"}]"


 

Output

OutputVariableDescription
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

ParameterValue
tableNamecustomers
bodyPayload"{\"name\": \"John Doe\", \"email\": \"[email protected]\", \"status\": \"active\"}"


 

Example 2: Insert with Numbers

ParameterValue
tableNameproducts
bodyPayload"{\"sku\": \"PROD-001\", \"name\": \"Widget\", \"price\": 29.99, \"stock\": 100}"


 

Example 3: Insert Multiple Rows

ParameterValue
tableNamecategories
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

ParameterVariableRequiredDescription
Table Name{{tableName}}YesThe name of the table to update
Filters{{filters}}YesFilter string to identify which rows to update
Body Payload{{bodyPayload}}YesJSON string with fields to update


 

Output

OutputVariableDescription
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

ParameterValue
tableNameusers
filtersid=eq.123
bodyPayload"{\"status\": \"active\"}"


 

Example 2: Update with Multiple Conditions

ParameterValue
tableNameinventory
filterswarehouse_id=eq.1&product_id=eq.100
bodyPayload"{\"quantity\": 50}"


 

Example 3: Update Multiple Fields

ParameterValue
tableNameorders
filtersorder_id=eq.ORD-001
bodyPayload"{\"status\": \"shipped\", \"shipped_at\": \"2024-12-11\"}"


 

Example 4: Update All Matching Rows

ParameterValue
tableNameproducts
filterscategory=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

Was this article helpful?