Overview
This node allows updating a row in a NocoDb table. It supports multiple API versions and authentication methods, enabling users to modify existing records by specifying the primary key and the data fields to update. This operation is useful when you want to change or correct data in your NocoDb tables programmatically within an n8n workflow.
Common scenarios include:
- Updating user information in a database after receiving new input.
- Modifying inventory details such as stock levels or prices.
- Correcting or appending data fields based on external triggers or events.
For example, if you have a table of customer orders, you can use this node to update the status of an order from "pending" to "shipped" automatically when a shipment event occurs.
Properties
| Name | Meaning |
|---|---|
| Authentication | Choose the authentication method: "API Token" or "User Token". |
| API Version | Select the version of the NocoDb API to use: "Before v0.90.0", "v0.90.0 Onwards", or "v0.200.0 Onwards". |
| Workspace Name or ID | (Only for API version v0.200.0 Onwards) Select or specify the workspace where the base/project resides. |
| Base Name or ID | (Only for API version v0.200.0 Onwards) Select or specify the base/project within the workspace. |
| Project ID | (For older API versions) The ID of the project/base containing the table. |
| Table Name or ID | The target table to update rows in. Can be selected from a list or specified by ID. |
| Primary Key Type | Defines which field is used as the primary key for identifying rows: "Default" (id), "Imported From Airtable" (ncRecordId), or "Custom" (user-defined primary key field). |
| Field Name (customPrimaryKey) | When using a custom primary key type, specify the name of the primary key field here. |
| Row ID Value (id) | The value of the primary key for the row to update. Required to identify which row to modify. |
| Data to Send | How to provide the data to update: either "Auto-Map Input Data to Columns" (automatically map incoming JSON properties to columns) or "Define Below for Each Column" (manually specify fields and values). |
| Inputs to Ignore | (When using auto-map mode) Comma-separated list of input properties to exclude from being sent to NocoDb. |
| Fields to Send | (When defining fields manually) A collection of fields with their names and values to update. Supports both text and binary data fields. |
Output
The output is a JSON array representing the updated rows. Each item corresponds to one input item processed and contains the updated data fields including the primary key. For API version 3, the response merges the server's returned data with the sent data.
If binary data fields are included, the node uploads the files first and stores references to them in the respective fields as JSON strings.
Example output structure (simplified):
[
{
"id": "123",
"name": "Updated Name",
"status": "active",
"_action": "updated"
}
]
Dependencies
- Requires access to a NocoDb instance with appropriate permissions.
- Needs either an API token or user token for authentication.
- Depending on the API version, requires configuration of workspace and base/project IDs.
- Uses internal helper functions to handle HTTP requests and file uploads.
- For binary fields, the node uploads files to NocoDb storage endpoints before updating the row.
Troubleshooting
- Row Not Found Errors: If the specified row ID does not exist, the node may throw an error indicating the row could not be updated. Ensure the primary key value is correct and the row exists.
- Authentication Failures: Incorrect or missing API tokens/user tokens will cause authentication errors. Verify credentials are correctly configured.
- Field Mapping Issues: When using auto-map mode, ensure that input JSON property names exactly match the column names in NocoDb. Use an "Edit Fields" node beforehand if necessary.
- Binary Upload Failures: If uploading binary data fails, check that the binary property names are correct and that the files exist in the input.
- API Version Mismatch: Using incorrect API version settings may lead to unexpected endpoint errors. Confirm the NocoDb instance version and select the matching API version in the node settings.