Lake icon

Lake

Read, update, write and delete data from Lake

Overview

This node integrates with Lake (NocoDB) to perform CRUD operations on database tables. It supports creating, retrieving, updating, and deleting rows in specified tables across different API versions of Lake. The node is useful for automating data workflows involving NocoDB databases, such as syncing data from other sources, managing records programmatically, or extracting data for reporting.

Common scenarios include:

  • Automatically inserting new records into a NocoDB table when triggered by external events.
  • Fetching multiple rows or a single row for processing or analysis.
  • Updating existing records based on changes detected elsewhere.
  • Deleting obsolete or unwanted rows in bulk.

Practical example:

  • A user can configure the node to "Get Many" rows from a specific table to retrieve all customer orders, then process them downstream in the workflow.
  • Another use case is to "Create" rows by mapping incoming JSON data fields directly to table columns, enabling seamless data insertion.

Properties

Name Meaning
Authentication Choose the authentication method: either "API Token" or "User Token".
API Version Select the version of the Lake API 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 to operate within.
Base Name or ID (Only for API version 3) Select or specify the base (project) within the workspace.
Project ID (For API versions 1 and 2) Specify the project ID to operate on. For version 2, this can be selected from a list.
Table Name or ID Select or specify the table to operate on. For API versions 2 and 3, this is chosen from a list filtered by the selected project/base. For version 1, it is a string input.
Resource Currently only supports "Row" resource, representing rows in a table.
Operation The action to perform on the row resource: "Create", "Delete", "Get", "Get Many", or "Update".
Data To Send When creating or updating rows, choose whether to auto-map input data fields to table columns or manually specify fields.
Inputs To Ignore When auto-mapping input data, specify any field names to ignore.
Fields UI Field Values When not auto-mapping, specify individual fields and their values to send. Supports binary data upload for attachments.
Download Attachments Option to download file attachments from specified fields when retrieving rows.
Download Field Names Comma-separated list of field names containing attachments to download.
Return All When getting many rows, choose whether to return all rows or limit the number returned.
Limit If not returning all rows, specify the maximum number of rows to retrieve.
Primary Key For delete and update operations, specify which field is the primary key ("id" or custom).
Custom Primary Key If using a custom primary key, specify its name here.

Output

The node outputs an array of JSON objects representing rows affected or retrieved:

  • For Create and Update operations, the output contains the created/updated rows including any IDs or additional fields returned by the API.
  • For Get and Get Many, the output contains the retrieved row(s) as JSON objects.
  • For Delete, the output confirms success or returns error information if deletion failed.
  • If downloading attachments, the output includes binary data fields containing the downloaded files associated with the specified attachment fields.

The output JSON structure corresponds directly to the row data in the Lake database tables, with keys matching column names.

Dependencies

  • Requires an API authentication token or user token credential configured in n8n.
  • Depends on the Lake (NocoDB) API endpoints, which vary by selected API version.
  • Uses helper functions for making HTTP requests and handling pagination.
  • Supports uploading and downloading attachments via multipart/form-data requests to Lake's storage endpoints.

Troubleshooting

  • Error fetching workspaces, bases, or tables: Usually caused by invalid credentials or insufficient permissions. Verify API tokens and access rights.
  • Row not found errors on Get/Delete/Update: Occur if the specified row ID does not exist. Double-check IDs and ensure the row exists.
  • Attachment upload/download failures: May happen if binary data is missing or incorrectly referenced. Ensure binary properties are correctly set and accessible.
  • API version mismatch: Using incorrect API version settings may cause endpoint errors. Confirm the Lake instance version and select the matching API version in the node.
  • Continue on Fail behavior: If enabled, errors for individual items will be captured in output instead of stopping execution, allowing partial success.

Links and References

Discussion