---
title: "Insert Row"
url: "https://help.flows.world/en/article/insert-row"
language: "en"
last_updated: "2025-12-12T01:28:52.419Z"
---

# 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\\": \\"john@example.com\\", \\"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
