KosmoKrator

productivity

IFTTT Lua API for KosmoKrator Agents

Agent-facing Lua documentation and function reference for the IFTTT KosmoKrator integration.

Lua Namespace

Agents call this integration through app.integrations.ifttt.*. Use lua_read_doc("integrations.ifttt") 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 IFTTT workflow without starting an interactive agent session.

Inline Lua call
kosmo integrations:lua --eval 'dump(app.integrations.ifttt.list_services({limit = 1, page = 1}))' --json
Read Lua docs headlessly
kosmo integrations:lua --eval 'print(docs.read("ifttt"))' --json
kosmo integrations:lua --eval 'print(docs.read("ifttt.list_services"))' --json

Workflow file

Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.

workflow.lua
local ifttt = app.integrations.ifttt
local result = ifttt.list_services({limit = 1, page = 1})

dump(result)
Run the workflow
kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json
Namespace note. integrations:lua exposes app.integrations.ifttt, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.ifttt.default.* or app.integrations.ifttt.work.* when you configured named credential accounts.

MCP-only Lua

If the script only needs configured MCP servers and does not need IFTTT, use the narrower mcp:lua command.

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 IFTTT REST API — Lua API Reference

ifttt_list_services

List services in IFTTT with optional filters.

Parameters

NameTypeRequiredDescription
limitintegernoMax number of services to return.
pageintegernoPage number for pagination.

Example

local result = app.integrations.ifttt.ifttt_list_services({
  limit = 50
  page = 1
})

ifttt_get_service

Get detailed information about an IFTTT service.

Parameters

NameTypeRequiredDescription
idstringyesThe service ID.

Example

local result = app.integrations.ifttt.ifttt_get_service({
  id = ""
})

ifttt_list_applets

List applets in IFTTT with optional filters.

Parameters

NameTypeRequiredDescription
limitintegernoMax number of applets to return.
pageintegernoPage number for pagination.

Example

local result = app.integrations.ifttt.ifttt_list_applets({
  limit = 50
  page = 1
})

ifttt_get_applet

Get detailed information about an IFTTT applet.

Parameters

NameTypeRequiredDescription
idstringyesThe applet ID.

Example

local result = app.integrations.ifttt.ifttt_get_applet({
  id = ""
})

ifttt_list_connections

List connections in IFTTT with optional filters.

Parameters

NameTypeRequiredDescription
limitintegernoMax number of connections to return.
pageintegernoPage number for pagination.

Example

local result = app.integrations.ifttt.ifttt_list_connections({
  limit = 50
  page = 1
})

ifttt_get_connection

Get detailed information about an IFTTT connection.

Parameters

NameTypeRequiredDescription
idstringyesThe connection ID.

Example

local result = app.integrations.ifttt.ifttt_get_connection({
  id = ""
})

ifttt_get_current_user

Get the currently authenticated IFTTT user.

Example

local result = app.integrations.ifttt.ifttt_get_current_user({
})

Multi-Account Usage

If you have multiple ifttt accounts configured, use account-specific namespaces:

-- Default account (always works)
app.integrations.ifttt.function_name({...})

-- Explicit default (portable across setups)
app.integrations.ifttt.default.function_name({...})

-- Named accounts
app.integrations.ifttt.work.function_name({...})
app.integrations.ifttt.personal.function_name({...})

All functions are identical across accounts — only the credentials differ.

Raw agent markdown
# Client for the IFTTT REST API — Lua API Reference

## ifttt_list_services

List services in IFTTT with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of services to return. |
| `page` | integer | no | Page number for pagination. |

### Example

```lua
local result = app.integrations.ifttt.ifttt_list_services({
  limit = 50
  page = 1
})
```

## ifttt_get_service

Get detailed information about an IFTTT service.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The service ID. |

### Example

```lua
local result = app.integrations.ifttt.ifttt_get_service({
  id = ""
})
```

## ifttt_list_applets

List applets in IFTTT with optional filters.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of applets to return. |
| `page` | integer | no | Page number for pagination. |

### Example

```lua
local result = app.integrations.ifttt.ifttt_list_applets({
  limit = 50
  page = 1
})
```

## ifttt_get_applet

Get detailed information about an IFTTT applet.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The applet ID. |

### Example

```lua
local result = app.integrations.ifttt.ifttt_get_applet({
  id = ""
})
```

## ifttt_list_connections

List connections in IFTTT 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.ifttt.ifttt_list_connections({
  limit = 50
  page = 1
})
```

## ifttt_get_connection

Get detailed information about an IFTTT connection.

### Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The connection ID. |

### Example

```lua
local result = app.integrations.ifttt.ifttt_get_connection({
  id = ""
})
```

## ifttt_get_current_user

Get the currently authenticated IFTTT user.

### Example

```lua
local result = app.integrations.ifttt.ifttt_get_current_user({
})
```

---

## Multi-Account Usage

If you have multiple ifttt accounts configured, use account-specific namespaces:

```lua
-- Default account (always works)
app.integrations.ifttt.function_name({...})

-- Explicit default (portable across setups)
app.integrations.ifttt.default.function_name({...})

-- Named accounts
app.integrations.ifttt.work.function_name({...})
app.integrations.ifttt.personal.function_name({...})
```

All functions are identical across accounts — only the credentials differ.
Metadata-derived Lua example
local result = app.integrations.ifttt.list_services({limit = 1, page = 1})
print(result)

Functions

list_services Read

List services in IFTTT with optional filters.

Lua path
app.integrations.ifttt.list_services
Full name
ifttt.ifttt_list_services
ParameterTypeRequiredDescription
limit integer no Max number of services to return.
page integer no Page number for pagination.
get_service Read

Get detailed information about an IFTTT service.

Lua path
app.integrations.ifttt.get_service
Full name
ifttt.ifttt_get_service
ParameterTypeRequiredDescription
id string yes The service ID.
list_applets Read

List applets in IFTTT with optional filters.

Lua path
app.integrations.ifttt.list_applets
Full name
ifttt.ifttt_list_applets
ParameterTypeRequiredDescription
limit integer no Max number of applets to return.
page integer no Page number for pagination.
get_applet Read

Get detailed information about an IFTTT applet.

Lua path
app.integrations.ifttt.get_applet
Full name
ifttt.ifttt_get_applet
ParameterTypeRequiredDescription
id string yes The applet ID.
list_connections Read

List connections in IFTTT with optional filters.

Lua path
app.integrations.ifttt.list_connections
Full name
ifttt.ifttt_list_connections
ParameterTypeRequiredDescription
limit integer no Max number of connections to return.
page integer no Page number for pagination.
get_connection Read

Get detailed information about an IFTTT connection.

Lua path
app.integrations.ifttt.get_connection
Full name
ifttt.ifttt_get_connection
ParameterTypeRequiredDescription
id string yes The connection ID.
get_current_user Read

Get the currently authenticated IFTTT user.

Lua path
app.integrations.ifttt.get_current_user
Full name
ifttt.ifttt_get_current_user
ParameterTypeRequiredDescription
No parameters.