NocoDB

1. Overview

The NocoDB connector provides comprehensive access to NocoDB's no-code database platform, enabling table record management, data filtering, and bulk operations through Leena AI Agents.

NocoDB is an open-source no-code platform that transforms databases into smart spreadsheets. The NocoDB connector allows Leena AI to automate database workflows, manage table records, and interact with NocoDB tables seamlessly.

API Details

Leena AI integrates with NocoDB via REST APIs.

Documentation link: https://docs.nocodb.com/


2. Setup

The NocoDB connector supports multiple authentication methods including API Token and User Token (Email/Password) authentication.


A. Prerequisites

Before setting up the NocoDB connector, ensure you have:

  • Access to a NocoDB instance (self-hosted or cloud)
  • NocoDB account with appropriate project permissions
  • Ability to generate API tokens or valid user credentials
  • Access to your Leena AI workspace with connector management permissions
  • Knowledge of your NocoDB instance URL and project structure

B. Get credentials

Here is how to obtain credentials for NocoDB:

Option A: API Token Authentication (Recommended)

  1. Log in to your NocoDB instance
  2. Navigate to project settings or user profile
  3. Go to the API section or generate a new API token:
    1. Click on your profile icon
    2. Select "Account Settings" or "API Tokens"
    3. Click "Generate New Token"
    4. Provide a descriptive name for the token
    5. Set appropriate permissions and expirations
  4. Copy the generated API token
  5. Ensure the API token has necessary permissions for the tables you want to access

Option B: User Token Authentication (Email/Password)

  1. Use your existing NocoDB account credentials
  2. Ensure your account has access to the required projects and tables
  3. Note your email address and password for configuration

C. Add connection

Here is how to add a connection on Leena AI:

  1. Log in to your Leena AI workspace
  2. Navigate to Settings > Integrations
  3. Search for "NocoDB" and select it from the list
  4. Click on Add Connector
  5. Choose your authentication method and configure the connector:

For API Token Authentication:

  1. Base URL: Your NocoDB instance URL (e.g., https://your-instance.nocodb.com)
  2. API Token: Generated API token from previous step
  3. Project ID: Project identifier found in NocoDB project URL

For User Token Authentication:

  1. Base URL: Your NocoDB instance URL (e.g., https://your-instance.nocodb.com)

  2. Email: Your NocoDB account email

  3. Password: Your NocoDB account password

  4. Project ID: Project identifier found in NocoDB project URL

  5. Obtain Project ID:

    1. Open your NocoDB project in a web browser
    2. Look at the URL: https://your-instance.nocodb.com/nc/project_id
    3. The project ID is the identifier in the URL path
    4. Copy this ID for use in the connector configuration
  6. Test Connection:

    1. After entering all required credentials, click Test Connection
    2. The system will validate authentication and project access
    3. If successful, you'll see a green confirmation message
    4. If the test fails, verify your credentials and project permissions
  7. Save Configuration:

    1. Once the connection test passes, click Save
    2. The NocoDB connector is now ready to use in your workflows

3. Actions

The following actions are supported for the NocoDB connector:

A. List Table Records

Retrieves records from a specified NocoDB table with optional filtering and pagination. The Agent can leverage the skill (workflow) 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
  • Filtered Search: Find records matching specific conditions
  • Paginated Results: Retrieve records in batches
  • Sorted Data: Get records in specific order
  • Selected Fields: Retrieve only specific columns

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
TableSelect a table from dropdown. The tables listed would be the ones for which the token has access

Optional

NameDescription
LimitMaximum number of records to return (e.g., 100)
OffsetNumber of records to skip (for pagination, e.g., 201)
whereFilter conditions in NocoDB query format (e.g., (Name,eq,John))
sortSorting criteria as column name (e.g., Name,-Age for ascending Name, then descending Age)
fieldsComma-separated list of fields to include in response (column names)

Here is a sample JSON input:

{
  "Table": "Users",
  "Limit": 100,
  "Offset": 0,
  "where": "(Name,eq,John)",
  "sort": "Name,-Age",
  "fields": "Name,Email,Age"
}

Response

The action returns a list of table records, each containing:

  • Record ID
  • Requested field values
  • Record metadata

B. Create Table Records

Creates new records in a specified NocoDB table. The Agent can leverage the skill (workflow) to add new records to a table once the user provides the record details. Here are some common use cases:

  • Bulk Insert: Add multiple records in a single operation
  • Data Entry: Create new records with field values
  • Form Submissions: Store form data as new records
  • Data Import: Import data from external sources

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
TableThe table to add records to
RecordsArray of record objects to create

Here is a sample JSON input:

 [
    {
      "Name": "John",
      "Age": 25,
      "Email": "[email protected]"
    },
    {
      "Name": "Jane",
      "Age": 30,
      "Email": "[email protected]"
    }
  ]

Response

Upon successful creation, the action returns:

  • Created records with their IDs
  • Record field values
  • Creation timestamp

C. Update Table Records

Updates existing records in a specified NocoDB table. The Agent can leverage the skill (workflow) to modify existing records in a table once the user provides the updated record details. Here are some common use cases:

  • Data Updates: Modify existing record values
  • Bulk Updates: Update multiple records simultaneously
  • Partial Updates: Update specific fields while keeping others unchanged
  • Data Corrections: Fix incorrect or outdated information

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
TableThe table to update records for
RecordsArray of record objects to update

Here is a sample JSON input:

[
    {
      "Id": "1",
      "Name": "John Updated",
      "Age": 26,
      "Email": "[email protected]"
    },
    {
      "Id": "2",
      "Name": "Jane Updated",
      "Age": 31,
      "Email": "[email protected]"
    }
  ]

Response

Upon successful update, the action returns:

  • Updated record details
  • Modified field values
  • Update timestamp

D. Delete Table Records

Deletes a specific record from a NocoDB table. The Agent can leverage the skill (workflow) 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 unnecessary records
  • Record Management: Delete specific records by ID
  • Data Maintenance: Remove duplicate or invalid records

Input Parameters

Here are the input parameters required to set up this action:

Mandatory

NameDescription
TableThe table to delete records from
Record IDThe ID of the record to delete (row number)

Here is a sample JSON input:

{
  "Table": "Users",
  "Record ID": "1"
}

Response

Upon successful deletion, the action returns:

  • Deletion confirmation
  • Deleted record ID
  • Deletion timestamp