KosmoKrator

communication

Zoho Mail CLI for AI Agents

Use the Zoho Mail CLI from KosmoKrator to call Zoho Mail tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

6 functions 5 read 1 write Manual OAuth token auth

Zoho Mail CLI Setup

Zoho Mail can be configured headlessly with `kosmokrator integrations:configure zoho-mail`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure zoho-mail --set access_token="$ZOHO_MAIL_ACCESS_TOKEN" --enable --read allow --write ask --json
kosmokrator integrations:doctor zoho-mail --json
kosmokrator integrations:status --json

Credentials

Authentication type: Manual OAuth token oauth2_manual_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token ZOHO_MAIL_ACCESS_TOKEN Secret secret yes Access Token
url ZOHO_MAIL_URL URL url no API Base URL

Call Zoho Mail Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call zoho-mail.zohomail_list_messages '{
  "accountId": "example_accountId",
  "folderId": "example_folderId",
  "start": 1,
  "limit": 1,
  "searchKey": "example_searchKey"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:zoho-mail zohomail_list_messages '{
  "accountId": "example_accountId",
  "folderId": "example_folderId",
  "start": 1,
  "limit": 1,
  "searchKey": "example_searchKey"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs zoho-mail --json
kosmo integrations:docs zoho-mail.zohomail_list_messages --json
kosmo integrations:schema zoho-mail.zohomail_list_messages --json
kosmo integrations:search "Zoho Mail" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to Zoho Mail.

zoho-mail.zohomail_list_messages

Read read

List email messages in a Zoho Mail folder. Returns message summaries including sender, subject, and date.

Parameters
accountId, folderId, start, limit, searchKey

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_list_messages '{"accountId":"example_accountId","folderId":"example_folderId","start":1,"limit":1,"searchKey":"example_searchKey"}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_list_messages '{"accountId":"example_accountId","folderId":"example_folderId","start":1,"limit":1,"searchKey":"example_searchKey"}' --json

zoho-mail.zohomail_get_message

Read read

Get a single email message from Zoho Mail by ID. Returns full message content, headers, and attachment info.

Parameters
accountId, messageId

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_get_message '{"accountId":"example_accountId","messageId":"example_messageId"}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_get_message '{"accountId":"example_accountId","messageId":"example_messageId"}' --json

zoho-mail.zohomail_send_message

Write write

Send a new email message via Zoho Mail. Supports to, cc, bcc, subject, and HTML or plain text content.

Parameters
accountId, toAddress, subject, content, ccAddress, bccAddress, inReplyTo, mailFormat

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_send_message '{"accountId":"example_accountId","toAddress":"example_toAddress","subject":"example_subject","content":"example_content","ccAddress":"example_ccAddress","bccAddress":"example_bccAddress","inReplyTo":"example_inReplyTo","mailFormat":"example_mailFormat"}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_send_message '{"accountId":"example_accountId","toAddress":"example_toAddress","subject":"example_subject","content":"example_content","ccAddress":"example_ccAddress","bccAddress":"example_bccAddress","inReplyTo":"example_inReplyTo","mailFormat":"example_mailFormat"}' --json

zoho-mail.zohomail_list_folders

Read read

List all email folders in a Zoho Mail account, including Inbox, Sent, Drafts, Trash, and custom folders.

Parameters
accountId

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_list_folders '{"accountId":"example_accountId"}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_list_folders '{"accountId":"example_accountId"}' --json

zoho-mail.zohomail_list_tasks

Read read

List tasks from Zoho Mail. Returns task details including title, status, due date, and priority.

Parameters
accountId, start, limit

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_list_tasks '{"accountId":"example_accountId","start":1,"limit":1}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_list_tasks '{"accountId":"example_accountId","start":1,"limit":1}' --json

zoho-mail.zohomail_get_current_user

Read read

Get the current user's Zoho Mail account information. Returns account IDs needed for other Zoho Mail operations.

Parameters
none

Generic CLI call

kosmo integrations:call zoho-mail.zohomail_get_current_user '{}' --json

Provider shortcut

kosmo integrations:zoho-mail zohomail_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

zoho-mail.zohomail_list_messages

List email messages in a Zoho Mail folder. Returns message summaries including sender, subject, and date.

Operation
Read read
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_messages --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
folderId string no Folder ID to list messages from (default: Inbox).
start integer no Offset for pagination (default: 0).
limit integer no Maximum number of messages to return (default: 20, max: 100).
searchKey string no Search query to filter messages.

zoho-mail.zohomail_get_message

Get a single email message from Zoho Mail by ID. Returns full message content, headers, and attachment info.

Operation
Read read
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_message --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
messageId string yes The message ID to retrieve.

zoho-mail.zohomail_send_message

Send a new email message via Zoho Mail. Supports to, cc, bcc, subject, and HTML or plain text content.

Operation
Write write
Schema command
kosmo integrations:schema zoho-mail.zohomail_send_message --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID to send from.
toAddress string yes Recipient email address(es), comma-separated.
subject string yes Email subject line.
content string yes Email body content (HTML or plain text).
ccAddress string no CC recipients, comma-separated.
bccAddress string no BCC recipients, comma-separated.
inReplyTo string no Message ID to reply to (for threading).
mailFormat string no Format of the content: "html" or "plaintext" (default: "html").

zoho-mail.zohomail_list_folders

List all email folders in a Zoho Mail account, including Inbox, Sent, Drafts, Trash, and custom folders.

Operation
Read read
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_folders --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.

zoho-mail.zohomail_list_tasks

List tasks from Zoho Mail. Returns task details including title, status, due date, and priority.

Operation
Read read
Schema command
kosmo integrations:schema zoho-mail.zohomail_list_tasks --json
ParameterTypeRequiredDescription
accountId string yes The Zoho Mail account ID.
start integer no Offset for pagination (default: 0).
limit integer no Maximum number of tasks to return (default: 20).

zoho-mail.zohomail_get_current_user

Get the current user's Zoho Mail account information. Returns account IDs needed for other Zoho Mail operations.

Operation
Read read
Schema command
kosmo integrations:schema zoho-mail.zohomail_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.