productivity
Zapier Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Zapier KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.zapier.*.
Use lua_read_doc("integrations.zapier") inside KosmoKrator to discover the same reference at runtime.
Call Lua from the Headless CLI
Use kosmo integrations:lua when a shell script, CI job, cron job, or another coding CLI should run a deterministic
Zapier workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.zapier.list({limit = 1, page = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("zapier"))' --json
kosmo integrations:lua --eval 'print(docs.read("zapier.list"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local zapier = app.integrations.zapier
local result = zapier.list({limit = 1, page = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.zapier, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.zapier.default.* or app.integrations.zapier.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Zapier, use the narrower mcp:lua command.
# Use mcp:lua for MCP-only scripts; use integrations:lua for this integration namespace.
kosmo mcp:lua --eval 'dump(mcp.servers())' --json Agent-Facing Lua Docs
This is the rendered version of the full Lua documentation exposed to agents when they inspect the integration namespace.
Client for the Zapier REST API — Lua API Reference
zapier_list_zaps
List zaps in Zapier with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of zaps to return. |
page | integer | no | Page number for pagination. |
Example
local result = app.integrations.zapier.zapier_list_zaps({
limit = 50
page = 1
})
zapier_get_zap
Get detailed information about a Zapier zap.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The zap ID. |
Example
local result = app.integrations.zapier.zapier_get_zap({
id = ""
})
zapier_list_executions
List zap executions in Zapier with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
zap_id | string | no | Filter executions by zap ID. |
limit | integer | no | Max number of executions to return. |
page | integer | no | Page number for pagination. |
Example
local result = app.integrations.zapier.zapier_list_executions({
zap_id = ""
limit = 50
page = 1
})
zapier_get_execution
Get detailed information about a Zapier execution.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The execution ID. |
Example
local result = app.integrations.zapier.zapier_get_execution({
id = ""
})
zapier_list_connections
List connections in Zapier with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of connections to return. |
page | integer | no | Page number for pagination. |
Example
local result = app.integrations.zapier.zapier_list_connections({
limit = 50
page = 1
})
zapier_get_connection
Get detailed information about a Zapier connection.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The connection ID. |
Example
local result = app.integrations.zapier.zapier_get_connection({
id = ""
})
zapier_get_current_user
Get the currently authenticated Zapier user.
Example
local result = app.integrations.zapier.zapier_get_current_user({
})
Multi-Account Usage
If you have multiple zapier accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.zapier.function_name({...})
-- Explicit default (portable across setups)
app.integrations.zapier.default.function_name({...})
-- Named accounts
app.integrations.zapier.work.function_name({...})
app.integrations.zapier.personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Client for the Zapier REST API — Lua API Reference
## zapier_list_zaps
List zaps in Zapier with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of zaps to return. |
| `page` | integer | no | Page number for pagination. |
### Example
```lua
local result = app.integrations.zapier.zapier_list_zaps({
limit = 50
page = 1
})
```
## zapier_get_zap
Get detailed information about a Zapier zap.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The zap ID. |
### Example
```lua
local result = app.integrations.zapier.zapier_get_zap({
id = ""
})
```
## zapier_list_executions
List zap executions in Zapier with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `zap_id` | string | no | Filter executions by zap ID. |
| `limit` | integer | no | Max number of executions to return. |
| `page` | integer | no | Page number for pagination. |
### Example
```lua
local result = app.integrations.zapier.zapier_list_executions({
zap_id = ""
limit = 50
page = 1
})
```
## zapier_get_execution
Get detailed information about a Zapier execution.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The execution ID. |
### Example
```lua
local result = app.integrations.zapier.zapier_get_execution({
id = ""
})
```
## zapier_list_connections
List connections in Zapier with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of connections to return. |
| `page` | integer | no | Page number for pagination. |
### Example
```lua
local result = app.integrations.zapier.zapier_list_connections({
limit = 50
page = 1
})
```
## zapier_get_connection
Get detailed information about a Zapier connection.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The connection ID. |
### Example
```lua
local result = app.integrations.zapier.zapier_get_connection({
id = ""
})
```
## zapier_get_current_user
Get the currently authenticated Zapier user.
### Example
```lua
local result = app.integrations.zapier.zapier_get_current_user({
})
```
---
## Multi-Account Usage
If you have multiple zapier accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.zapier.function_name({...})
-- Explicit default (portable across setups)
app.integrations.zapier.default.function_name({...})
-- Named accounts
app.integrations.zapier.work.function_name({...})
app.integrations.zapier.personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.zapier.list({limit = 1, page = 1})
print(result) Functions
list Read
List zaps in Zapier with optional filters.
- Lua path
app.integrations.zapier.list- Full name
zapier.zapier_list_zaps
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of zaps to return. |
page | integer | no | Page number for pagination. |
get Read
Get detailed information about a Zapier zap.
- Lua path
app.integrations.zapier.get- Full name
zapier.zapier_get_zap
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The zap ID. |
list_executions Read
List zap executions in Zapier with optional filters.
- Lua path
app.integrations.zapier.list_executions- Full name
zapier.zapier_list_executions
| Parameter | Type | Required | Description |
|---|---|---|---|
zap_id | string | no | Filter executions by zap ID. |
limit | integer | no | Max number of executions to return. |
page | integer | no | Page number for pagination. |
get_execution Read
Get detailed information about a Zapier execution.
- Lua path
app.integrations.zapier.get_execution- Full name
zapier.zapier_get_execution
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The execution ID. |
list_connections Read
List connections in Zapier with optional filters.
- Lua path
app.integrations.zapier.list_connections- Full name
zapier.zapier_list_connections
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of connections to return. |
page | integer | no | Page number for pagination. |
get_connection Read
Get detailed information about a Zapier connection.
- Lua path
app.integrations.zapier.get_connection- Full name
zapier.zapier_get_connection
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The connection ID. |
get_current_user Read
Get the currently authenticated Zapier user.
- Lua path
app.integrations.zapier.get_current_user- Full name
zapier.zapier_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||