productivity
Wrike Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Wrike KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.wrike.*.
Use lua_read_doc("integrations.wrike") 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
Wrike workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.wrike.create_task({folderId = "example_folderId", title = "example_title", description = "example_description", importance = "example_importance", status = "example_status", dates = "example_dates", assignees = "example_assignees"}))' --json kosmo integrations:lua --eval 'print(docs.read("wrike"))' --json
kosmo integrations:lua --eval 'print(docs.read("wrike.create_task"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local wrike = app.integrations.wrike
local result = wrike.create_task({folderId = "example_folderId", title = "example_title", description = "example_description", importance = "example_importance", status = "example_status", dates = "example_dates", assignees = "example_assignees"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.wrike, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.wrike.default.* or app.integrations.wrike.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Wrike, 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 Wrike REST API — Lua API Reference
wrike_add_comment
Add a comment to a Wrike task.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | yes | ID of the task to comment on. |
text | string | yes | Comment text (supports Markdown). |
Example
local result = app.integrations.wrike.wrike_add_comment({
task_id = ""
text = ""
})
wrike_create_folder
Create a new folder in Wrike.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
title | string | yes | Title of the folder. |
parent_id | string | no | Parent folder or space ID to nest the folder under. |
description | string | no | Description of the folder. |
Example
local result = app.integrations.wrike.wrike_create_folder({
title = ""
description = ""
})
wrike_create_task
Create a new task in Wrike.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
folderId | string | yes | Folder ID to create the task in. |
title | string | yes | Title of the task. |
description | string | no | Detailed description of the task. |
importance | string | no | Task importance (High, Normal, Low). |
status | string | no | Task status (Active, Completed, Deferred). |
dates | object | no | Date settings object (start, due, type). |
assignees | array | no | Array of user IDs to assign the task to. |
Example
local result = app.integrations.wrike.wrike_create_task({
folderId = ""
title = ""
description = ""
})
wrike_get_current_user
Get the currently authenticated Wrike user.
Example
local result = app.integrations.wrike.wrike_get_current_user({
})
wrike_get_folder
Get detailed information about a Wrike folder.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
folder_id | string | yes | The folder ID. |
Example
local result = app.integrations.wrike.wrike_get_folder({
folder_id = ""
})
wrike_get_project
Get detailed information about a Wrike project.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The project ID. |
Example
local result = app.integrations.wrike.wrike_get_project({
id = ""
})
wrike_get_space
Get detailed information about a Wrike space.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
space_id | string | yes | The space ID. |
Example
local result = app.integrations.wrike.wrike_get_space({
space_id = ""
})
wrike_get_task
Get detailed information about a Wrike task.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The task ID. |
Example
local result = app.integrations.wrike.wrike_get_task({
id = ""
})
wrike_list_contacts
List contacts in Wrike.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of contacts to return. |
Example
local result = app.integrations.wrike.wrike_list_contacts({
})
wrike_list_folders
List folders in Wrike with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of folders to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
Example
local result = app.integrations.wrike.wrike_list_folders({
})
wrike_list_projects
List projects in Wrike with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by project status (Active, Completed, Deferred). |
limit | integer | no | Max number of projects to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
Example
local result = app.integrations.wrike.wrike_list_projects({
status = ""
})
wrike_list_spaces
List spaces in Wrike.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of spaces to return. |
Example
local result = app.integrations.wrike.wrike_list_spaces({
})
wrike_list_tasks
List tasks in Wrike with optional filters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
folderId | string | no | Folder ID to list tasks from. |
status | string | no | Filter by status (e.g. Active, Completed, Deferred). |
importance | string | no | Filter by importance (e.g. High, Normal, Low). |
limit | integer | no | Max number of tasks to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
Example
local result = app.integrations.wrike.wrike_list_tasks({
folderId = ""
status = ""
})
wrike_update_task
Update an existing Wrike task.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
task_id | string | yes | The task ID to update. |
title | string | no | New title for the task. |
description | string | no | New description for the task. |
status | string | no | New status (e.g. Active, Completed, Deferred). |
importance | string | no | Task importance: High, Normal, or Low. |
dates_due | string | no | New due date in YYYY-MM-DD format. |
Example
local result = app.integrations.wrike.wrike_update_task({
task_id = ""
title = ""
description = ""
})
Multi-Account Usage
If you have multiple wrike accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations.wrike.function_name({...})
-- Explicit default (portable across setups)
app.integrations.wrike.default.function_name({...})
-- Named accounts
app.integrations.wrike.work.function_name({...})
app.integrations.wrike.personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Client for the Wrike REST API — Lua API Reference
## wrike_add_comment
Add a comment to a Wrike task.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `task_id` | string | yes | ID of the task to comment on. |
| `text` | string | yes | Comment text (supports Markdown). |
### Example
```lua
local result = app.integrations.wrike.wrike_add_comment({
task_id = ""
text = ""
})
```
## wrike_create_folder
Create a new folder in Wrike.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `title` | string | yes | Title of the folder. |
| `parent_id` | string | no | Parent folder or space ID to nest the folder under. |
| `description` | string | no | Description of the folder. |
### Example
```lua
local result = app.integrations.wrike.wrike_create_folder({
title = ""
description = ""
})
```
## wrike_create_task
Create a new task in Wrike.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `folderId` | string | yes | Folder ID to create the task in. |
| `title` | string | yes | Title of the task. |
| `description` | string | no | Detailed description of the task. |
| `importance` | string | no | Task importance (High, Normal, Low). |
| `status` | string | no | Task status (Active, Completed, Deferred). |
| `dates` | object | no | Date settings object (start, due, type). |
| `assignees` | array | no | Array of user IDs to assign the task to. |
### Example
```lua
local result = app.integrations.wrike.wrike_create_task({
folderId = ""
title = ""
description = ""
})
```
## wrike_get_current_user
Get the currently authenticated Wrike user.
### Example
```lua
local result = app.integrations.wrike.wrike_get_current_user({
})
```
## wrike_get_folder
Get detailed information about a Wrike folder.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `folder_id` | string | yes | The folder ID. |
### Example
```lua
local result = app.integrations.wrike.wrike_get_folder({
folder_id = ""
})
```
## wrike_get_project
Get detailed information about a Wrike project.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The project ID. |
### Example
```lua
local result = app.integrations.wrike.wrike_get_project({
id = ""
})
```
## wrike_get_space
Get detailed information about a Wrike space.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `space_id` | string | yes | The space ID. |
### Example
```lua
local result = app.integrations.wrike.wrike_get_space({
space_id = ""
})
```
## wrike_get_task
Get detailed information about a Wrike task.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | string | yes | The task ID. |
### Example
```lua
local result = app.integrations.wrike.wrike_get_task({
id = ""
})
```
## wrike_list_contacts
List contacts in Wrike.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of contacts to return. |
### Example
```lua
local result = app.integrations.wrike.wrike_list_contacts({
})
```
## wrike_list_folders
List folders in Wrike with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of folders to return. |
| `nextPageToken` | string | no | Cursor for pagination from a previous response. |
### Example
```lua
local result = app.integrations.wrike.wrike_list_folders({
})
```
## wrike_list_projects
List projects in Wrike with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `status` | string | no | Filter by project status (Active, Completed, Deferred). |
| `limit` | integer | no | Max number of projects to return. |
| `nextPageToken` | string | no | Cursor for pagination from a previous response. |
### Example
```lua
local result = app.integrations.wrike.wrike_list_projects({
status = ""
})
```
## wrike_list_spaces
List spaces in Wrike.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `limit` | integer | no | Max number of spaces to return. |
### Example
```lua
local result = app.integrations.wrike.wrike_list_spaces({
})
```
## wrike_list_tasks
List tasks in Wrike with optional filters.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `folderId` | string | no | Folder ID to list tasks from. |
| `status` | string | no | Filter by status (e.g. Active, Completed, Deferred). |
| `importance` | string | no | Filter by importance (e.g. High, Normal, Low). |
| `limit` | integer | no | Max number of tasks to return. |
| `nextPageToken` | string | no | Cursor for pagination from a previous response. |
### Example
```lua
local result = app.integrations.wrike.wrike_list_tasks({
folderId = ""
status = ""
})
```
## wrike_update_task
Update an existing Wrike task.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `task_id` | string | yes | The task ID to update. |
| `title` | string | no | New title for the task. |
| `description` | string | no | New description for the task. |
| `status` | string | no | New status (e.g. Active, Completed, Deferred). |
| `importance` | string | no | Task importance: High, Normal, or Low. |
| `dates_due` | string | no | New due date in YYYY-MM-DD format. |
### Example
```lua
local result = app.integrations.wrike.wrike_update_task({
task_id = ""
title = ""
description = ""
})
```
---
## Multi-Account Usage
If you have multiple wrike accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations.wrike.function_name({...})
-- Explicit default (portable across setups)
app.integrations.wrike.default.function_name({...})
-- Named accounts
app.integrations.wrike.work.function_name({...})
app.integrations.wrike.personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.wrike.create_task({folderId = "example_folderId", title = "example_title", description = "example_description", importance = "example_importance", status = "example_status", dates = "example_dates", assignees = "example_assignees"})
print(result) Functions
create_task Write
Create a new task in Wrike.
- Lua path
app.integrations.wrike.create_task- Full name
wrike.wrike_create_task
| Parameter | Type | Required | Description |
|---|---|---|---|
folderId | string | yes | Folder ID to create the task in. |
title | string | yes | Title of the task. |
description | string | no | Detailed description of the task. |
importance | string | no | Task importance (High, Normal, Low). |
status | string | no | Task status (Active, Completed, Deferred). |
dates | object | no | Date settings object (start, due, type). |
assignees | array | no | Array of user IDs to assign the task to. |
get_task Read
Get detailed information about a Wrike task.
- Lua path
app.integrations.wrike.get_task- Full name
wrike.wrike_get_task
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The task ID. |
update_task Write
Update an existing Wrike task.
- Lua path
app.integrations.wrike.update_task- Full name
wrike.wrike_update_task
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | yes | The task ID to update. |
title | string | no | New title for the task. |
description | string | no | New description for the task. |
status | string | no | New status (e.g. Active, Completed, Deferred). |
importance | string | no | Task importance: High, Normal, or Low. |
dates_due | string | no | New due date in YYYY-MM-DD format. |
list_tasks Read
List tasks in Wrike with optional filters.
- Lua path
app.integrations.wrike.list_tasks- Full name
wrike.wrike_list_tasks
| Parameter | Type | Required | Description |
|---|---|---|---|
folderId | string | no | Folder ID to list tasks from. |
status | string | no | Filter by status (e.g. Active, Completed, Deferred). |
importance | string | no | Filter by importance (e.g. High, Normal, Low). |
limit | integer | no | Max number of tasks to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
add_comment Write
Add a comment to a Wrike task.
- Lua path
app.integrations.wrike.add_comment- Full name
wrike.wrike_add_comment
| Parameter | Type | Required | Description |
|---|---|---|---|
task_id | string | yes | ID of the task to comment on. |
text | string | yes | Comment text (supports Markdown). |
get_project Read
Get detailed information about a Wrike project.
- Lua path
app.integrations.wrike.get_project- Full name
wrike.wrike_get_project
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | The project ID. |
list_projects Read
List projects in Wrike with optional filters.
- Lua path
app.integrations.wrike.list_projects- Full name
wrike.wrike_list_projects
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | no | Filter by project status (Active, Completed, Deferred). |
limit | integer | no | Max number of projects to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
create_folder Write
Create a new folder in Wrike.
- Lua path
app.integrations.wrike.create_folder- Full name
wrike.wrike_create_folder
| Parameter | Type | Required | Description |
|---|---|---|---|
title | string | yes | Title of the folder. |
parent_id | string | no | Parent folder or space ID to nest the folder under. |
description | string | no | Description of the folder. |
get_folder Read
Get detailed information about a Wrike folder.
- Lua path
app.integrations.wrike.get_folder- Full name
wrike.wrike_get_folder
| Parameter | Type | Required | Description |
|---|---|---|---|
folder_id | string | yes | The folder ID. |
list_folders Read
List folders in Wrike with optional filters.
- Lua path
app.integrations.wrike.list_folders- Full name
wrike.wrike_list_folders
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of folders to return. |
nextPageToken | string | no | Cursor for pagination from a previous response. |
get_space Read
Get detailed information about a Wrike space.
- Lua path
app.integrations.wrike.get_space- Full name
wrike.wrike_get_space
| Parameter | Type | Required | Description |
|---|---|---|---|
space_id | string | yes | The space ID. |
list_spaces Read
List spaces in Wrike.
- Lua path
app.integrations.wrike.list_spaces- Full name
wrike.wrike_list_spaces
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of spaces to return. |
list_contacts Read
List contacts in Wrike.
- Lua path
app.integrations.wrike.list_contacts- Full name
wrike.wrike_list_contacts
| Parameter | Type | Required | Description |
|---|---|---|---|
limit | integer | no | Max number of contacts to return. |
get_current_user Read
Get the currently authenticated Wrike user.
- Lua path
app.integrations.wrike.get_current_user- Full name
wrike.wrike_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||