Lake icon

Lake

Read, update, write and delete data from Lake

Overview

The "Lake" node allows users to interact with data rows in a database-like environment called Lake (NocoDB backend). Specifically, the "Row" resource with the "Update" operation enables updating existing rows in a specified table. This is useful for automating data modifications, syncing external data sources, or integrating with other systems that require dynamic updates to tabular data.

Typical use cases include:

  • Updating customer records based on new input.
  • Modifying inventory quantities after sales.
  • Syncing updated form submissions into a database table.

For example, you can update multiple rows at once by providing their IDs and new values, either by mapping incoming JSON fields automatically or defining each field explicitly.

Properties

Name Meaning
Authentication Choose the authentication method: "API Token" or "User Token".
API Version Select the API version to use: "Before v0.90.0", "v0.90.0 Onwards", or "v0.200.0 Onwards". This affects endpoint URLs and request formats.
Workspace Name or ID (Only for API version 3) Select or specify the workspace where the base resides.
Base Name or ID (API version 2 and 3) Select or specify the base/project containing the table.
Project ID (API version 1) Specify the project ID as a string.
Table Name or ID Select or specify the table to operate on.
Primary Key Type (API versions 1 and 2) Select the primary key type used for identifying rows: "Default" (id), "Imported From Airtable" (ncRecordId), or "Custom" (specify custom primary key field name).
Field Name (customPrimaryKey) (Shown if Primary Key Type is "Custom") Specify the custom primary key field name.
Row ID Value (id) The value of the primary key field identifying the row to update. Required for each item.
Data to Send Choose how to provide data for update: "Auto-Map Input Data to Columns" (automatically map input JSON fields to columns) or "Define Below for Each Column" (manually specify fields and values).
Inputs to Ignore (If using auto-map) Comma-separated list of input properties to exclude from sending. Leave empty to send all.
Fields to Send (If using manual definition) Define one or more fields with:
- Field Name: target column name
- Is Binary File: whether the field contains binary data
- Field Value: value to set (if not binary)
- Take Input From Field: binary property name (if binary)

Output

The output is an array of JSON objects representing the updated rows. For API versions before v0.90.0, the output includes the sent data with the primary key field. For later versions, the output reflects the updated row data returned by the API, including any server-generated fields.

If binary fields are updated, the node handles uploading the binary content and stores references accordingly.

Example output JSON structure (simplified):

[
  {
    "id": "row-id-value",
    "column1": "updated value",
    "column2": "updated value",
    ...
  },
  ...
]

Dependencies

  • Requires an API authentication token or user token configured in n8n credentials.
  • Depends on the Lake/NocoDB API endpoints, which vary by selected API version.
  • Uses helper functions for API requests and binary data handling.
  • For API version 3, workspace selection may be required.

Troubleshooting

  • Missing or incorrect primary key: The update operation requires the primary key value for each row. If missing or incorrect, the API will reject the update.
  • Invalid table or project/base ID: Ensure the selected table and project/base exist and are accessible with the provided credentials.
  • Binary data upload errors: When updating binary fields, ensure the binary property exists and contains valid file data.
  • API version mismatch: Using an incompatible API version setting may cause endpoint errors or unexpected responses.
  • Error messages like "row could not be updated" indicate the row does not exist or the ID is wrong. Verify IDs carefully.
  • Use the "Continue On Fail" option to handle individual row errors gracefully during bulk updates.

Links and References

Discussion