> ## 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

> Link Email to Record. Zoho CRM Deal Link Emails Get Record Actions Single reference includes SDK V2 and CLI requests, input constraints, response fields,.

Link Email to Record.

<Info>
  Tool ID: `zoho_crm_deal_link_emails_get_record_actions_single`
</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_deal_link_emails_get_record_actions_single',
  {
    "contactId": "1238016000000476011",
    "messageId": "fa3efd2e3d21c63dfb3a1ead81cfbcacef42ff6e3779f724ad799f911f6b8cc6ba45cad7c0856e06f2f6ea8b0f41798b"
  },
);

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

### CLI

```bash theme={null}
deepline tools execute zoho_crm_deal_link_emails_get_record_actions_single --input '{
  "contactId": "1238016000000476011",
  "messageId": "fa3efd2e3d21c63dfb3a1ead81cfbcacef42ff6e3779f724ad799f911f6b8cc6ba45cad7c0856e06f2f6ea8b0f41798b"
}' --json
```

## Example response

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

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

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

## Input reference

Request body schema for linking email to record

| Name                | Type                                                                                                                                                                                                       | Required | Default | Details                                                                                                                                                                                                                                                               |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.contactId` | `"1238016000000476011" \| "1238016000000674013"`                                                                                                                                                           | Yes      | —       | The ID of the contact to which the email is to be linked or unlinked Allowed: `1238016000000476011`, `1238016000000674013`.                                                                                                                                           |
| `payload.messageId` | `"fa3efd2e3d21c63dfb3a1ead81cfbcacef42ff6e3779f724ad799f911f6b8cc6ba45cad7c0856e06f2f6ea8b0f41798b" \| "fa3efd2e3d21c63dfb3a1ead81cfbcac3428b9eb290577709d7f12289b5aa1bf5b2bd0f6744144c7a9aae67068ccdc7f"` | Yes      | —       | The ID of the email message to be linked or unlinked Allowed: `fa3efd2e3d21c63dfb3a1ead81cfbcacef42ff6e3779f724ad799f911f6b8cc6ba45cad7c0856e06f2f6ea8b0f41798b`, `fa3efd2e3d21c63dfb3a1ead81cfbcac3428b9eb290577709d7f12289b5aa1bf5b2bd0f6744144c7a9aae67068ccdc7f`. |
| `payload.Emails`    | `array`                                                                                                                                                                                                    | No       | —       | List of emails to be linked to records Maximum items: 1.                                                                                                                                                                                                              |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Request body schema for linking email to record",
    "properties": {
      "contactId": {
        "type": "string",
        "description": "The ID of the contact to which the email is to be linked or unlinked",
        "enum": [
          "1238016000000476011",
          "1238016000000674013"
        ]
      },
      "messageId": {
        "type": "string",
        "description": "The ID of the email message to be linked or unlinked",
        "enum": [
          "fa3efd2e3d21c63dfb3a1ead81cfbcacef42ff6e3779f724ad799f911f6b8cc6ba45cad7c0856e06f2f6ea8b0f41798b",
          "fa3efd2e3d21c63dfb3a1ead81cfbcac3428b9eb290577709d7f12289b5aa1bf5b2bd0f6744144c7a9aae67068ccdc7f"
        ]
      },
      "Emails": {
        "type": "array",
        "description": "List of emails to be linked to records",
        "maxItems": 1,
        "items": {
          "type": "object",
          "description": "Details of an email to be linked to a record",
          "properties": {
            "owner": {
              "type": "object",
              "description": "Owner of the email",
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the owner",
                  "enum": [
                    "1238016000000362001"
                  ]
                }
              },
              "additionalProperties": false
            },
            "linked_record": {
              "type": "object",
              "description": "Record to which the email is to be linked",
              "properties": {
                "module": {
                  "type": "object",
                  "description": "Module of the record",
                  "properties": {
                    "api_name": {
                      "type": "string",
                      "description": "API name of the module",
                      "enum": [
                        "Deals"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "Unique identifier of the module",
                      "enum": [
                        "1238016000000000131"
                      ]
                    }
                  },
                  "required": [
                    "id"
                  ],
                  "additionalProperties": false
                },
                "name": {
                  "type": "string",
                  "description": "Name of the record",
                  "enum": [
                    "Sai Deal"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the record",
                  "enum": [
                    "1238016000000514024"
                  ]
                }
              },
              "required": [
                "module",
                "id"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "owner",
            "linked_record"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "contactId",
      "messageId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name                                      | Type        | Required | Default | Details                                                        |
| ----------------------------------------- | ----------- | -------- | ------- | -------------------------------------------------------------- |
| `result.data`                             | `object`    | Yes      | —       | Response schema for linking email to record                    |
| `result.data.Emails`                      | `array`     | Yes      | —       | List of email link operation results Maximum items: 1.         |
| `result.data.Emails[].status`             | `"success"` | Yes      | —       | Status of the link operation Allowed: `success`.               |
| `result.data.Emails[].code`               | `"SUCCESS"` | Yes      | —       | Result code of the link operation Allowed: `SUCCESS`.          |
| `result.data.Emails[].message`            | `string`    | Yes      | —       | Detailed message about the link operation Maximum length: 256. |
| `result.data.Emails[].details`            | `object`    | Yes      | —       | Additional details about the link operation                    |
| `result.data.Emails[].details.message_id` | `string`    | Yes      | —       | Unique identifier of the email message Maximum length: 256.    |
| `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": "Response schema for linking email to record",
        "properties": {
          "Emails": {
            "type": "array",
            "description": "List of email link operation results",
            "maxItems": 1,
            "items": {
              "type": "object",
              "description": "Email link operation result",
              "properties": {
                "status": {
                  "type": "string",
                  "description": "Status of the link operation",
                  "enum": [
                    "success"
                  ]
                },
                "code": {
                  "type": "string",
                  "description": "Result code of the link operation",
                  "enum": [
                    "SUCCESS"
                  ]
                },
                "message": {
                  "type": "string",
                  "description": "Detailed message about the link operation",
                  "maxLength": 256
                },
                "details": {
                  "type": "object",
                  "description": "Additional details about the link operation",
                  "properties": {
                    "message_id": {
                      "type": "string",
                      "description": "Unique identifier of the email message",
                      "maxLength": 256
                    }
                  },
                  "required": [
                    "message_id"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "status",
                "code",
                "message",
                "details"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "Emails"
        ],
        "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)
