productivity
Zoho CRM Lua API for KosmoKrator Agents
Agent-facing Lua documentation and function reference for the Zoho CRM KosmoKrator integration.Lua Namespace
Agents call this integration through app.integrations.zoho_crm.*.
Use lua_read_doc("integrations.zoho-crm") 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
Zoho CRM workflow without starting an interactive agent session.
kosmo integrations:lua --eval 'dump(app.integrations.zoho_crm.create_lead({first_name = "example_first_name", last_name = "example_last_name", company = "example_company", email = "example_email", phone = "example_phone"}))' --json kosmo integrations:lua --eval 'print(docs.read("zoho-crm"))' --json
kosmo integrations:lua --eval 'print(docs.read("zoho-crm.create_lead"))' --json Workflow file
Put repeatable logic in a Lua file, then execute it with JSON output for the calling process.
local zoho_crm = app.integrations.zoho_crm
local result = zoho_crm.create_lead({first_name = "example_first_name", last_name = "example_last_name", company = "example_company", email = "example_email", phone = "example_phone"})
dump(result) kosmo integrations:lua workflow.lua --json
kosmo integrations:lua workflow.lua --force --json integrations:lua exposes app.integrations.zoho_crm, app.mcp.*, docs.*, json.*, and regex.*. Use app.integrations.zoho_crm.default.* or app.integrations.zoho_crm.work.* when you configured named credential accounts.
MCP-only Lua
If the script only needs configured MCP servers and does not need Zoho CRM, 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 Zoho CRM REST API v7 covering leads, contacts, accounts, deals, and users — Lua API Reference
zoho_crm_create_account
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_name | string | no | Account (company) name. |
website | string | no | Account website URL. |
phone | string | no | Account phone number. |
industry | string | no | Industry type (e.g. Technology, Finance). |
Example
local result = app.integrations["zoho-crm"].zoho_crm_create_account({
account_name = ""
website = ""
phone = ""
})
zoho_crm_create_contact
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | no | Contact first name. |
last_name | string | no | Contact last name. |
email | string | no | Contact email address. |
phone | string | no | Contact phone number. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_create_contact({
first_name = ""
last_name = ""
email = ""
})
zoho_crm_create_deal
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deal_name | string | no | Deal name. |
amount | number | no | Deal amount. |
stage | string | no | Deal stage (e.g. Qualification, Negotiation, Closed Won). |
closing_date | string | no | Expected closing date (YYYY-MM-DD). |
account_id | string | no | Zoho CRM account ID to associate with the deal. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_create_deal({
deal_name = ""
amount = 0
stage = ""
})
zoho_crm_create_lead
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
first_name | string | no | Lead first name. |
last_name | string | no | Lead last name. |
company | string | no | Lead company name. |
email | string | no | Lead email address. |
phone | string | no | Lead phone number. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_create_lead({
first_name = ""
last_name = ""
company = ""
})
zoho_crm_get_account
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Zoho CRM account ID. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_get_account({
account_id = ""
})
zoho_crm_get_contact
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contact_id | string | yes | Zoho CRM contact ID. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_get_contact({
contact_id = ""
})
zoho_crm_get_current_user
No description.
Example
local result = app.integrations["zoho-crm"].zoho_crm_get_current_user({
})
zoho_crm_get_deal
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
deal_id | string | yes | Zoho CRM deal ID. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_get_deal({
deal_id = ""
})
zoho_crm_get_lead
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lead_id | string | yes | Zoho CRM lead ID. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_get_lead({
lead_id = ""
})
zoho_crm_list_deals
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Number of records per page (default 20, max 200). |
Example
local result = app.integrations["zoho-crm"].zoho_crm_list_deals({
page = 0
per_page = 0
})
zoho_crm_list_users
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | no | User type filter (e.g. ActiveUsers, Admins, ActiveConfirmedAdmins). |
page | integer | no | Page number (default 1). |
Example
local result = app.integrations["zoho-crm"].zoho_crm_list_users({
type = ""
page = 0
})
zoho_crm_search_contacts
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
criteria | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
email | string | no | Email address to search for (shortcut for criteria). |
Example
local result = app.integrations["zoho-crm"].zoho_crm_search_contacts({
criteria = ""
email = ""
})
zoho_crm_search_leads
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
criteria | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
email | string | no | Email address to search for (shortcut for criteria). |
Example
local result = app.integrations["zoho-crm"].zoho_crm_search_leads({
criteria = ""
email = ""
})
zoho_crm_update_contact
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
contact_id | string | yes | Zoho CRM contact ID. |
first_name | string | no | Updated first name. |
last_name | string | no | Updated last name. |
email | string | no | Updated email address. |
phone | string | no | Updated phone number. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_update_contact({
contact_id = ""
first_name = ""
last_name = ""
})
zoho_crm_update_lead
No description.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
lead_id | string | yes | Zoho CRM lead ID. |
first_name | string | no | Updated first name. |
last_name | string | no | Updated last name. |
company | string | no | Updated company name. |
email | string | no | Updated email address. |
phone | string | no | Updated phone number. |
Example
local result = app.integrations["zoho-crm"].zoho_crm_update_lead({
lead_id = ""
first_name = ""
last_name = ""
})
Multi-Account Usage
If you have multiple zoho-crm accounts configured, use account-specific namespaces:
-- Default account (always works)
app.integrations["zoho-crm"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["zoho-crm"].default.function_name({...})
-- Named accounts
app.integrations["zoho-crm"].work.function_name({...})
app.integrations["zoho-crm"].personal.function_name({...})
All functions are identical across accounts — only the credentials differ.
Raw agent markdown
# Client for the Zoho CRM REST API v7 covering leads, contacts, accounts, deals, and users — Lua API Reference
## zoho_crm_create_account
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `account_name` | string | no | Account (company) name. |
| `website` | string | no | Account website URL. |
| `phone` | string | no | Account phone number. |
| `industry` | string | no | Industry type (e.g. Technology, Finance). |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_create_account({
account_name = ""
website = ""
phone = ""
})
```
## zoho_crm_create_contact
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `first_name` | string | no | Contact first name. |
| `last_name` | string | no | Contact last name. |
| `email` | string | no | Contact email address. |
| `phone` | string | no | Contact phone number. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_create_contact({
first_name = ""
last_name = ""
email = ""
})
```
## zoho_crm_create_deal
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `deal_name` | string | no | Deal name. |
| `amount` | number | no | Deal amount. |
| `stage` | string | no | Deal stage (e.g. Qualification, Negotiation, Closed Won). |
| `closing_date` | string | no | Expected closing date (YYYY-MM-DD). |
| `account_id` | string | no | Zoho CRM account ID to associate with the deal. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_create_deal({
deal_name = ""
amount = 0
stage = ""
})
```
## zoho_crm_create_lead
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `first_name` | string | no | Lead first name. |
| `last_name` | string | no | Lead last name. |
| `company` | string | no | Lead company name. |
| `email` | string | no | Lead email address. |
| `phone` | string | no | Lead phone number. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_create_lead({
first_name = ""
last_name = ""
company = ""
})
```
## zoho_crm_get_account
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `account_id` | string | yes | Zoho CRM account ID. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_get_account({
account_id = ""
})
```
## zoho_crm_get_contact
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `contact_id` | string | yes | Zoho CRM contact ID. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_get_contact({
contact_id = ""
})
```
## zoho_crm_get_current_user
No description.
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_get_current_user({
})
```
## zoho_crm_get_deal
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `deal_id` | string | yes | Zoho CRM deal ID. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_get_deal({
deal_id = ""
})
```
## zoho_crm_get_lead
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `lead_id` | string | yes | Zoho CRM lead ID. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_get_lead({
lead_id = ""
})
```
## zoho_crm_list_deals
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `page` | integer | no | Page number (default 1). |
| `per_page` | integer | no | Number of records per page (default 20, max 200). |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_list_deals({
page = 0
per_page = 0
})
```
## zoho_crm_list_users
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `type` | string | no | User type filter (e.g. ActiveUsers, Admins, ActiveConfirmedAdmins). |
| `page` | integer | no | Page number (default 1). |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_list_users({
type = ""
page = 0
})
```
## zoho_crm_search_contacts
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `criteria` | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
| `email` | string | no | Email address to search for (shortcut for criteria). |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_search_contacts({
criteria = ""
email = ""
})
```
## zoho_crm_search_leads
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `criteria` | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
| `email` | string | no | Email address to search for (shortcut for criteria). |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_search_leads({
criteria = ""
email = ""
})
```
## zoho_crm_update_contact
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `contact_id` | string | yes | Zoho CRM contact ID. |
| `first_name` | string | no | Updated first name. |
| `last_name` | string | no | Updated last name. |
| `email` | string | no | Updated email address. |
| `phone` | string | no | Updated phone number. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_update_contact({
contact_id = ""
first_name = ""
last_name = ""
})
```
## zoho_crm_update_lead
No description.
### Parameters
| Name | Type | Required | Description |
|------|------|----------|-------------|
| `lead_id` | string | yes | Zoho CRM lead ID. |
| `first_name` | string | no | Updated first name. |
| `last_name` | string | no | Updated last name. |
| `company` | string | no | Updated company name. |
| `email` | string | no | Updated email address. |
| `phone` | string | no | Updated phone number. |
### Example
```lua
local result = app.integrations["zoho-crm"].zoho_crm_update_lead({
lead_id = ""
first_name = ""
last_name = ""
})
```
---
## Multi-Account Usage
If you have multiple zoho-crm accounts configured, use account-specific namespaces:
```lua
-- Default account (always works)
app.integrations["zoho-crm"].function_name({...})
-- Explicit default (portable across setups)
app.integrations["zoho-crm"].default.function_name({...})
-- Named accounts
app.integrations["zoho-crm"].work.function_name({...})
app.integrations["zoho-crm"].personal.function_name({...})
```
All functions are identical across accounts — only the credentials differ. local result = app.integrations.zoho_crm.create_lead({first_name = "example_first_name", last_name = "example_last_name", company = "example_company", email = "example_email", phone = "example_phone"})
print(result) Functions
create_lead Write
Create a new lead in Zoho CRM. Provide at least a last name or company name. Other fields (first name, email, phone) are optional. Returns the created lead with its Zoho CRM ID.
- Lua path
app.integrations.zoho_crm.create_lead- Full name
zoho-crm.zoho_crm_create_lead
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | no | Lead first name. |
last_name | string | no | Lead last name. |
company | string | no | Lead company name. |
email | string | no | Lead email address. |
phone | string | no | Lead phone number. |
get_lead Read
Retrieve a Zoho CRM lead by its ID. Returns the lead record with all populated fields.
- Lua path
app.integrations.zoho_crm.get_lead- Full name
zoho-crm.zoho_crm_get_lead
| Parameter | Type | Required | Description |
|---|---|---|---|
lead_id | string | yes | Zoho CRM lead ID. |
update_lead Write
Update an existing lead in Zoho CRM. Provide the lead ID and the fields to update (first_name, last_name, company, email, phone). Returns the update status and modified lead details.
- Lua path
app.integrations.zoho_crm.update_lead- Full name
zoho-crm.zoho_crm_update_lead
| Parameter | Type | Required | Description |
|---|---|---|---|
lead_id | string | yes | Zoho CRM lead ID. |
first_name | string | no | Updated first name. |
last_name | string | no | Updated last name. |
company | string | no | Updated company name. |
email | string | no | Updated email address. |
phone | string | no | Updated phone number. |
search_leads Read
Search Zoho CRM leads by criteria or email. Use "criteria" for structured queries like (Email:equals:john@example.com). Use "email" as a shortcut to search by email address. Returns matching lead records.
- Lua path
app.integrations.zoho_crm.search_leads- Full name
zoho-crm.zoho_crm_search_leads
| Parameter | Type | Required | Description |
|---|---|---|---|
criteria | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
email | string | no | Email address to search for (shortcut for criteria). |
create_contact Write
Create a new contact in Zoho CRM. Provide at least a last name. Other fields (first name, email, phone) are optional. Returns the created contact with its Zoho CRM ID.
- Lua path
app.integrations.zoho_crm.create_contact- Full name
zoho-crm.zoho_crm_create_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | no | Contact first name. |
last_name | string | no | Contact last name. |
email | string | no | Contact email address. |
phone | string | no | Contact phone number. |
get_contact Read
Retrieve a Zoho CRM contact by its ID. Returns the contact record with all populated fields.
- Lua path
app.integrations.zoho_crm.get_contact- Full name
zoho-crm.zoho_crm_get_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
contact_id | string | yes | Zoho CRM contact ID. |
update_contact Write
Update an existing contact in Zoho CRM. Provide the contact ID and the fields to update (first_name, last_name, email, phone). Returns the update status and modified contact details.
- Lua path
app.integrations.zoho_crm.update_contact- Full name
zoho-crm.zoho_crm_update_contact
| Parameter | Type | Required | Description |
|---|---|---|---|
contact_id | string | yes | Zoho CRM contact ID. |
first_name | string | no | Updated first name. |
last_name | string | no | Updated last name. |
email | string | no | Updated email address. |
phone | string | no | Updated phone number. |
search_contacts Read
Search Zoho CRM contacts by criteria or email. Use "criteria" for structured queries like (Email:equals:john@example.com). Use "email" as a shortcut to search by email address. Returns matching contact records.
- Lua path
app.integrations.zoho_crm.search_contacts- Full name
zoho-crm.zoho_crm_search_contacts
| Parameter | Type | Required | Description |
|---|---|---|---|
criteria | string | no | Search criteria expression, e.g. (Email:equals:john@example.com). |
email | string | no | Email address to search for (shortcut for criteria). |
create_account Write
Create a new account (organization) in Zoho CRM. Provide at least an account name. Other fields (website, phone, industry) are optional. Returns the created account with its Zoho CRM ID.
- Lua path
app.integrations.zoho_crm.create_account- Full name
zoho-crm.zoho_crm_create_account
| Parameter | Type | Required | Description |
|---|---|---|---|
account_name | string | no | Account (company) name. |
website | string | no | Account website URL. |
phone | string | no | Account phone number. |
industry | string | no | Industry type (e.g. Technology, Finance). |
get_account Read
Retrieve a Zoho CRM account by its ID. Returns the account record with all populated fields.
- Lua path
app.integrations.zoho_crm.get_account- Full name
zoho-crm.zoho_crm_get_account
| Parameter | Type | Required | Description |
|---|---|---|---|
account_id | string | yes | Zoho CRM account ID. |
create_deal Write
Create a new deal (opportunity) in Zoho CRM. Provide at least a deal name and stage. Other fields (amount, closing_date, account_id) are optional. Returns the created deal with its Zoho CRM ID.
- Lua path
app.integrations.zoho_crm.create_deal- Full name
zoho-crm.zoho_crm_create_deal
| Parameter | Type | Required | Description |
|---|---|---|---|
deal_name | string | no | Deal name. |
amount | number | no | Deal amount. |
stage | string | no | Deal stage (e.g. Qualification, Negotiation, Closed Won). |
closing_date | string | no | Expected closing date (YYYY-MM-DD). |
account_id | string | no | Zoho CRM account ID to associate with the deal. |
get_deal Read
Retrieve a Zoho CRM deal by its ID. Returns the deal record with all populated fields.
- Lua path
app.integrations.zoho_crm.get_deal- Full name
zoho-crm.zoho_crm_get_deal
| Parameter | Type | Required | Description |
|---|---|---|---|
deal_id | string | yes | Zoho CRM deal ID. |
list_deals Read
List deals from Zoho CRM with optional pagination. Use page and per_page to control pagination. Returns deal records.
- Lua path
app.integrations.zoho_crm.list_deals- Full name
zoho-crm.zoho_crm_list_deals
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | no | Page number (default 1). |
per_page | integer | no | Number of records per page (default 20, max 200). |
list_users Read
List users from Zoho CRM. Optionally filter by user type (e.g. ActiveUsers, Admins) and paginate results.
- Lua path
app.integrations.zoho_crm.list_users- Full name
zoho-crm.zoho_crm_list_users
| Parameter | Type | Required | Description |
|---|---|---|---|
type | string | no | User type filter (e.g. ActiveUsers, Admins, ActiveConfirmedAdmins). |
page | integer | no | Page number (default 1). |
get_current_user Read
Retrieve the currently authenticated Zoho CRM user's profile. Returns user details including name, email, role, and other profile information.
- Lua path
app.integrations.zoho_crm.get_current_user- Full name
zoho-crm.zoho_crm_get_current_user
| Parameter | Type | Required | Description |
|---|---|---|---|
| No parameters. | |||