Zoho: Associate Email
Zoho associateEmail.associateEmail: arguments, response, policy and SDK examples.
← Associate email operations · Get started
Operation zoho.associateemail
Provider route: POST /crm/v8/{module}/{recordId}/actions/associate_email. Alter supplies the connection’s credentials and routing.
Call through Alter
Section titled “Call through Alter”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["associateEmail"]["associateEmail"]>[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.associateEmail.associateEmail(input); const result = await call.wait(); return result.bodyJson(); } finally { await app.close(); }}import osfrom alter_sdk import Appfrom 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.associate_email.associate_email(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
path | object | Required within parent | Additional keys: not allowed |
path.module | string | Required within parent | Maximum length: 100 |
path.recordId | string | Required within parent | Maximum length: 100 |
body | Model | Required within parent | Expand Associate Email — request body — body |
Referenced models: Associate Email — request body — body
Response
Section titled “Response”Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | Model | Root | Expand Associate Email — response body |
Referenced models: Associate Email — response body
Schemas
Section titled “Schemas”Associate Email — request body — body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Request body for associating an email with a record. Additional keys: not allowed |
data | array | Required within parent | List of email objects to associate with the record. Maximum items: 50 Minimum items: 1 |
data[] | Model | Each item | Expand Associate Email — request body — body data item |
Referenced models: Associate Email — request body — body data item
Associate Email — response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Generic wrapper for multiple record action responses. Additional keys: not allowed |
Emails | array | Optional | Array of result statuses for each email association operation. Maximum items: 50 |
Emails[] | object | Each item | Individual result for a specific email association. Additional keys: not allowed |
Emails[].code | string | Optional | Status code indicating the result of the operation. Possible values:SUCCESS, ERROR. Known values: SUCCESS Maximum length: 50 |
Emails[].details | object | Optional | Contextual details about the operation result. Additional keys: not allowed |
Emails[].details.message_id | string | Required within parent | The original message ID of the email that was processed. Maximum length: 255 |
Emails[].message | string | Optional | Human-readable message describing the operation result. Maximum length: 255 |
Emails[].status | string | Optional | Operation status. Possible values:success, error. Known values: success Maximum length: 50 |
Associate Email — request body — body data item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Detailed email metadata object for association. Additional keys: not allowed |
attachments | array | Optional | List of attachments associated with the email. Use the [Files API](files.yaml#$.paths./files.get) to retrieve attachment IDs. Maximum items: 20 |
attachments[] | Model | Each item | Expand Associate Email — request body — body data item attachments item |
bcc | array | Optional | Blind carbon copy recipients of the email. Maximum items: 50 |
bcc[] | Model | Each item | Expand Associate Email — request body — body data item from |
cc | array | Optional | Carbon copy recipients of the email. Maximum items: 50 |
cc[] | Model | Each item | Expand Associate Email — request body — body data item from |
content | string | Required within parent | The email body content. Maximum length: 32000 |
date_time | string | Required within parent | The timestamp of the email (ISO 8601 format). Format: date-time Maximum length: 50 |
from | Model | Required within parent | Expand Associate Email — request body — body data item from |
mail_format | string | Optional | The format of the email content. Default: text One of: text, html |
original_message_id | string | Required within parent | The unique identifier of the email from the mail server. This is used to prevent duplicate email associations. Maximum length: 255 |
sent | boolean | Required within parent | Indicates whether the email was sent (true) or received (false) by the CRM user. |
subject | string | Required within parent | The subject line of the email. Maximum length: 500 |
to | array | Required within parent | Primary recipients of the email. Maximum items: 50 |
to[] | Model | Each item | Expand Associate Email — request body — body data item from |
Referenced models: Associate Email — request body — body data item attachments item, Associate Email — request body — body data item from
Associate Email — request body — body data item attachments item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Reference to an email attachment. Additional keys: not allowed |
id | string | Required within parent | The attachment ID. Use the [Files API](files.yaml#$.paths./files.get) to retrieve attachment IDs. Maximum length: 100 |
Associate Email — request body — body data item from
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Object representing an email address and display name. Additional keys: not allowed |
email | string | Required within parent | The actual email address. Format: email Maximum length: 255 |
user_name | string | Optional | The display name of the email recipient or sender. Maximum length: 255 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.associateemail. Catalog operation: associateEmail. 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.