Skip to content

Bitable Tools ​

This document details the Bitable tools.

⚠️ Important Notes ​

  • Empty rows in default table: When creating a bitable, the default table has empty records. Delete them before inserting data.
  • Field types: Different field types have different value format requirements. Always query field types first.
  • Batch limit: Maximum 500 records per operation
  • Concurrency: Same table doesn't support concurrent writes. Call serially with 0.5-1s delay.

Tool List ​

ToolFunction
feishu_bitable_appManage bitable (create, delete, copy)
feishu_bitable_app_tableManage data tables
feishu_bitable_app_table_fieldManage fields
feishu_bitable_app_table_recordManage records (CRUD, batch)
feishu_bitable_app_table_viewManage views

Resource Hierarchy ​

Bitable App (app_token)
  └── Data Table (table_id)
        ├── Field (field_id)
        ├── Record (record_id)
        └── View (view_id)

Field Types and Value Formats ​

typeField TypeValue FormatExample
1TextString"Hello"
2NumberNumber123
3Single SelectString"Option1"
4Multi SelectString Array["Option1", "Option2"]
5DateMillisecond Timestamp1674206443000
7CheckboxBooleantrue
11UserObject Array[{id: "ou_xxx"}]
13PhoneString"13800138000"
15URLObject{link: "url", text: "text"}
17AttachmentObject Array[{file_token: "xxx"}]

Common Errors ​

Error CodeError TypeSolution
1254064Date format errorUse millisecond timestamp, not seconds
1254068URL format errorUse {link, text} object format
1254066User field format errorUse [{id: "ou_xxx"}] format
1254015Field type mismatchQuery field types first, construct values accordingly
1254104Batch limit exceededSplit into batches, max 500 per call
1254291Concurrent conflictCall serially, add 0.5-1s delay

Usage Examples ​

Query Fields ​

json
{
  "action": "list",
  "app_token": "S404bxxxxx",
  "table_id": "tblxxxxx"
}

Insert Record ​

json
{
  "action": "create",
  "app_token": "S404bxxxxx",
  "table_id": "tblxxxxx",
  "fields": {
    "Customer Name": "ByteDance",
    "Owner": [{"id": "ou_xxx"}],
    "Sign Date": 1674206443000,
    "Status": "In Progress"
  }
}

Batch Import ​

json
{
  "action": "batch_create",
  "app_token": "S404bxxxxx",
  "table_id": "tblxxxxx",
  "records": [
    {"fields": {"Customer Name": "Customer A", "Status": "In Progress"}},
    {"fields": {"Customer Name": "Customer B", "Status": "Completed"}}
  ]
}

Advanced Filtering ​

json
{
  "action": "list",
  "app_token": "S404bxxxxx",
  "table_id": "tblxxxxx",
  "filter": {
    "conjunction": "and",
    "conditions": [
      {"field_name": "Status", "operator": "is", "value": ["In Progress"]},
      {"field_name": "Sign Date", "operator": "isGreater", "value": ["ExactDate", "1672531200000"]}
    ]
  }
}

Filter Operators ​

OperatorDescription
isEquals
isNotNot equals
containsContains
doesNotContainDoes not contain
isEmptyIs empty
isNotEmptyIs not empty
isGreaterGreater than
isGreaterEqualGreater than or equal
isLessLess than
isLessEqualLess than or equal

Released under the MIT License.