# AITable

> Work with your AITable spaces: find datasheets, create datasheets and fields, list, search, create, update and delete records, and upload files for attachment fields.

App · 19 actions. Web page: https://docs.lodol.com/docs/integrations/aitable

## Actions

### Create datasheet

Create a datasheet in a space, at the top or in a folder, with text fields of the names you give. The first is the primary field. With none, AITable adds three default fields.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.
- Name (`name`, text, required): The datasheet's name, at most 100 characters.
- Description (`description`, text): What the datasheet is for, at most 500 characters.
- Folder (`folder_id`, text): Where to put it. Leave empty for the top of the space.
- Field names (`field_names`, list): The names of the text fields to start with, one per row. Other field types can be added afterwards.

**Outputs**

- `created_at` (text): When it was created (UTC)
- `datasheet_id` (text): The new datasheet's id, to use as datasheet_id in other steps
- `fields` (list): The fields it starts with
- `name` (text): The datasheet's name

**Example output**

```json
{
  "created_at": "2026-10-15T09:00:00Z",
  "datasheet_id": "dstbs2U7mt8AEqgKuh",
  "fields": [
    {
      "id": "fldupsvkR2ATB",
      "name": "Title"
    }
  ],
  "name": "Customers"
}
```

### Create field

Add a field (column) to a datasheet: text, number, currency, percent, date, checkbox, rating, select, website, phone, email or attachment. Only managers of the datasheet can add fields.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.
- Datasheet (`datasheet_id`, text, required): The datasheet in that space. Pick one or give its id.
- Field name (`name`, text, required): The new field's name, at most 100 characters.
- Type (`field_type`, text, required): What the field holds. It cannot be changed from a step later. One of: `SingleText` (Single-line text), `Text` (Long text), `Number`, `Currency`, `Percent`, `DateTime` (Date), `Checkbox`, `Rating`, `SingleSelect` (Single select), `MultiSelect` (Multiple select), and 4 more.
- Choices (`options`, list): The choices people can pick from, one per row. Only when Type is Single select or Multiple select.
- Decimal places (`precision`, number): How many decimals to show, 0 to 4. Currency defaults to 2. Only when Type is Number, Currency or Percent. From 0 to 4.
- Unit or currency symbol (`symbol`, text): Shown beside the value, such as $ or kg. Currency defaults to $. Only when Type is Number or Currency.
- Highest rating (`rating_max`, number): The top of the scale, 1 to 10. The default is 5. Only when Type is Rating. From 1 to 10.
- Include time (`include_time`, true/false): Store a time of day as well as the date. Only when Type is Date. Default: `false`.

**Outputs**

- `field_id` (text): The new field's id, to use as field_id in other steps
- `name` (text): The field's name
- `type` (text): The field's type

**Example output**

```json
{
  "field_id": "fldupsvkR2ATB",
  "name": "Status",
  "type": "SingleSelect"
}
```

### Create record

Add a record to a datasheet. Fields left empty stay blank; text is turned into numbers, checkboxes, choices and dates for the field's type.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Fields (`fields`, object, required): The value for each field. Leave a field empty to leave it out; calculated fields are not offered.

**Outputs**

- `created_at` (text): When it was created (UTC)
- `fields` (object): The record's values by field name
- `record_id` (text): The record's id, to use as record_id in other steps
- `updated_at` (text): When it last changed (UTC)

**Example output**

```json
{
  "created_at": "2026-10-15T09:00:00Z",
  "fields": {
    "Title": "Acme"
  },
  "record_id": "recV3ElniQavTNyJG",
  "updated_at": "2026-10-15T09:00:00Z"
}
```

### Create records

Add up to 10 records in one step. Give a list with one object of field names and values per record.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Records (`records`, list, required): A list of up to 10 objects, each a record's values by field name, such as [{"Name": "Ada"}, {"Name": "Grace"}].

**Outputs**

