NocoDB Component
The NocoDB Component lets you read, add, update, or delete records in your NocoDB database directly from the Nappai dashboard. It connects to your NocoDB instance using a saved credential and can be used as a tool for automated agents.
How it Works
When you add the component to a workflow, it uses the NocoDB API credential you set up in Nappai. The component sends HTTP requests to your NocoDB server, performing the operation you choose (Create, Delete, Get, or Update).
If you enable Mapping Mode, the component can handle many records at once: you can feed a list of records, and the component will loop through them, applying the chosen operation to each one.
The component also supports filtering and ordering when you Get records, using a simple formula syntax and an order‑by string.
Operations
This component offers several operations that you can select based on what you need to do. You can only use one operation at a time:
- Create: Add new records to a table.
- Delete: Remove existing records from a table.
- Get: Retrieve records that match a filter.
- Update: Modify existing records in a table.
To use the component, first select the operation you need in the “Operation” field.
Inputs
Mapping Mode
This component has a special mode called “Mapping Mode”. When you enable this mode using the toggle switch, an additional input called “Mapping Data” is activated, and each input field offers you three different ways to provide data:
- Fixed: You type the value directly into the field.
- Mapped: You connect the output of another component to use its result as the value.
- Javascript: You write Javascript code to dynamically calculate the value.
This flexibility allows you to create more dynamic and connected workflows.
Input Fields
The following fields are available to configure this component. Each field may be visible in different operations:
- Records: A list of records to create, update, or delete, structured like NocoDB records.
- Visible in: Create, Delete, Update
- Operation: Choose which action to perform.
- Visible in: Create, Delete, Get, Update
- Access Token: The access token for your NocoDB database.
- Visible in: Create, Delete, Get, Update
- Base Name: The name of the NocoDB base you are working with.
- Visible in: Create, Delete, Get, Update
- formula: Define conditions to filter the records returned by the API.
- Visible in: Get
- Last Access Token: The last access token for your NocoDB database.
- Visible in: Create, Delete, Get, Update
- Limit: The number of records to return. The limit is between 1 and 1000 (inclusive). If left empty, the default is 20 records.
- Visible in: Get
- Mapping Mode: Enable mapping mode to process multiple data records in batch.
- Visible in: Create, Delete, Get, Update
- Order By: Define conditions to order the records returned by the API.
- Visible in: Get
- Table Name: The name of the table you want to interact with.
- Visible in: Create, Delete, Get, Update
- Workspace Name: The name of the workspace that contains the base.
- Visible in: Create, Delete, Get, Update
- Tool Name: The name of the tool that will be used when this component is connected as a tool. This name will be displayed to the agent when it selects tools to use.
- Visible in: Create, Delete, Get, Update
- Tool Description: A detailed description of what this tool does. This description will help the agent understand when and how to use this tool effectively.
- Visible in: Create, Delete, Get, Update
- Tools arguments metadata: Defines the arguments metadata for the tools.
- Visible in: Create, Delete, Get, Update
Credential – This component requires a credential of type NocoDB API.
- Configure the credential in the Nappai credentials section.
- Select that credential in the component’s “Credential” field.
The credential must contain an Access Token (password) and a NocoDB Server Connection URL.
You can find your API key in the Account section of your NocoDB account.
Outputs
- Result: The raw data returned from the NocoDB API (e.g., the created, updated, or retrieved records).
- Tool: A tool representation that can be used by an agent to call this component programmatically.
Usage Example
Create Operation
- Set Operation to Create.
- Choose your Base Name, Table Name, and Workspace Name.
- In Records, paste a JSON array of the records you want to add.
- (Optional) Enable Mapping Mode if you want to create many records in one go.
- Click Run – the component will return the created records in Result.
Get Operation
- Set Operation to Get.
- Choose your Base Name, Table Name, and Workspace Name.
- In formula, enter a filter such as
(status,eq,active)~and(priority,gte,5)
. - Set Limit to 50 if you want more than the default 20 records.
- (Optional) In Order By, enter
-created_at
to sort newest first. - Click Run – the component will return the matching records in Result.
Related Components
- NocoDB Custom – A lower‑level component for advanced NocoDB interactions.
- Data Input – Use to format or validate the records before sending them to NocoDB.
- Data Output – Use to transform the results from NocoDB into a format your next component expects.
Tips and Best Practices
- Keep your Access Token secret; never expose it in public workflows.
- Use Mapping Mode when you need to process large batches of records to reduce the number of API calls.
- Test your formula expressions in the NocoDB UI first to ensure they return the expected records.
- Set a reasonable Limit to avoid pulling too many records at once, which can slow down your workflow.
- When using the component as a tool for an agent, provide a clear Tool Description so the agent knows when to invoke it.
Security Considerations
- The component stores the Access Token securely in the credential.
- Do not share the credential or the token with unauthorized users.
- If you suspect the token has been compromised, revoke it in NocoDB and create a new one.
- Always use HTTPS URLs for the NocoDB Server Connection to protect data in transit.