NocoDB
Overview
The NocoDB connector enables your AI Colleagues to integrate with your organization's NocoDB platform, facilitating automated database management, record operations, and data workflows.
NocoDB is an open-source, no-code/low-code database platform that transforms databases into smart spreadsheets. It allows users to manage and collaborate on data with a no-code interface. The NocoDB connector allows Leena AI to automate database workflows, manage table records, and interact with NocoDB bases seamlessly.
API Details
Leena AI integrates with NocoDB via REST APIs.
Documentation link: https://docs.nocodb.com/developer-resources/rest-APIs/overview
Setup
The NocoDB connector supports two authentication methods: API Token authentication and User Token authentication.
Prerequisites
Before setting up the NocoDB connector, ensure you have:
- Access to your NocoDB instance (self-hosted or NocoDB Cloud)
- Administrator or appropriate user access to your NocoDB base/project
- Ability to generate API tokens in NocoDB Account Settings
- Access to your Leena AI workspace with connector management permissions
- Knowledge of your NocoDB instance Base URL and Project ID
Get credentials
Method 1: API Token Authentication (Recommended)
Here is how to create an API Token in NocoDB:
- Log in to your NocoDB instance
- Open Account Settings:
- Click on the User menu in the bottom left corner of the sidebar
- Select Account Settings
- Navigate to API Tokens:
- Open the Tokens tab
- Click Add new API token
- Create API Token:
- Enter a descriptive name for your token (e.g., "Leena AI Integration")
- Click Save
- Copy and Save Token:
- Copy the generated API Token immediately
- Store it securely (the token is displayed only once during creation)
Method 2: User Token Authentication
Here is how to use User Token authentication:
- Log in to your NocoDB instance
- Use your NocoDB account email and password for authentication
- Note: User auth tokens are temporary and valid for a session until logout or for 10 hours
Obtain Project ID (Base ID)
Here is how to find your NocoDB Project ID:
- Open your NocoDB project/base in a web browser
- Look at the URL in your browser's address bar
- The Project ID (Base ID) is the alphanumeric identifier prefixed with
pin the URL- Example URL:
https://your-instance.nocodb.com/#/nc/p1234abcd - Project ID:
p1234abcd
- Example URL:
- Alternatively, you can find the Base ID in the base context menu (three dots next to the base name) in the left sidebar
Add connection
Here is how to add a connection on Leena AI:
- Log in to your Leena AI workspace
- Navigate to Settings > Integrations
- Search for "NocoDB" and select it from the list to add its new connector
- Start configuring the connector
- Base URL: Your NocoDB instance URL (e.g.,
https://your-instance.nocodb.comorhttps://app.nocodb.comfor NocoDB Cloud) - Project ID: The Base ID/Project ID from your NocoDB URL (prefixed with
p) - Auth Type: Select the authentication type:
- API Token: For API key-based authentication (recommended)
- User Token: For email/password-based authentication
- Base URL: Your NocoDB instance URL (e.g.,
- If API Token is selected:
- API Token: Enter your NocoDB API Token generated from Account Settings
- If User Token is selected:
- Email: Enter your NocoDB account email address
- Password: Enter your NocoDB account password
- Save the connector configuration
Actions
The following actions are supported for the NocoDB connector:
List Table Records
Retrieves a list of records from a NocoDB table. This action can be leveraged by Leena AI Orchestrator/Agent to list down all the records in a specific table or records matching specific criteria. Here are some common use cases:
- Data Retrieval: Get all records from a table for reporting
- Filtered Search: Find records matching specific criteria using filters
- Paginated Results: Retrieve large datasets in manageable chunks
- Sorted Data: Get records sorted by specific fields
- Selected Fields: Retrieve only specific columns for optimized performance
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table | The table from which to retrieve records (dropdown selection) |
Optional
| Name | Description |
|---|---|
| Limit | The maximum number of records to retrieve |
| Offset | The number of records to skip for pagination |
| Where (Filter) | A SQL-like WHERE clause for filtering records (e.g., (Name,eq,John)) |
| Sort | A comma-separated list of fields to sort by (prefix with - for descending, e.g., Name,-Age) |
| Fields | A comma-separated list of fields to include in the response |
Here is a sample JSON input:
// Basic List Records
{
"tableId": "m1234abcd5678",
"limit": 100,
"offset": 0
}
// Filtered and Sorted Records
{
"tableId": "m1234abcd5678",
"limit": 50,
"offset": 0,
"where": "(Status,eq,Active)",
"sort": "Name,-CreatedAt",
"fields": "Name,Email,Status,CreatedAt"
}
// Paginated Results
{
"tableId": "m1234abcd5678",
"limit": 25,
"offset": 50,
"sort": "Id"
}Response
The action returns a list of table records, each containing:
- Record ID
- Field values for each column in the table
- System fields (created time, updated time, etc.)
- Pagination information
Create Table Records
Creates new records in a NocoDB table. The Agent can leverage the skill (workflow), which has been designed to add new records to a table, once the user provides the record details. Here are some common use cases:
- Data Entry: Add new entries to a database table
- Form Submissions: Capture and store form data
- Bulk Insert: Add multiple records in a single operation
- CRM Updates: Create new customer or contact records
- Event Logging: Log events or activities to a tracking table
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table | The table where new records will be created (dropdown selection) |
| Data | JSON array of record objects to be created, with field names as keys |
Here is a sample JSON input:
// Single Record Creation
{
"tableId": "m1234abcd5678",
"records": [
{
"Name": "John Doe",
"Email": "[email protected]",
"Age": 30,
"Department": "Engineering"
}
]
}
// Multiple Records Creation
{
"tableId": "m1234abcd5678",
"records": [
{
"Name": "John Doe",
"Email": "[email protected]",
"Age": 30,
"Department": "Engineering"
},
{
"Name": "Jane Smith",
"Email": "[email protected]",
"Age": 28,
"Department": "Marketing"
},
{
"Name": "Bob Wilson",
"Email": "[email protected]",
"Age": 35,
"Department": "Sales"
}
]
}Response
Upon successful creation, the action returns the created record details including:
- Record ID(s) of newly created records
- Created field values
- System timestamps (created time)
- HTTP status code indicating success
Update Table Records
Updates existing records in a NocoDB table. The Agent can leverage the skill (workflow), which has been designed to modify existing records in a table, once the user provides the updated record details. Here are some common use cases:
- Data Correction: Fix or update incorrect information
- Status Updates: Change record status or state
- Bulk Updates: Modify multiple records simultaneously
- Profile Updates: Update customer or user information
- Inventory Management: Adjust quantities or availability
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table | The table containing the records to be updated (dropdown selection) |
| Record Data | JSON array of record objects with Id and updated field values |
Here is a sample JSON input:
// Single Record Update
{
"tableId": "m1234abcd5678",
"records": [
{
"Id": "1",
"Name": "John Doe Updated",
"Email": "[email protected]",
"Age": 31
}
]
}
// Multiple Records Update
{
"tableId": "m1234abcd5678",
"records": [
{
"Id": "1",
"Name": "John Doe Updated",
"Age": 31,
"Status": "Active"
},
{
"Id": "2",
"Name": "Jane Smith Updated",
"Age": 29,
"Status": "Active"
}
]
}
// Partial Field Update
{
"tableId": "m1234abcd5678",
"records": [
{
"Id": "5",
"Status": "Completed",
"CompletedDate": "2025-08-27"
}
]
}Response
Upon successful update, the action returns the updated record details including:
- Updated record ID(s)
- Updated field values
- Modification timestamp
- HTTP status code indicating success
Delete Table Records
Deletes a specific record from a NocoDB table. The Agent can leverage the skill (workflow), which has been designed to remove a record from a table, once the user specifies the record to be deleted. Here are some common use cases:
- Data Cleanup: Remove outdated or obsolete records
- User Requests: Delete records upon user request (GDPR compliance)
- Error Correction: Remove erroneously created records
- Archival Process: Delete records after archiving
- Duplicate Removal: Clean up duplicate entries
Input Parameters
Here are the input parameters required to set up this action:
Mandatory
| Name | Description |
|---|---|
| Table | The table containing the record to be deleted (dropdown selection) |
| Record ID | The unique identifier of the record to be deleted |
Here is a sample JSON input:
// Basic Record Deletion
{
"tableId": "m1234abcd5678",
"recordId": "1"
}
// Delete Specific Record
{
"tableId": "m1234abcd5678",
"recordId": "rec_abc123xyz"
}Response
Upon successful deletion, the action returns:
- Confirmation of successful deletion
- Deleted record ID
- HTTP status code indicating success
Updated 2 days ago
