KosmoKrator

productivity

Zoho CRM Lua API for KosmoKrator Agents

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

15 functions 9 read 6 write Manual OAuth token auth

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.

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

NameTypeRequiredDescription
account_namestringnoAccount (company) name.
websitestringnoAccount website URL.
phonestringnoAccount phone number.
industrystringnoIndustry 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

NameTypeRequiredDescription
first_namestringnoContact first name.
last_namestringnoContact last name.
emailstringnoContact email address.
phonestringnoContact 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

NameTypeRequiredDescription
deal_namestringnoDeal name.
amountnumbernoDeal amount.
stagestringnoDeal stage (e.g. Qualification, Negotiation, Closed Won).
closing_datestringnoExpected closing date (YYYY-MM-DD).
account_idstringnoZoho 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

NameTypeRequiredDescription
first_namestringnoLead first name.
last_namestringnoLead last name.
companystringnoLead company name.
emailstringnoLead email address.
phonestringnoLead 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

NameTypeRequiredDescription
account_idstringyesZoho CRM account ID.

Example

local result = app.integrations.zoho-crm.zoho_crm_get_account({
  account_id = ""
})

zoho_crm_get_contact

No description.

Parameters

NameTypeRequiredDescription
contact_idstringyesZoho 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

NameTypeRequiredDescription
deal_idstringyesZoho CRM deal ID.

Example

local result = app.integrations.zoho-crm.zoho_crm_get_deal({
  deal_id = ""
})

zoho_crm_get_lead

No description.

Parameters

NameTypeRequiredDescription
lead_idstringyesZoho CRM lead ID.

Example

local result = app.integrations.zoho-crm.zoho_crm_get_lead({
  lead_id = ""
})

zoho_crm_list_deals

No description.

Parameters

NameTypeRequiredDescription
pageintegernoPage number (default 1).
per_pageintegernoNumber 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

NameTypeRequiredDescription
typestringnoUser type filter (e.g. ActiveUsers, Admins, ActiveConfirmedAdmins).
pageintegernoPage number (default 1).

Example

local result = app.integrations.zoho-crm.zoho_crm_list_users({
  type = ""
  page = 0
})

zoho_crm_search_contacts

No description.

Parameters

NameTypeRequiredDescription
criteriastringnoSearch criteria expression, e.g. (Email:equals:[email protected]).
emailstringnoEmail 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

NameTypeRequiredDescription
criteriastringnoSearch criteria expression, e.g. (Email:equals:[email protected]).
emailstringnoEmail 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

NameTypeRequiredDescription
contact_idstringyesZoho CRM contact ID.
first_namestringnoUpdated first name.
last_namestringnoUpdated last name.
emailstringnoUpdated email address.
phonestringnoUpdated 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

NameTypeRequiredDescription
lead_idstringyesZoho CRM lead ID.
first_namestringnoUpdated first name.
last_namestringnoUpdated last name.
companystringnoUpdated company name.
emailstringnoUpdated email address.
phonestringnoUpdated 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:[email protected]). |
| `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:[email protected]). |
| `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.

Metadata-Derived Lua Example

local result = app.integrations.zoho_crm.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

zoho_crm_create_lead

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_create_lead
ParameterTypeRequiredDescription
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.

zoho_crm_get_lead

Retrieve a Zoho CRM lead by its ID. Returns the lead record with all populated fields.

Operation
Read read
Full name
zoho_crm.zoho_crm_get_lead
ParameterTypeRequiredDescription
lead_id string yes Zoho CRM lead ID.

zoho_crm_update_lead

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_update_lead
ParameterTypeRequiredDescription
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.

zoho_crm_search_leads

Search Zoho CRM leads by criteria or email. Use "criteria" for structured queries like (Email:equals:[email protected]). Use "email" as a shortcut to search by email address. Returns matching lead records.

Operation
Read read
Full name
zoho_crm.zoho_crm_search_leads
ParameterTypeRequiredDescription
criteria string no Search criteria expression, e.g. (Email:equals:[email protected]).
email string no Email address to search for (shortcut for criteria).

zoho_crm_create_contact

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_create_contact
ParameterTypeRequiredDescription
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.

zoho_crm_get_contact

Retrieve a Zoho CRM contact by its ID. Returns the contact record with all populated fields.

Operation
Read read
Full name
zoho_crm.zoho_crm_get_contact
ParameterTypeRequiredDescription
contact_id string yes Zoho CRM contact ID.

zoho_crm_update_contact

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_update_contact
ParameterTypeRequiredDescription
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.

zoho_crm_search_contacts

Search Zoho CRM contacts by criteria or email. Use "criteria" for structured queries like (Email:equals:[email protected]). Use "email" as a shortcut to search by email address. Returns matching contact records.

Operation
Read read
Full name
zoho_crm.zoho_crm_search_contacts
ParameterTypeRequiredDescription
criteria string no Search criteria expression, e.g. (Email:equals:[email protected]).
email string no Email address to search for (shortcut for criteria).

zoho_crm_create_account

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_create_account
ParameterTypeRequiredDescription
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).

zoho_crm_get_account

Retrieve a Zoho CRM account by its ID. Returns the account record with all populated fields.

Operation
Read read
Full name
zoho_crm.zoho_crm_get_account
ParameterTypeRequiredDescription
account_id string yes Zoho CRM account ID.

zoho_crm_create_deal

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.

Operation
Write write
Full name
zoho_crm.zoho_crm_create_deal
ParameterTypeRequiredDescription
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.

zoho_crm_get_deal

Retrieve a Zoho CRM deal by its ID. Returns the deal record with all populated fields.

Operation
Read read
Full name
zoho_crm.zoho_crm_get_deal
ParameterTypeRequiredDescription
deal_id string yes Zoho CRM deal ID.

zoho_crm_list_deals

List deals from Zoho CRM with optional pagination. Use page and per_page to control pagination. Returns deal records.

Operation
Read read
Full name
zoho_crm.zoho_crm_list_deals
ParameterTypeRequiredDescription
page integer no Page number (default 1).
per_page integer no Number of records per page (default 20, max 200).

zoho_crm_list_users

List users from Zoho CRM. Optionally filter by user type (e.g. ActiveUsers, Admins) and paginate results.

Operation
Read read
Full name
zoho_crm.zoho_crm_list_users
ParameterTypeRequiredDescription
type string no User type filter (e.g. ActiveUsers, Admins, ActiveConfirmedAdmins).
page integer no Page number (default 1).

zoho_crm_get_current_user

Retrieve the currently authenticated Zoho CRM user's profile. Returns user details including name, email, role, and other profile information.

Operation
Read read
Full name
zoho_crm.zoho_crm_get_current_user
ParameterTypeRequiredDescription
No parameters.