# NocoDB

> Find, create and update records in your NocoDB tables, link them and attach files, on NocoDB Cloud or your own server.

App · Databases · 15 actions. Web page: https://docs.lodol.com/docs/integrations/nocodb

## Actions

### Add a field

Add a field of any common type to a table. On NocoDB Cloud this needs a token whose Fields permission is 'Read & write'.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Field name (`field_name`, text, required): What to call the field, such as Renewal date.
- Type (`field_type`, text, required): What the field holds. One of: `text`, `long_text` (Long text), `number` (Whole number), `decimal`, `currency`, `percent`, `rating`, `checkbox`, `date`, `datetime` (Date & time), and 11 more. Default: `text`.
- Choices (`choices`, list): The options to choose from, for a select field.
- Linked table (`linked_table_id`, text): The table to link to, for a Links field.

**Outputs**

- `choices` (list): Its choices, for a select field.
- `id` (text): The new field's ID.
- `linked_table_id` (text): The table it links to, for a Links field.
- `title` (text): Its name.
- `type` (text): What it holds.

**Example output**

```json
{
  "id": "c9",
  "title": "Renewal date",
  "type": "Date"
}
```

### Attach a file to a record

Add a file to a record's Attachment field, alongside any files already there. Files up to 7 MB.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.
- Attachment field (`attachment_field`, text, required): The field to add the file to.
- File (`file`, text, required): Upload a file, pick one from an earlier step, or paste a link to one.
- File name (`file_name`, text): What to call the file in NocoDB, such as invoice.pdf. Leave blank to keep its own name.

**Outputs**

- `attachment` (object): The file just added: its title, a url that opens it, its type and size.
- `attachments` (list): Every file the field holds now.
- `field` (text): The Attachment field.
- `id` (number): The record the file was added to.

**Example output**

```json
{
  "attachment": {
    "mimetype": "application/pdf",
    "size": 48213,
    "title": "contract.pdf",
    "url": "https://app.nocodb.com/dltemp/abc/contract.pdf"
  },
  "attachments": [
    {
      "mimetype": "application/pdf",
      "size": 48213,
      "title": "contract.pdf",
      "url": "https://app.nocodb.com/dltemp/abc/contract.pdf"
    }
  ],
  "field": "Contract",
  "id": 12
}
```

### Create a record

Add a record to a table. It comes back as NocoDB saved it, with its new ID.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Field values (`fields`, object, required): A value for each field to fill in. Leave a field blank to leave it empty.

**Outputs**

- `fields` (object): The record's values, by field name. Checkboxes read true or false, dates 2026-03-01, date-times in ISO 8601, links as the linked records, and attachments as files with a url.
- `id` (number): The record's ID, which the other record actions take.

**Example output**

```json
{
  "fields": {
    "CreatedAt": "2026-03-01T09:30:00+00:00",
    "Done": true,
    "Due": "2026-03-01",
    "Email": "ada@example.com",
    "Name": "Ada Lovelace",
    "Status": "Closed",
    "Tags": [
      "VIP",
      "Newsletter"
    ]
  },
  "id": 12
}
```

### Create a table

Add a table to a base, with text fields named as you list them. Add fields of other types with 'Add a field'. On NocoDB Cloud this needs a token whose Tables permission is 'Read & write'.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table name (`table_name`, text, required): What to call the table, such as Leads.
- Field names (`field_names`, list): One name per field, in order. The first one becomes the name NocoDB shows for each record.

**Outputs**

- `fields` (list): Its fields, each with id, title and type.
- `id` (text): The new table's ID.
- `title` (text): Its name.

**Example output**

```json
{
  "fields": [
    {
      "id": "c1",
      "title": "Id",
      "type": "ID"
    },
    {
      "id": "c2",
      "title": "Name",
      "type": "Text"
    }
  ],
  "id": "m4f9t2c8v1b6n3x",
  "title": "Leads"
}
```

### Create or update a record

