productivity
Drip Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Drip KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.drip.*.
Use lua_read_doc("integrations.drip") 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
Drip workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.drip.list_campaigns({page = 1, per_page = 1}))' --json kosmo integrations:lua --eval 'print(docs.read("drip"))' --json
kosmo integrations:lua --eval 'print(docs.read("drip.list_campaigns"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local drip = app.integrations.drip
local result = drip.list_campaigns({page = 1, per_page = 1})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.drip, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.drip.default.* or app.integrations.drip.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Drip, 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.
Drip Integration — Lua API Reference
Overview
The Drip integration provides tools for managing email marketing subscribers, campaigns, and workflows through the Drip REST API v2.
Authentication
All requests require a Bearer token (api_key) and an account_id (used in URL paths for account-scoped endpoints).
Tools
drip_list_campaigns
List email campaigns in the Drip account.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1) |
per_page | integer | no | Results per page, max 1000 (default: 100) |
Endpoint: GET /v2/{account_id}/campaigns
drip_get_campaign
Fetch a single email campaign by its campaign ID.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The campaign ID |
Endpoint: GET /v2/{account_id}/campaigns/{id}
drip_list_subscribers
List subscribers in the Drip account.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1) |
per_page | integer | no | Results per page, max 1000 (default: 100) |
Endpoint: GET /v2/{account_id}/subscribers
drip_get_subscriber
Fetch a single subscriber by ID or email.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | Subscriber ID or email address |
Endpoint: GET /v2/subscribers/{id}
drip_list_workflows
List workflows in the Drip account.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default: 1) |
per_page | integer | no | Results per page, max 1000 (default: 100) |
Endpoint: GET /v2/{account_id}/workflows
drip_get_workflow
Fetch a single workflow by its workflow ID.
Type: read
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The workflow ID |
Endpoint: GET /v2/{account_id}/workflows/{id}
drip_get_current_user
Get the currently authenticated Drip user.
Type: read
Parameters: none
Endpoint: GET /v2/user
Multi-Account Usage
The Drip integration supports multi-account configurations. Each account can have its own api_key, account_id, and url:
-- When using with a specific account
tools.drip_list_subscribers({ account = "work" })
-- Default account
tools.drip_list_subscribers({})
Error Handling
All tools return structured results. On error, the response includes an error message describing what went wrong (e.g., authentication failure, invalid account ID, network issues).
Raw agent markdown
# Drip Integration — Lua API Reference
## Overview
The Drip integration provides tools for managing email marketing subscribers, campaigns, and workflows through the Drip REST API v2.
## Authentication
All requests require a Bearer token (`api_key`) and an `account_id` (used in URL paths for account-scoped endpoints).
## Tools
### drip_list_campaigns
List email campaigns in the Drip account.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |
**Endpoint:** `GET /v2/{account_id}/campaigns`
---
### drip_get_campaign
Fetch a single email campaign by its campaign ID.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | The campaign ID |
**Endpoint:** `GET /v2/{account_id}/campaigns/{id}`
---
### drip_list_subscribers
List subscribers in the Drip account.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |
**Endpoint:** `GET /v2/{account_id}/subscribers`
---
### drip_get_subscriber
Fetch a single subscriber by ID or email.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | Subscriber ID or email address |
**Endpoint:** `GET /v2/subscribers/{id}`
---
### drip_list_workflows
List workflows in the Drip account.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `page` | integer | no | Page number (default: 1) |
| `per_page` | integer | no | Results per page, max 1000 (default: 100) |
**Endpoint:** `GET /v2/{account_id}/workflows`
---
### drip_get_workflow
Fetch a single workflow by its workflow ID.
**Type:** read
**Parameters:**
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `id` | string | yes | The workflow ID |
**Endpoint:** `GET /v2/{account_id}/workflows/{id}`
---
### drip_get_current_user
Get the currently authenticated Drip user.
**Type:** read
**Parameters:** none
**Endpoint:** `GET /v2/user`
---
## Multi-Account Usage
The Drip integration supports multi-account configurations. Each account can have its own `api_key`, `account_id`, and `url`:
```lua
-- When using with a specific account
tools.drip_list_subscribers({ account = "work" })
-- Default account
tools.drip_list_subscribers({})
```
## Error Handling
All tools return structured results. On error, the response includes an error message describing what went wrong (e.g., authentication failure, invalid account ID, network issues). local result = app.integrations.drip.list_campaigns({page = 1, per_page = 1})
print(result) Functions
list_campaigns Read
List email campaigns in your Drip account. Returns campaign details including name, status, and configuration. Paginated — use page and per_page parameters to navigate results.
- Lua path
app.integrations.drip.list_campaigns- Full name
drip.drip_list_campaigns
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page, max 1000 (default: 100). |
get_campaign Read
Fetch a single email campaign from Drip by its campaign ID. Returns full campaign details including name, status, configuration, and associated actions.
- Lua path
app.integrations.drip.get_campaign- Full name
drip.drip_get_campaign
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The campaign ID. |
list_subscribers Read
List subscribers in your Drip account. Returns subscriber records including email, status, tags, and custom fields. Paginated — use page and per_page parameters to navigate results.
- Lua path
app.integrations.drip.list_subscribers- Full name
drip.drip_list_subscribers
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page, max 1000 (default: 100). |
get_subscriber Read
Fetch a single subscriber from Drip by their subscriber ID or email address. Returns full subscriber details including status, tags, custom fields, and subscription information.
- Lua path
app.integrations.drip.get_subscriber- Full name
drip.drip_get_subscriber
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The subscriber ID or email address. |
list_workflows Read
List workflows in your Drip account. Returns workflow details including name, status, and trigger configuration. Paginated — use page and per_page parameters to navigate results.
- Lua path
app.integrations.drip.list_workflows- Full name
drip.drip_list_workflows
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number for pagination (default: 1). |
per_page | integer | no | Number of results per page, max 1000 (default: 100). |
get_workflow Read
Fetch a single workflow from Drip by its workflow ID. Returns full workflow details including name, status, trigger configuration, and associated actions.
- Lua path
app.integrations.drip.get_workflow- Full name
drip.drip_get_workflow
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The workflow ID. |
get_current_user Read
Get the currently authenticated Drip user. Returns user profile information including name, email, and account details. Useful for verifying the API connection and identifying which account is active.
- Lua path
app.integrations.drip.get_current_user- Full name
drip.drip_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||