Actions24
Database → Upsert
AI-generatedSummary
Insert or update rows in a specified database table on Supabase, performing an upsert operation to either add new data or modify existing rows based on matching constraints.
Inputs
- UI Mode (required) — Choose between 'Simple' mode, using form fields to specify columns and values, or 'Advanced' mode, using a JSON object as input data for more flexibility.
- Table (required) — Name of the target table where the upsert operation will be executed, selectable from your database schema or entered manually.
- Columns (required) — In Simple mode, specify one or more columns with their corresponding values to insert or update.
- JSON Data (required) — In Advanced mode, provide a complete JSON object containing the data to upsert in the target table.
Output shape
a list of JSON objects, each representing the result of an upsert operation on individual rows, typically including the inserted or updated data fields
The output includes the rows affected by the upsert operation. If multiple input items are processed, the output list corresponds item-wise. Errors may be included inline if the node is configured to continue on failure.
Examples
Example 1: Upsert a single row in 'users' table with specified column values in Simple mode.
Select 'Database' resource, 'Upsert' operation, choose 'simple' UI mode, select 'users' table, add columns such as 'id' and 'name' with desired values.
Example 2: Upsert multiple rows using JSON objects in Advanced mode.
Select 'Database' resource, 'Upsert' operation, choose 'advanced' UI mode, select the target table, and provide JSON data containing the rows to insert or update.