airtable_list_bases
List all Airtable bases the token has access to.
- Operation
- Read
read - Full name
airtable.airtable_list_bases
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
productivity
Agent-facing Lua documentation and function reference for the Airtable KosmoKrator integration.
Agents call this integration through app.integrations.airtable.*.
Use lua_read_doc("integrations.airtable") inside KosmoKrator to discover the same reference at runtime.
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
List all Airtable bases the token has access to.
local result = app.integrations.airtable.airtable_list_bases({})
Returns an object with a bases array, each containing id, name, permissionLevel, and other base metadata.
Get details for a single Airtable base by ID.
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
local result = app.integrations.airtable.airtable_get_base({
base_id = "appXXXXXXXXXXXX"
})
Returns the base object with id, name, permissionLevel, and other metadata.
List records from an Airtable table with optional filtering, sorting, and pagination.
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
view | string | no | View name or ID to filter records by the view’s filters. |
filter_by_formula | string | no | Airtable formula expression to filter records (e.g., "{Status} = 'Done'"). |
max_records | integer | no | Maximum number of records to return. |
offset | string | no | Pagination offset from a previous response. |
fields | string | no | Comma-separated list of field names to return. |
sort | string | no | JSON array of sort objects, e.g. [{"field":"Name","direction":"asc"}]. |
local result = app.integrations.airtable.airtable_list_records({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
filter_by_formula = "{Status} = 'Active'",
max_records = 100
})
Returns an object with records array and optional offset for pagination.
Get a single Airtable record by ID.
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
record_id | string | yes | Record ID (e.g., "recXXXXXXXXXXXX"). |
local result = app.integrations.airtable.airtable_get_record({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
record_id = "recXXXXXXXXXXXX"
})
Returns the record object with id, createdTime, and fields.
Create a new record in an Airtable table.
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
fields | string | yes | JSON object of field name → value pairs (e.g., {"Name":"John","Age":30}). |
local result = app.integrations.airtable.airtable_create_record({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
fields = '{"Name":"John Doe","Email":"[email protected]","Age":30}'
})
Returns the created record object with id, createdTime, and fields.
List views for an Airtable base.
| Name | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
local result = app.integrations.airtable.airtable_list_views({
base_id = "appXXXXXXXXXXXX"
})
Returns the views available in the base.
Get the profile of the currently authenticated Airtable user. Useful for verifying credentials and displaying account information.
local result = app.integrations.airtable.airtable_get_current_user({})
Returns the authenticated user object with id, name, email, and other profile fields.
If you have multiple Airtable accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.airtable.airtable_list_bases({})
-- Explicit default (portable across setups)
app.integrations.airtable.default.airtable_list_bases({})
-- Named accounts
app.integrations.airtable.work.airtable_list_bases({})
app.integrations.airtable.personal.airtable_list_bases({})
All functions are identical across accounts — only the credentials differ.
# Client for the Airtable REST API — Lua API Reference
## airtable_list_bases
List all Airtable bases the token has access to.
### Example
```lua
local result = app.integrations.airtable.airtable_list_bases({})
```
### Response
Returns an object with a `bases` array, each containing `id`, `name`, `permissionLevel`, and other base metadata.
---
## airtable_get_base
Get details for a single Airtable base by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `base_id` | string | yes | Airtable base ID (e.g., `"appXXXXXXXXXXXX"`). |
### Example
```lua
local result = app.integrations.airtable.airtable_get_base({
base_id = "appXXXXXXXXXXXX"
})
```
### Response
Returns the base object with `id`, `name`, `permissionLevel`, and other metadata.
---
## airtable_list_records
List records from an Airtable table with optional filtering, sorting, and pagination.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `base_id` | string | yes | Airtable base ID (e.g., `"appXXXXXXXXXXXX"`). |
| `table` | string | yes | Table ID or name. |
| `view` | string | no | View name or ID to filter records by the view's filters. |
| `filter_by_formula` | string | no | Airtable formula expression to filter records (e.g., `"{Status} = 'Done'"`). |
| `max_records` | integer | no | Maximum number of records to return. |
| `offset` | string | no | Pagination offset from a previous response. |
| `fields` | string | no | Comma-separated list of field names to return. |
| `sort` | string | no | JSON array of sort objects, e.g. `[{"field":"Name","direction":"asc"}]`. |
### Example
```lua
local result = app.integrations.airtable.airtable_list_records({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
filter_by_formula = "{Status} = 'Active'",
max_records = 100
})
```
### Response
Returns an object with `records` array and optional `offset` for pagination.
---
## airtable_get_record
Get a single Airtable record by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `base_id` | string | yes | Airtable base ID (e.g., `"appXXXXXXXXXXXX"`). |
| `table` | string | yes | Table ID or name. |
| `record_id` | string | yes | Record ID (e.g., `"recXXXXXXXXXXXX"`). |
### Example
```lua
local result = app.integrations.airtable.airtable_get_record({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
record_id = "recXXXXXXXXXXXX"
})
```
### Response
Returns the record object with `id`, `createdTime`, and `fields`.
---
## airtable_create_record
Create a new record in an Airtable table.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `base_id` | string | yes | Airtable base ID (e.g., `"appXXXXXXXXXXXX"`). |
| `table` | string | yes | Table ID or name. |
| `fields` | string | yes | JSON object of field name → value pairs (e.g., `{"Name":"John","Age":30}`). |
### Example
```lua
local result = app.integrations.airtable.airtable_create_record({
base_id = "appXXXXXXXXXXXX",
table = "Contacts",
fields = '{"Name":"John Doe","Email":"[email protected]","Age":30}'
})
```
### Response
Returns the created record object with `id`, `createdTime`, and `fields`.
---
## airtable_list_views
List views for an Airtable base.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `base_id` | string | yes | Airtable base ID (e.g., `"appXXXXXXXXXXXX"`). |
### Example
```lua
local result = app.integrations.airtable.airtable_list_views({
base_id = "appXXXXXXXXXXXX"
})
```
### Response
Returns the views available in the base.
---
## airtable_get_current_user
Get the profile of the currently authenticated Airtable user. Useful for verifying credentials and displaying account information.
### Example
```lua
local result = app.integrations.airtable.airtable_get_current_user({})
```
### Response
Returns the authenticated user object with `id`, `name`, `email`, and other profile fields.
---
## Multi-Account Usage
If you have multiple Airtable accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.airtable.airtable_list_bases({})
-- Explicit default (portable across setups)
app.integrations.airtable.default.airtable_list_bases({})
-- Named accounts
app.integrations.airtable.work.airtable_list_bases({})
app.integrations.airtable.personal.airtable_list_bases({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.airtable.airtable_list_bases({})
print(result) airtable_list_basesList all Airtable bases the token has access to.
readairtable.airtable_list_bases| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||
airtable_get_baseGet details for a single Airtable base by ID.
readairtable.airtable_get_base| Parameter | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
airtable_list_recordsList records from an Airtable table with optional filtering, sorting, and pagination.
readairtable.airtable_list_records| Parameter | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
view | string | no | View name or ID to filter records by the view's filters. |
filter_by_formula | string | no | Airtable formula expression to filter records (e.g., "{Status} = 'Done'"). |
max_records | integer | no | Maximum number of records to return. |
offset | string | no | Pagination offset from a previous response. |
fields | string | no | Comma-separated list of field names to return. |
sort | string | no | JSON array of sort objects, e.g. [{"field":"Name","direction":"asc"}]. |
airtable_get_recordGet a single Airtable record by ID.
readairtable.airtable_get_record| Parameter | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
record_id | string | yes | Record ID (e.g., "recXXXXXXXXXXXX"). |
airtable_create_recordCreate a new record in an Airtable table.
writeairtable.airtable_create_record| Parameter | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
table | string | yes | Table ID or name. |
fields | string | yes | JSON object of field name → value pairs (e.g., {"Name":"John","Age":30}). |
airtable_list_viewsList views for an Airtable base.
readairtable.airtable_list_views| Parameter | Type | Required | Description |
|---|---|---|---|
base_id | string | yes | Airtable base ID (e.g., "appXXXXXXXXXXXX"). |
airtable_get_current_userGet the profile of the currently authenticated Airtable user. Useful for verifying credentials and displaying account information.
readairtable.airtable_get_current_user| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||