Update the record whose field has a given value, such as an email address, or create it when there isn't one. The result says which happened.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Match on (`match_field`, text, required): The field that identifies the record, such as Email or Order number. Its values should be unique.
- Match value (`match_value`, text, required): The value that field has, such as ada@example.com.
- Field values (`fields`, object): The values to save, whether the record is found or created. Leave a field blank to leave it as it is.

**Outputs**

- `created` (true/false): True when the record was created, false when an existing one was updated.
- `fields` (object): The record's values, by field name. Checkboxes read true or false, dates 2026-03-01, date-times in ISO 8601, links as the linked records, and attachments as files with a url.
- `id` (number): The record's ID, which the other record actions take.

**Example output**

```json
{
  "created": false,
  "fields": {
    "CreatedAt": "2026-03-01T09:30:00+00:00",
    "Done": true,
    "Due": "2026-03-01",
    "Email": "ada@example.com",
    "Name": "Ada Lovelace",
    "Status": "Closed",
    "Tags": [
      "VIP",
      "Newsletter"
    ]
  },
  "id": 12
}
```

### Delete a record

Permanently delete one record from a table.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.

**Outputs**

- `deleted` (true/false): Whether it was deleted.
- `id` (number): The deleted record's ID.

**Example output**

```json
{
  "deleted": true,
  "id": 12
}
```

### Delete a table

Permanently delete a table and every record in it. On NocoDB Cloud this needs a token whose Tables permission is 'Read & write'.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.

**Outputs**

- `deleted` (true/false): Whether it was deleted.
- `id` (text): The deleted table's ID.
- `title` (text): Its name.

**Example output**

```json
{
  "deleted": true,
  "id": "m4f9t2c8v1b6n3x",
  "title": "Leads"
}
```

### Find records

Get the records in a table that meet a condition, such as Status is Open or Due is before a date. Leave the condition blank to get every record. For anything more involved, save a view in NocoDB and start from it.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- View (`view_id`, text): Only the records a saved view shows, in its order. Leave blank to search the whole table.
- Where (`filter_field`, text): The field to check. Leave blank to get every record.
- Condition (`condition`, text): How the field is compared with the value. One of: `equals` (is), `not_equals` (is not), `contains`, `not_contains` (does not contain), `greater` (is greater than / after), `less` (is less than / before), `at_least` (is at least / on or after), `at_most` (is at most / on or before), `empty` (is empty), `not_empty` (is not empty). Default: `equals`.
- Value (`value`, text): What to compare the field with. Dates go in as 2026-03-01, checkboxes as yes or no, and several choices separated by commas. Not needed for 'is empty'.
- Sort by (`sort_field`, text): The field to put the records in order by.
- Order (`sort_direction`, text): Which way to sort. One of: `ascending` (A → Z, smallest or oldest first), `descending` (Z → A, largest or newest first). Default: `ascending`.
- Maximum records (`max_records`, number): The most records to return, up to 1,000. From 1 to 1000. Default: `100`.

**Outputs**

