> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Zoho CRM: README

> Send an email to a record. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Send an email to a record.

<Info>
  Tool ID: `zoho_crm_send_mail_send_mail`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zoho_crm_send_mail_send_mail',
  {
    "moduleName": "Example",
    "id": "id_123",
    "data": [
      {
        "from": {
          "email": "jane.doe@example.com"
        },
        "to": [
          {
            "email": "jane.doe@example.com"
          }
        ]
      }
    ]
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={null}
deepline tools execute zoho_crm_send_mail_send_mail --input '{
  "moduleName": "Example",
  "id": "id_123",
  "data": [
    {
      "from": {
        "email": "jane.doe@example.com"
      },
      "to": [
        {
          "email": "jane.doe@example.com"
        }
      ]
    }
  ]
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "data": [
      {
        "code": "SUCCESS",
        "status": "success",
        "message": "Example message"
      }
    ]
  }
}
```

Use `deepline tools get zoho_crm_send_mail_send_mail --json` for the latest machine-readable contract.

## Input reference

Root object for the send mail request.

| Name                 | Type     | Required | Default | Details                                          |
| -------------------- | -------- | -------- | ------- | ------------------------------------------------ |
| `payload.moduleName` | `string` | Yes      | —       | The API name of the module Maximum length: 100.  |
| `payload.id`         | `string` | Yes      | —       | The unique ID of the record Maximum length: 100. |
| `payload.data`       | `array`  | Yes      | —       | List of mail objects. Maximum items: 1.          |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Root object for the send mail request.",
    "properties": {
      "moduleName": {
        "type": "string",
        "description": "The API name of the module",
        "maxLength": 100
      },
      "id": {
        "type": "string",
        "description": "The unique ID of the record",
        "maxLength": 100
      },
      "data": {
        "type": "array",
        "description": "List of mail objects.",
        "maxItems": 1,
        "items": {
          "type": "object",
          "description": "Detailed email configuration.",
          "properties": {
            "from": {
              "type": "object",
              "description": "User email and name details.",
              "properties": {
                "user_name": {
                  "type": "string",
                  "description": "Name",
                  "maxLength": 255
                },
                "email": {
                  "type": "string",
                  "description": "Email address",
                  "maxLength": 255
                }
              },
              "required": [
                "email"
              ],
              "additionalProperties": false
            },
            "to": {
              "type": "array",
              "description": "Primary recipients",
              "maxItems": 50,
              "items": {
                "type": "object",
                "description": "User email and name details.",
                "properties": {
                  "user_name": {
                    "type": "string",
                    "description": "Name",
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address",
                    "maxLength": 255
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            },
            "cc": {
              "type": "array",
              "description": "CC recipients",
              "maxItems": 50,
              "items": {
                "type": "object",
                "description": "User email and name details.",
                "properties": {
                  "user_name": {
                    "type": "string",
                    "description": "Name",
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address",
                    "maxLength": 255
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            },
            "bcc": {
              "type": "array",
              "description": "BCC recipients",
              "maxItems": 50,
              "items": {
                "type": "object",
                "description": "User email and name details.",
                "properties": {
                  "user_name": {
                    "type": "string",
                    "description": "Name",
                    "maxLength": 255
                  },
                  "email": {
                    "type": "string",
                    "description": "Email address",
                    "maxLength": 255
                  }
                },
                "required": [
                  "email"
                ],
                "additionalProperties": false
              }
            },
            "reply_to": {
              "type": "object",
              "description": "User email and name details.",
              "properties": {
                "user_name": {
                  "type": "string",
                  "description": "Name",
                  "maxLength": 255
                },
                "email": {
                  "type": "string",
                  "description": "Email address",
                  "maxLength": 255
                }
              },
              "required": [
                "email"
              ],
              "additionalProperties": false
            },
            "subject": {
              "type": "string",
              "description": "Email subject",
              "maxLength": 1000
            },
            "content": {
              "type": "string",
              "description": "Body content",
              "maxLength": 100000
            },
            "mail_format": {
              "type": "string",
              "description": "Format",
              "enum": [
                "html",
                "text"
              ]
            },
            "org_email": {
              "type": "boolean",
              "description": "Send via org email"
            },
            "scheduled_time": {
              "type": "string",
              "description": "ISO8601 time",
              "format": "date-time"
            },
            "consent_email": {
              "type": "boolean",
              "description": "GDPR consent flag"
            },
            "template": {
              "type": "object",
              "description": "Template reference",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Template ID",
                  "maxLength": 100
                }
              },
              "additionalProperties": false
            },
            "inventory_details": {
              "type": "object",
              "description": "Inventory details",
              "properties": {
                "inventory_template": {
                  "type": "object",
                  "description": "Inventory template object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "description": "ID",
                      "maxLength": 100
                    },
                    "name": {
                      "type": "string",
                      "description": "Name",
                      "maxLength": 100
                    }
                  },
                  "additionalProperties": false
                },
                "paper_type": {
                  "type": "string",
                  "description": "Paper size",
                  "enum": [
                    "default",
                    "A4",
                    "us_letter"
                  ]
                },
                "view_type": {
                  "type": "string",
                  "description": "Orientation",
                  "enum": [
                    "portrait",
                    "landscape"
                  ]
                }
              },
              "additionalProperties": false
            },
            "data_subject_request": {
              "type": "object",
              "description": "GDPR request details",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Request ID",
                  "maxLength": 100
                },
                "type": {
                  "type": "string",
                  "description": "Request type",
                  "enum": [
                    "access",
                    "rectify",
                    "export"
                  ]
                }
              },
              "additionalProperties": false
            },
            "attachments": {
              "type": "array",
              "description": "ZFS file IDs",
              "maxItems": 10,
              "items": {
                "type": "object",
                "description": "File object",
                "properties": {
                  "id": {
                    "type": "string",
                    "description": "File ID",
                    "maxLength": 255
                  }
                },
                "additionalProperties": false
              }
            }
          },
          "required": [
            "from",
            "to"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "moduleName",
      "id",
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                    | Type        | Required | Default | Details                                        |
| --------------------------------------- | ----------- | -------- | ------- | ---------------------------------------------- |
| `result.data`                           | `object`    | Yes      | —       | Successful operation response.                 |
| `result.data.data`                      | `array`     | No       | —       | Results list Maximum items: 10.                |
| `result.data.data[].code`               | `"SUCCESS"` | No       | —       | Code Allowed: `SUCCESS`.                       |
| `result.data.data[].status`             | `"success"` | No       | —       | Status Allowed: `success`.                     |
| `result.data.data[].message`            | `string`    | No       | —       | Message Maximum length: 500.                   |
| `result.data.data[].details`            | `object`    | No       | —       | Meta details                                   |
| `result.data.data[].details.message_id` | `string`    | No       | —       | Message ID Maximum length: 255.                |
| `result.meta`                           | `object`    | No       | —       | Additional response metadata (status, paging). |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Successful operation response.",
        "properties": {
          "data": {
            "type": "array",
            "description": "Results list",
            "maxItems": 10,
            "items": {
              "type": "object",
              "description": "Status item",
              "properties": {
                "code": {
                  "type": "string",
                  "description": "Code",
                  "enum": [
                    "SUCCESS"
                  ]
                },
                "status": {
                  "type": "string",
                  "description": "Status",
                  "enum": [
                    "success"
                  ]
                },
                "message": {
                  "type": "string",
                  "description": "Message",
                  "maxLength": 500
                },
                "details": {
                  "type": "object",
                  "description": "Meta details",
                  "properties": {
                    "message_id": {
                      "type": "string",
                      "description": "Message ID",
                      "maxLength": 255
                    }
                  },
                  "additionalProperties": false
                }
              },
              "additionalProperties": false
            }
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
