productivity
Pipedream Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Pipedream KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.pipedream.*.
Use lua_read_doc("integrations.pipedream") 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
Pipedream workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.pipedream.list_workflows({page = 1, limit = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("pipedream"))' --json
kosmo integrations:lua --eval 'print(docs.read("pipedream.list_workflows"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local pipedream = app.integrations.pipedream
local result = pipedream.list_workflows({page = 1, limit = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.pipedream, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.pipedream.default.* or app.integrations.pipedream.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Pipedream, 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.
Pipedream — Lua API Reference
list_workflows
List automation workflows in Pipedream.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of workflows per page (default: 25, max: 100) |
Examples
local result = app.integrations.pipedream.list_workflows({
page = 1,
limit = 10
})
for _, wf in ipairs(result.data) do
print(wf.id .. ": " .. wf.name)
end
get_workflow
Get details of a specific workflow by ID.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The workflow ID |
Examples
local result = app.integrations.pipedream.get_workflow({
id = "abc_123"
})
print(result.data.name)
print("Status: " .. result.data.status)
list_components
List available Pipedream components (actions, triggers, etc.).
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | no | Component type filter: “action”, “trigger” |
limit | integer | no | Number of components per page (default: 25, max: 100) |
Examples
-- List action components
local result = app.integrations.pipedream.list_components({
type = "action",
limit = 20
})
for _, comp in ipairs(result.data) do
print(comp.key .. " (" .. comp.app .. ")")
end
get_component
Get details of a specific component by app and key.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
app | string | yes | App slug (e.g., “slack”, “github”) |
id | string | yes | Component key or ID (e.g., “send-message”) |
Examples
local result = app.integrations.pipedream.get_component({
app = "slack",
id = "send-message"
})
print(result.data.name)
print("Version: " .. result.data.version)
list_connected_accounts
List connected third-party accounts.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1) |
limit | integer | no | Number of accounts per page (default: 25, max: 100) |
Examples
local result = app.integrations.pipedream.list_connected_accounts({
page = 1,
limit = 10
})
for _, acct in ipairs(result.data) do
print(acct.id .. ": " .. acct.name .. " (" .. acct.app .. ")")
end
list_triggers
List event triggers for a specific workflow.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
workflow_id | string | yes | The workflow ID to list triggers for |
Examples
local result = app.integrations.pipedream.list_triggers({
workflow_id = "abc_123"
})
for _, trigger in ipairs(result.data) do
print(trigger.type .. ": " .. (trigger.name or "unnamed"))
end
get_current_user
Get the currently authenticated user profile.
Parameters
None.
Examples
local result = app.integrations.pipedream.get_current_user({})
print("User: " .. result.data.name)
print("Email: " .. result.data.email)
Multi-Account Usage
If you have multiple Pipedream accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.pipedream.list_workflows({})
-- Explicit default (portable across setups)
app.integrations.pipedream.default.list_workflows({})
-- Named accounts
app.integrations.pipedream.production.list_workflows({})
app.integrations.pipedream.staging.list_workflows({})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Pipedream — Lua API Reference
## list_workflows
List automation workflows in Pipedream.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of workflows per page (default: 25, max: 100) |
### Examples
```lua
local result = app.integrations.pipedream.list_workflows({
page = 1,
limit = 10
})
for _, wf in ipairs(result.data) do
print(wf.id .. ": " .. wf.name)
end
```
---
## get_workflow
Get details of a specific workflow by ID.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The workflow ID |
### Examples
```lua
local result = app.integrations.pipedream.get_workflow({
id = "abc_123"
})
print(result.data.name)
print("Status: " .. result.data.status)
```
---
## list_components
List available Pipedream components (actions, triggers, etc.).
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | no | Component type filter: "action", "trigger" |
| `limit` | integer | no | Number of components per page (default: 25, max: 100) |
### Examples
```lua
-- List action components
local result = app.integrations.pipedream.list_components({
type = "action",
limit = 20
})
for _, comp in ipairs(result.data) do
print(comp.key .. " (" .. comp.app .. ")")
end
```
---
## get_component
Get details of a specific component by app and key.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `app` | string | yes | App slug (e.g., "slack", "github") |
| `id` | string | yes | Component key or ID (e.g., "send-message") |
### Examples
```lua
local result = app.integrations.pipedream.get_component({
app = "slack",
id = "send-message"
})
print(result.data.name)
print("Version: " .. result.data.version)
```
---
## list_connected_accounts
List connected third-party accounts.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number for pagination (default: 1) |
| `limit` | integer | no | Number of accounts per page (default: 25, max: 100) |
### Examples
```lua
local result = app.integrations.pipedream.list_connected_accounts({
page = 1,
limit = 10
})
for _, acct in ipairs(result.data) do
print(acct.id .. ": " .. acct.name .. " (" .. acct.app .. ")")
end
```
---
## list_triggers
List event triggers for a specific workflow.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `workflow_id` | string | yes | The workflow ID to list triggers for |
### Examples
```lua
local result = app.integrations.pipedream.list_triggers({
workflow_id = "abc_123"
})
for _, trigger in ipairs(result.data) do
print(trigger.type .. ": " .. (trigger.name or "unnamed"))
end
```
---
## get_current_user
Get the currently authenticated user profile.
### Parameters
None.
### Examples
```lua
local result = app.integrations.pipedream.get_current_user({})
print("User: " .. result.data.name)
print("Email: " .. result.data.email)
```
---
## Multi-Account Usage
If you have multiple Pipedream accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.pipedream.list_workflows({})
-- Explicit default (portable across setups)
app.integrations.pipedream.default.list_workflows({})
-- Named accounts
app.integrations.pipedream.production.list_workflows({})
app.integrations.pipedream.staging.list_workflows({})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.pipedream.list_workflows({page = 1, limit = 1})
print(result) Functions
list_workflows Read
List automation workflows in Pipedream. Returns a paginated list of workflows with their IDs, names, and statuses.
- Lua path
app.integrations.pipedream.list_workflows- Full name
pipedream.pipedream_list_workflows
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of workflows to return per page (default: 25, max: 100). |
get_workflow Read
Get details of a specific Pipedream workflow by ID, including its configuration, steps, and current status.
- Lua path
app.integrations.pipedream.get_workflow- Full name
pipedream.pipedream_get_workflow
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The workflow ID. |
list_components Read
List available Pipedream components (actions, triggers, etc.). Components are reusable building blocks for connecting to third-party APIs.
- Lua path
app.integrations.pipedream.list_components- Full name
pipedream.pipedream_list_components
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | no | Component type filter. Common values: "action", "trigger". Omit to list all types. |
limit | integer | no | Number of components to return per page (default: 25, max: 100). |
get_component Read
Get details of a specific Pipedream component by app and component key. Returns the component configuration, props, and version info.
- Lua path
app.integrations.pipedream.get_component- Full name
pipedream.pipedream_get_component
| Parameter | Type | Required | Description |
|---|---|---|---|
app | string | yes | The app slug (e.g., "slack", "github", "google_sheets"). |
id | string | yes | The component key or ID (e.g., "send-message"). |
list_connected_accounts Read
List connected third-party accounts in Pipedream. These are the OAuth-connected accounts used by workflows to interact with external services.
- Lua path
app.integrations.pipedream.list_connected_accounts- Full name
pipedream.pipedream_list_connected_accounts
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
limit | integer | no | Number of accounts to return per page (default: 25, max: 100). |
list_triggers Read
List event triggers for a specific Pipedream workflow. Triggers define the events that cause a workflow to run.
- Lua path
app.integrations.pipedream.list_triggers- Full name
pipedream.pipedream_list_triggers
| Parameter | Type | Required | Description |
|---|---|---|---|
workflow_id | string | yes | The workflow ID to list triggers for. |
get_current_user Read
Get the currently authenticated Pipedream user profile, including name, email, and workspace details.
- Lua path
app.integrations.pipedream.get_current_user- Full name
pipedream.pipedream_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||