- `count` (number): How many were returned
- `records` (list): The records

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "created_at": "2026-10-15T09:00:00Z",
      "fields": {
        "Title": "Acme"
      },
      "record_id": "recV3ElniQavTNyJG",
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ]
}
```

### Delete field

Delete a field and every value stored in it. Only managers of the datasheet can delete fields, and the primary field cannot be deleted.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.
- Datasheet (`datasheet_id`, text, required): The datasheet in that space. Pick one or give its id.
- Field (`field_id`, text, required): The field to delete. Pick one, or give its id from 'Create field'.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `field_id` (text): The field deleted

**Example output**

```json
{
  "deleted": true,
  "field_id": "fldupsvkR2ATB"
}
```

### Delete record

Delete a record from a datasheet. Editors and managers can delete records.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Record ID (`record_id`, text, required): The record's id, from 'List records', 'Search records' or a create step.

**Outputs**

- `deleted` (true/false): Always true once deleted
- `record_id` (text): The record deleted

**Example output**

```json
{
  "deleted": true,
  "record_id": "recV3ElniQavTNyJG"
}
```

### Delete records

Delete up to 10 records in one step, given their ids.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Record IDs (`record_ids`, list, required): Up to 10 record ids, one per row, from a list or search step.

**Outputs**

- `count` (number): How many were deleted
- `deleted` (true/false): Always true once deleted
- `record_ids` (list): The ids deleted

**Example output**

```json
{
  "count": 1,
  "deleted": true,
  "record_ids": [
    "recV3ElniQavTNyJG"
  ]
}
```

### Find files

Find datasheets, folders, forms, dashboards or mirrors anywhere in a space by part of their name, whatever folder they are in.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.
- Kind of file (`node_type`, text, required): Which kind of file to find. One of: `Datasheet`, `Folder`, `Form`, `Dashboard`, `Mirror`.
- Name contains (`query`, text): Part of the name. Leave empty for every file of that kind.
- Only files (`access`, text): Limit to files you can edit. Defaults to any access. One of: `any` (Any access (default)), `add_records` (I can add records), `edit_structure` (I can manage or edit it).

**Outputs**

- `count` (number): How many were returned
- `nodes` (list): The matching files

**Example output**

```json
{
  "count": 1,
  "nodes": [
    {
      "icon": "",
      "id": "dstbs2U7mt8AEqgKuh",
      "is_favorite": false,
      "name": "Customers",
      "parent_id": "",
      "permission": 0,
      "type": "Datasheet"
    }
  ]
}
```

### Get file

Get one datasheet, folder, form or dashboard; for a folder, also the files directly inside it.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.
- File (`node_id`, text, required): The file or folder. Pick one at the top of the space, or give its id.

**Outputs**

- `children` (list): The files inside, for a folder
- `children_count` (number): How many files are inside
- `node` (object): The file

**Example output**

```json
{
  "children": [],
  "children_count": 0,
  "node": {
    "icon": "",
    "id": "dstbs2U7mt8AEqgKuh",
    "is_favorite": false,
    "name": "Customers",
    "parent_id": "",
    "permission": 0,
    "type": "Datasheet"
  }
}
```

### Get record

Get one record with all of its values.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Record ID (`record_id`, text, required): The record's id, from 'List records', 'Search records' or a create step.

**Outputs**

- `created_at` (text): When it was created (UTC)
- `fields` (object): The record's values by field name
- `record_id` (text): The record's id, to use as record_id in other steps
- `updated_at` (text): When it last changed (UTC)

**Example output**

```json
{
  "created_at": "2026-10-15T09:00:00Z",
  "fields": {
    "Title": "Acme"
  },
  "record_id": "recV3ElniQavTNyJG",
  "updated_at": "2026-10-15T09:00:00Z"
}
```

### List fields

List a datasheet's fields with their types, settings and which is the primary one; optionally as one view shows them.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- View (`view_id`, text): Only the fields this view shows, in its order.

**Outputs**

- `count` (number): How many were returned
- `fields` (list): The fields

**Example output**

```json
{
  "count": 1,
  "fields": [
    {
      "description": "",
      "editable": true,
      "id": "fldupsvkR2ATB",
      "is_primary": true,
      "name": "Title",
      "property": {
        "defaultValue": ""
      },
      "type": "SingleText"
    }
  ]
}
```

### List files in a space

List the datasheets, folders, forms and dashboards at the top of a space. To look inside a folder, use 'Get file'.

**Inputs**

- Space (`space_id`, text, required): The space. Pick one, or give its id from an earlier step.

**Outputs**

- `count` (number): How many were returned
- `nodes` (list): The files and folders

**Example output**

```json
{
  "count": 1,
  "nodes": [
    {
      "icon": "",
      "id": "dstbs2U7mt8AEqgKuh",
      "is_favorite": false,
      "name": "Customers",
      "parent_id": "",
      "permission": 0,
      "type": "Datasheet"
    }
  ]
}
```

### List records

List a datasheet's records, a page at a time, optionally from one view, filtered by a formula or sorted by a field. Gets one page; for more, run it again with the next page number.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- View (`view_id`, text): Only the records and fields this view shows, in its order.
- Filter formula (`filter_formula`, text): Only records where this AITable formula is true, such as {Status}="Done". To match text without a formula, use 'Search records'.
- Sort by (`sort_field`, text): The field to sort by. Leave empty for the view's own order.
- Sort order (`sort_order`, text): Which way to sort. Needs a field to sort by. One of: `asc` (Ascending (default)), `desc` (Descending).
- Values as (`cell_format`, text): Values as stored (numbers, lists, dates as timestamps), or every value as the text AITable shows. One of: `json` (Values (default)), `string` (Text, as shown in AITable).
- Page size (`page_size`, number): How many records per page, 1 to 1000. The default is 100. From 1 to 1000.
- Page (`page_number`, number): Which page to get, starting at 1. The default is 1. At least 1.
- Stop after (`max_records`, number): The most records to return in total, whatever the page size. At least 1.

**Outputs**

- `count` (number): How many are on this page
- `has_more` (true/false): True when a later page has more records
- `page_number` (number): This page's number
- `page_size` (number): Records per page
- `records` (list): The records
- `total` (number): How many records match in all

**Example output**

```json
{
  "count": 1,
  "has_more": false,
  "page_number": 1,
  "page_size": 100,
  "records": [
    {
      "created_at": "2026-10-15T09:00:00Z",
      "fields": {
        "Title": "Acme"
      },
      "record_id": "recV3ElniQavTNyJG",
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ],
  "total": 1
}
```

### List spaces

List the spaces you own or were invited to, with your admin status in each.

**Inputs**: None.

**Outputs**

- `count` (number): How many were returned
- `spaces` (list): The spaces

**Example output**

```json
{
  "count": 1,
  "spaces": [
    {
      "id": "spcjXzqVrjaP3",
      "is_admin": true,
      "name": "Lodol"
    }
  ]
}
```

### List views

List a datasheet's views (grid, gallery, kanban and so on).

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.

**Outputs**

- `count` (number): How many were returned
- `views` (list): The views

**Example output**

```json
{
  "count": 1,
  "views": [
    {
      "id": "viwpdA8TUBp5r",
      "name": "Grid view",
      "type": "Grid"
    }
  ]
}
```

### Search records

Find records whose chosen field contains, equals or starts with some text, ignoring case. Reads up to 5,000 rows and says when it stopped early.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Field (`search_field`, text, required): The field whose value is compared. Pick one or type its name.
- Match (`match`, text): How the field must match the text. Case is ignored. One of: `contains` (Contains (default)), `equals` (Is exactly), `starts_with` (Starts with).
- Text to find (`value`, text, required): The text to look for in that field.
- Most results (`max_results`, number): The most matches to return, 1 to 1000. The default is 100. From 1 to 1000.

**Outputs**

- `count` (number): How many matched
- `records` (list): The matching records, with values as text
- `scanned` (number): How many rows were read
- `truncated` (true/false): True when more rows may match than are shown

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "created_at": "2026-10-15T09:00:00Z",
      "fields": {
        "Title": "Acme"
      },
      "record_id": "recV3ElniQavTNyJG",
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ],
  "scanned": 1,
  "truncated": false
}
```

### Update record

Change some fields of a record. Fields left empty keep their values; a value can't be cleared from here.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Record ID (`record_id`, text, required): The record's id, from 'List records', 'Search records' or a create step.
- Fields (`fields`, object, required): The value for each field. Leave a field empty to leave it out; calculated fields are not offered.

**Outputs**

- `created_at` (text): When it was created (UTC)
- `fields` (object): The record's values by field name
- `record_id` (text): The record's id, to use as record_id in other steps
- `updated_at` (text): When it last changed (UTC)

**Example output**

```json
{
  "created_at": "2026-10-15T09:00:00Z",
  "fields": {
    "Title": "Acme"
  },
  "record_id": "recV3ElniQavTNyJG",
  "updated_at": "2026-10-15T09:00:00Z"
}
```

### Update records

Change up to 10 records in one step. Give a list with one object per record: its record_id and the fields to change.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- Records (`records`, list, required): A list of up to 10 objects, each with a record_id and the values to change, such as [{"record_id": "rec123", "Status": "Done"}].

**Outputs**

- `count` (number): How many were returned
- `records` (list): The records

**Example output**

```json
{
  "count": 1,
  "records": [
    {
      "created_at": "2026-10-15T09:00:00Z",
      "fields": {
        "Title": "Acme"
      },
      "record_id": "recV3ElniQavTNyJG",
      "updated_at": "2026-10-15T09:00:00Z"
    }
  ]
}
```

### Upload attachment

Upload a file to a datasheet. It is not on any record until you give this step's 'attachments' to an attachment field in 'Create record' or 'Update record'. One file per step; a space holds 1 GB in all.

**Inputs**

- Datasheet (`datasheet_id`, text, required): The datasheet. Pick one, give its id from an earlier step, or paste its address from the browser.
- 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 AITable, such as invoice.pdf. Leave blank to keep its own name.

**Outputs**

- `attachment` (object): The uploaded file as AITable describes it
- `attachments` (list): A list holding the file, to give to an attachment field
- `name` (text): The file's name
- `token` (text): The file's token

**Example output**

```json
{
  "attachment": {
    "height": 478,
    "mimeType": "image/png",
    "name": "logo.png",
    "preview": "",
    "size": 7194,
    "token": "space/2026/10/15/6fdc652231a8480398e302606ae28213",
    "url": "https://s1.aitable.ai/space/2026/10/15/6fdc652231a8480398e302606ae28213",
    "width": 479
  },
  "attachments": [
    {
      "height": 478,
      "mimeType": "image/png",
      "name": "logo.png",
      "preview": "",
      "size": 7194,
      "token": "space/2026/10/15/6fdc652231a8480398e302606ae28213",
      "url": "https://s1.aitable.ai/space/2026/10/15/6fdc652231a8480398e302606ae28213",
      "width": 479
    }
  ],
  "name": "logo.png",
  "token": "space/2026/10/15/6fdc652231a8480398e302606ae28213"
}
```
