Skip to content

Zoho: Send an email to a record

Zoho sendMail.sendMail: arguments, response, policy and SDK examples.

← Send mail operations · Get started

Operation zoho.sendmail

Provider route: POST /crm/v8/{moduleName}/{id}/actions/send_mail. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/zoho with npm, or alter-sdk-zoho with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { ZohoIntegration } from "@alter-ai/zoho";
async function execute(input: Parameters<ZohoIntegration["sendMail"]["sendMail"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new ZohoIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.sendMail.sendMail(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_zoho import ZohoIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = ZohoIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.send_mail.send_mail(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.moduleNamestringRequired within parentModule API name
Maximum length: 100
path.idstringRequired within parentRecord ID
Maximum length: 100
bodyModelRequired within parentExpand Send an email to a record — request body — body

Referenced models: Send an email to a record — request body — body

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Send an email to a record — response body

Referenced models: Send an email to a record — response body

Send an email to a record — response body
FieldTypePresenceDescription and constraints
$objectRootRepresents the response returned after the email sends successfully.
Additional keys: not allowed
dataarrayOptionalRepresents the list of mail-send results, one item per email request.
Maximum items: 10
data[]objectEach itemRepresents the result status for a single email send attempt.
Additional keys: not allowed
data[].codestringOptionalRepresents the status code for the send operation. Possible values: **SUCCESS** - The email was sent successfully.
Known values: SUCCESS
data[].detailsobjectOptionalRepresents additional metadata returned for the send operation, including the message identifier.
Additional keys: not allowed
data[].details.message_idstringOptionalRepresents the unique message identifier assigned to the sent email.
Maximum length: 255
data[].messagestringOptionalRepresents the status message for the send operation.
Maximum length: 500
data[].statusstringOptionalRepresents the status of the email send operation. Possible values: **success** - The email was sent successfully.
Known values: success
Send an email to a record — request body — body
FieldTypePresenceDescription and constraints
$objectRootRepresents the top-level request body for the Send Mail API, containing the email configuration objects.
Additional keys: not allowed
dataarrayRequired within parentContains the list of email configuration objects to send.
Maximum items: 1
data[]objectEach itemRepresents the email configuration for a single send-mail request.
Additional keys: not allowed
data[].attachmentsarrayOptionalRepresents the list of files to attach to the email, referenced by their Zoho File System (ZFS) IDs.
Maximum items: 10
data[].attachments[]objectEach itemRepresents a file attachment referenced by its Zoho File System (ZFS) ID.
Additional keys: not allowed
data[].attachments[].idstringOptionalRepresents the unique identifier of the file in the Zoho File System (ZFS).
Maximum length: 255
data[].bccarrayOptionalRepresents the list of BCC (blind carbon copy) recipients for the email.
Maximum items: 50
data[].bcc[]ModelEach itemExpand Send an email to a record — request body — body data item from
data[].ccarrayOptionalRepresents the list of CC (carbon copy) recipients for the email.
Maximum items: 50
data[].cc[]ModelEach itemExpand Send an email to a record — request body — body data item from
data[].consent_emailbooleanOptionalIndicates whether the email is a GDPR consent email. Possible values: **true** - The email is a GDPR consent request. **false** - The email is not a GDPR consent request.
data[].contentstringOptionalRepresents the body content of the email.
Maximum length: 100000
data[].data_subject_requestobjectOptionalRepresents the GDPR data subject request associated with the email.
Additional keys: not allowed
data[].data_subject_request.idstringOptionalRepresents the unique identifier of the GDPR data subject request.
Maximum length: 100
data[].data_subject_request.typestringOptionalRepresents the type of GDPR data subject request. Possible values: **access** - A data access request. **rectify** - A data rectification request. **export** - A data export request.
One of: access, rectify, export
data[].fromModelRequired within parentExpand Send an email to a record — request body — body data item from
data[].inventory_detailsobjectOptionalRepresents the inventory template details to attach to the email.
Additional keys: not allowed
data[].inventory_details.inventory_templateobjectOptionalRepresents the inventory template to attach to the email. Refer to the [Get Inventory Templates](inventory_templates.yaml#$.paths./settings/inventory_templates.get) resource for valid values.
Additional keys: not allowed
data[].inventory_details.inventory_template.idstringOptionalRepresents the unique identifier of the inventory template. Refer to the [Get Inventory Templates](inventory_templates.yaml#$.paths./settings/inventory_templates.get) resource for valid values.
Maximum length: 100
data[].inventory_details.inventory_template.namestringOptionalRepresents the name of the inventory template.
Maximum length: 100
data[].inventory_details.paper_typestringOptionalRepresents the paper size for the inventory template attachment. Possible values: **default** - Uses the default paper size. **A4** - A4 paper size. **us_letter** - US Letter paper size.
One of: default, A4, us_letter
data[].inventory_details.view_typestringOptionalRepresents the page orientation for the inventory template attachment. Possible values: **portrait** - Portrait orientation. **landscape** - Landscape orientation.
One of: portrait, landscape
data[].mail_formatstringOptionalRepresents the format of the email body. Possible values: **html** - HTML-formatted email. **text** - Plain text email.
One of: html, text
data[].org_emailbooleanOptionalIndicates whether to send the email using the organization email address instead of the sender individual email address. Possible values: **true** - Sends the email using the organization email address. **false** - Sends the email using the sender individual email address.
data[].reply_toModelOptionalExpand Send an email to a record — request body — body data item from
data[].scheduled_timestringOptionalRepresents the scheduled date and time to send the email, in ISO 8601 date-time format.
Format: date-time
data[].subjectstringOptionalRepresents the subject line of the email.
Maximum length: 1000
data[].templateobjectOptionalRepresents the Email Template to use for the email. Refer to the [Get Email Templates](email_templates.yaml#$.paths./settings/email_templates.get) resource for valid values.
Additional keys: not allowed
data[].template.idstringOptionalRepresents the unique identifier of the Email Template. Refer to the [Get Email Templates](email_templates.yaml#$.paths./settings/email_templates.get) resource for valid values.
Maximum length: 100
data[].toarrayRequired within parentRepresents the list of primary recipients of the email.
Maximum items: 50
data[].to[]ModelEach itemExpand Send an email to a record — request body — body data item from

Referenced models: Send an email to a record — request body — body data item from

Send an email to a record — request body — body data item from
FieldTypePresenceDescription and constraints
$objectRootRepresents an email user with an email address and an optional display name.
Additional keys: not allowed
emailstringRequired within parentRepresents the email address of the user.
Maximum length: 255
user_namestringOptionalRepresents the display name of the user.
Maximum length: 255

SDK function policy ID: zoho.sendmail. Catalog operation: sendMail. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.