Zoho: Email Templates
Zoho emailTemplates.getEmailTemplates: arguments, response, policy and SDK examples.
← Email templates operations · Get started
Operation zoho.getemailtemplates
Provider route: GET /crm/v8/settings/email_templates. 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["emailTemplates"]["getEmailTemplates"]>[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.emailTemplates.getEmailTemplates(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.email_templates.get_email_templates(arguments) result = await call.wait() return result.body_json()| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Additional keys: not allowed |
query | object | Optional | Additional keys: not allowed |
query.module | string | Optional | Maximum length: 255 |
query.per_page | integer | Optional | Default: 200 Format: int32 Maximum: 200 |
query.page | integer | Optional | Default: 1 Format: int32 Minimum: 1 |
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 |
|---|---|---|---|
$ | JSON | Root | |
$ (anyOf 1) | Model | Alternative | Expand Email Templates — response body — Successful response for email templates retrieval |
$ (anyOf 2) | null | Alternative |
Referenced models: Email Templates — response body — Successful response for email templates retrieval
Schemas
Section titled “Schemas”3 more schemas are linked from the tables above, on the schema pages.
Email Templates — response body — Successful response for email templates retrieval
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Successful response for email templates retrieval Additional keys: not allowed |
email_templates | array | Required within parent | Represents the list of email templates matching the request criteria. Maximum items: 2000 |
email_templates[] | Model | Each item | Expand Email Templates — response body — Successful response for email templates retrieval email templates item |
info | Model | Required within parent | Expand Email Templates — response body — Successful response for email templates retrieval info |
Referenced models: Email Templates — response body — Successful response for email templates retrieval email templates item, Email Templates — response body — Successful response for email templates retrieval info
Email Templates — response body — Successful response for email templates retrieval email templates item
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents an Email Template in list view with summary information, including metadata, statistics, and association details. Additional keys: not allowed |
active | boolean | Required within parent | Indicates whether the Email Template is active. Possible values: **true** - The template is active. **false** - The template is inactive/deleted. |
associated | boolean | Required within parent | Indicates whether the Email Template is currently associated with one or more CRM components. Possible values: **true** - The template is associated with one or more CRM components. **false** - The template is not associated with any CRM component. |
attachments | JSON | Required within parent | |
attachments (anyOf 1) | array | Alternative | Represents the list of attachments associated with the Email Template. Maximum items: 10 |
attachments (anyOf 1)[] | Model | Each item | Expand Email Templates — response body — Successful response for email templates retrieval email templates item attachments null item |
attachments (anyOf 2) | null | Alternative | Represents the list of attachments associated with the Email Template. Maximum items: 10 |
attachments (anyOf 2)[] | Model | Each item | Expand Email Templates — response body — Successful response for email templates retrieval email templates item attachments null item |
category | string | Required within parent | Template category - normal, draft, marketplace, plugin, or default Known values: normal, draft, marketplace, plugin, system_templates |
consent_linked | boolean | Required within parent | Indicates whether this Email Template is linked to a consent form. Possible values: **true** - The template is linked to a consent form. **false** - The template is not linked to a consent form. |
created_by | Model | Required within parent | Expand Email Templates — response body — Successful response for email templates retrieval email templates item created by |
created_time | string | Required within parent | Represents the timestamp indicating when Zoho CRM created the Email Template. Format: date-time |
editor_mode | string | Required within parent | Represents the editor mode used to create the Email Template. Possible values: **plain_text** - The template uses plain text format. **rich_text** - The template uses rich text format. **gallery** - The template uses the gallery drag-and-drop editor. Known values: plain_text, rich_text, gallery |
favorite | boolean | Required within parent | Indicates whether the Email Template is marked as a favorite by the authenticated user. Possible values: **true** - The template is marked as a favorite. **false** - The template is not marked as a favorite. |
folder | Model | Required within parent | Expand Email Templates — response body — Successful response for email templates retrieval email templates item folder |
id | string | Required within parent | Represents the unique ID of the Email Template. Maximum length: 255 |
last_usage_time | JSON | Required within parent | |
last_usage_time (anyOf 1) | string | Alternative | Represents the timestamp indicating when the Email Template was last used. Format: date-time |
last_usage_time (anyOf 2) | null | Alternative | Represents the timestamp indicating when the Email Template was last used. Format: date-time |
last_version_statistics | object | Required within parent | Represents the email delivery and engagement statistics from the most recent version of the template. Additional keys: not allowed |
last_version_statistics.bounced | JSON | Required within parent | |
last_version_statistics.bounced (anyOf 1) | integer | Alternative | Represents the number of emails that bounced when sent using this template. Format: int32 |
last_version_statistics.bounced (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_version_statistics.clicked | JSON | Required within parent | |
last_version_statistics.clicked (anyOf 1) | integer | Alternative | Represents the number of link clicks recorded in emails sent using this template. Format: int32 |
last_version_statistics.clicked (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_version_statistics.delivered | JSON | Required within parent | |
last_version_statistics.delivered (anyOf 1) | integer | Alternative | Represents the number of emails delivered successfully when sent using this template. Format: int32 |
last_version_statistics.delivered (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_version_statistics.opened | JSON | Required within parent | |
last_version_statistics.opened (anyOf 1) | integer | Alternative | Represents the number of emails opened by recipients when sent using this template. Format: int32 |
last_version_statistics.opened (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_version_statistics.sent | JSON | Required within parent | |
last_version_statistics.sent (anyOf 1) | integer | Alternative | Represents the total number of emails sent using this template. Format: int32 |
last_version_statistics.sent (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
last_version_statistics.tracked | JSON | Required within parent | |
last_version_statistics.tracked (anyOf 1) | integer | Alternative | Represents the number of emails sent using this template for which tracking is enabled. Format: int32 |
last_version_statistics.tracked (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
modified_by | Model | Required within parent | Expand Email Templates — response body — Successful response for email templates retrieval email templates item created by |
modified_time | string | Required within parent | Represents the timestamp indicating when the Email Template was last modified. Format: date-time |
module | Model | Required within parent | Expand Email Templates — response body — Successful response for email templates retrieval email templates item module |
name | string | Required within parent | Represents the display name of the Email Template. Maximum length: 75 |
subject | string | Required within parent | Represents the email subject line of the template. Maximum length: 250 |
Referenced models: Email Templates — response body — Successful response for email templates retrieval email templates item folder, Email Templates — response body — Successful response for email templates retrieval email templates item module, Email Templates — response body — Successful response for email templates retrieval email templates item created by, Email Templates — response body — Successful response for email templates retrieval email templates item attachments null item
Email Templates — response body — Successful response for email templates retrieval info
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents the pagination metadata for the email templates list response. Additional keys: not allowed |
count | JSON | Required within parent | |
count (anyOf 1) | integer | Alternative | Represents the number of Email Template records returned in the current page. Format: int32 |
count (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
more_records | boolean | Required within parent | Indicates whether additional pages of results are available. Possible values: **true** - More records are available on subsequent pages. **false** - The current page contains the last available records. |
page | JSON | Required within parent | |
page (anyOf 1) | integer | Alternative | Represents the current page number of the paginated response. Format: int32 |
page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
per_page | JSON | Required within parent | |
per_page (anyOf 1) | integer | Alternative | Represents the number of Email Template records returned per page. Format: int32 |
per_page (anyOf 2) | string | Alternative | Pattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$ |
Email Templates — response body — Successful response for email templates retrieval email templates item folder
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | Represents a reference to the folder in which the Email Template is stored. Additional keys: not allowed |
id | string | Required within parent | Represents the unique ID of the folder. Maximum length: 255 |
name | string | Required within parent | Represents the display name of the folder. Maximum length: 255 |
Policy, approvals and errors
Section titled “Policy, approvals and errors”SDK function policy ID: zoho.getemailtemplates. Catalog operation: getEmailTemplates. 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.
No-content response statuses: [204]