Supabase Extended icon

Supabase Extended

Interact with Supabase database and storage

Database → Upsert

AI-generated

Summary

Inserts new rows or updates existing rows in a Supabase table based on conflict resolution columns. Automatically aggregates multiple input items into bulk batches of up to 500 rows.

Inputs

  • table (required) — Name of the database table to operate on.
  • uiMode — Input method: 'simple' (form fields) or 'advanced' (JSON data). Defaults to 'simple'.
  • columns — Column name and value pairs to populate row data when UI Mode is set to 'simple'.
  • jsonData — JSON string defining the row data when UI Mode is set to 'advanced'.
  • onConflict — Comma-separated column name(s) used for conflict resolution (e.g. 'id' or 'company_id,name').
  • deduplicateByConflict — When enabled, removes duplicate input rows matching on conflict columns prior to calling Supabase, retaining the last occurrence.

Output shape

a list of items

Returns each upserted row as an individual n8n item. If no rows are returned by Supabase, outputs a single object with an empty data array, operation type, and table name.

Examples

Example 1: Upsert a user record based on email

Table: 'users', On Conflict Columns: 'email', Columns: mapping 'email' and 'name'

Example 2: Bulk upsert product records from JSON with duplicate removal

UI Mode: 'Advanced', Table: 'products', JSON Data: '={{ $json }}', On Conflict Columns: 'company_id,sku', Remove Duplicate Rows: true

Links

Discussion