- `count` (number): How many records came back.
- `has_more` (true/false): True when more records match than 'Maximum records' let through.
- `records` (list): The matching records.

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "records": [
    {
      "fields": {
        "CreatedAt": "2026-03-01T09:30:00+00:00",
        "Done": true,
        "Due": "2026-03-01",
        "Email": "ada@example.com",
        "Name": "Ada Lovelace",
        "Status": "Closed",
        "Tags": [
          "VIP",
          "Newsletter"
        ]
      },
      "id": 12
    }
  ]
}
```

### Get a record

Get one record by its ID, with every field's value.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.

**Outputs**

- `fields` (object): The record's values, by field name. Checkboxes read true or false, dates 2026-03-01, date-times in ISO 8601, links as the linked records, and attachments as files with a url.
- `id` (number): The record's ID, which the other record actions take.

**Example output**

```json
{
  "fields": {
    "CreatedAt": "2026-03-01T09:30:00+00:00",
    "Done": true,
    "Due": "2026-03-01",
    "Email": "ada@example.com",
    "Name": "Ada Lovelace",
    "Status": "Closed",
    "Tags": [
      "VIP",
      "Newsletter"
    ]
  },
  "id": 12
}
```

### Link records

Link a record to records in another table through a Links field, such as a contact to their company. Links it already has are kept.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.
- Links field (`link_field`, text, required): The field that links this table to the other one.
- Linked record IDs (`linked_record_ids`, list, required): The IDs of the records in the other table, such as 4 and 7.

**Outputs**

- `field` (text): The Links field.
- `id` (number): The record the links belong to.
- `linked` (number): How many records were linked.
- `linked_records` (list): Every record the field links to now, each with its id.

**Example output**

```json
{
  "field": "Company",
  "id": 12,
  "linked": 1,
  "linked_records": [
    {
      "fields": {
        "Company": "Acme Inc."
      },
      "id": 4
    }
  ]
}
```

### List bases

List every base the connection can open.

**Inputs**: None.

**Outputs**

- `bases` (list): The bases.
- `count` (number): How many bases there are.

**Example output**

```json
{
  "bases": [
    {
      "id": "p8x2kq7w1m3n5r0",
      "title": "CRM",
      "workspace": "Acme"
    }
  ],
  "count": 1
}
```

### List fields

List a table's fields with their types and choices, and the views saved on it.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.

**Outputs**

- `count` (number): How many fields there are.
- `display_field` (text): The field NocoDB shows as each record's name.
- `fields` (list): The fields, in the table's order.
- `table` (text): The table's name.
- `views` (list): The views saved on the table, each with its id, title and type.

**Example output**

```json
{
  "count": 3,
  "display_field": "Name",
  "fields": [
    {
      "can_write": false,
      "id": "c1",
      "title": "Id",
      "type": "ID"
    },
    {
      "can_write": true,
      "id": "c2",
      "title": "Name",
      "type": "Text"
    },
    {
      "can_write": true,
      "choices": [
        "Active",
        "Churned"
      ],
      "id": "c3",
      "title": "Status",
      "type": "Single select"
    }
  ],
  "table": "Contacts",
  "views": [
    {
      "id": "vw1",
      "title": "Contacts",
      "type": "grid"
    }
  ]
}
```

### List tables

List the tables in a base.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.

**Outputs**

- `count` (number): How many tables there are.
- `tables` (list): The tables.

**Example output**

```json
{
  "count": 1,
  "tables": [
    {
      "id": "m4f9t2c8v1b6n3x",
      "title": "Contacts"
    }
  ]
}
```

### Unlink records

Remove links between a record and records in another table. The records themselves aren't deleted.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.
- Links field (`link_field`, text, required): The field that links this table to the other one.
- Linked record IDs (`linked_record_ids`, list, required): The IDs of the records in the other table, such as 4 and 7.

**Outputs**

- `field` (text): The Links field.
- `id` (number): The record the links belong to.
- `linked_records` (list): Every record the field links to now, each with its id.
- `unlinked` (number): How many links were removed.

**Example output**

```json
{
  "field": "Company",
  "id": 12,
  "linked_records": [],
  "unlinked": 1
}
```

### Update a record

Change some fields of one record. Fields left blank keep what they have.

**Inputs**

- Base (`base_id`, text, required): The NocoDB base to work in.
- Table (`table_id`, text, required): The table to work in.
- Record ID (`record_id`, text, required): The record's ID. 'Find records' and 'Create a record' return it as 'id'.
- Field values (`fields`, object, required): The fields to change and their new values. Leave a field blank to keep what it already has.

**Outputs**

- `fields` (object): The record's values, by field name. Checkboxes read true or false, dates 2026-03-01, date-times in ISO 8601, links as the linked records, and attachments as files with a url.
- `id` (number): The record's ID, which the other record actions take.

**Example output**

```json
{
  "fields": {
    "CreatedAt": "2026-03-01T09:30:00+00:00",
    "Done": true,
    "Due": "2026-03-01",
    "Email": "ada@example.com",
    "Name": "Ada Lovelace",
    "Status": "Closed",
    "Tags": [
      "VIP",
      "Newsletter"
    ]
  },
  "id": 12
}
```
