Supabase Memory icon

Supabase Memory

AI Agent memory node — save, load, search & delete structured data in any Supabase table with custom field mapping and SQL-like filters.

Update Memory

AI-generated

Overview

The node updates existing records in a specified Supabase table. It supports multiple data mapping modes: manual field-to-column mapping, automatic mapping of input JSON fields to table columns, or providing a raw JSON object. Users can apply SQL-like filters to specify which records to update and optionally return the updated records. This node is useful for scenarios where you need to modify stored data in Supabase based on dynamic or static input, such as updating user session data, agent memory, or any structured data stored in Supabase tables.

Use Case Examples

  1. Updating user session information in a Supabase table by mapping each field manually.
  2. Automatically updating all matching fields in a record using input JSON data.
  3. Providing a raw JSON object to update a record in the table.

Properties

Name Meaning
Table Name The Supabase table to operate on, specified either from a list or by name.
Data Mapping Mode Defines how the data to update is provided: manual field mapping, automatic mapping from input JSON, or raw JSON body.
Field Mappings When using manual mapping mode, this defines the column names and their corresponding values and types to update.
JSON Data Raw JSON object representing the record to update, used when data mapping mode is 'json'.
Filters SQL-like filters to specify which records to update. Multiple filters are combined with AND.
Return Updated Data Whether to return the affected rows after the update operation.

Output

JSON

  • json - The updated records returned from Supabase after the update operation. Each item contains the updated row data.

Dependencies

  • Supabase API credentials including Supabase URL and service role key for authentication.

Troubleshooting

  • Common errors include connection issues to Supabase or invalid table/column names. Verify credentials and table existence.
  • If filters are incorrect or missing, the update may affect unintended rows or none at all. Always specify filters carefully.
    Errors from Supabase API are thrown with descriptive messages, e.g., 'Supabase update error: '. Check the error message for details and correct the input accordingly.

Discussion