> ## 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: Deal Link Emails Link Emails To Deals

> Link a contact's emails to Zoho CRM deals. Includes SDK V2 guidance, input constraints, response fields, and Deepline credit cost.

Link a contact's emails to Zoho CRM deals.

> [!NOTE]
>
> Tool ID: `zoho_crm_deal_link_emails_link_emails_to_deals`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'zoho_crm_deal_link_emails_link_emails_to_deals',
  {
    "contactId": "1238016000000476011"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute zoho_crm_deal_link_emails_link_emails_to_deals --input '{
  "contactId": "1238016000000476011"
}' --json
```

## Example response

The SDK returns this shape at `result.toolResponse.raw`. The example values illustrate the response.

```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
{
  "data": {
    "Emails": [
      {
        "status": "success",
        "code": "SUCCESS",
        "message": "Example message",
        "details": {
          "message_id": "message_123"
        }
      }
    ]
  }
}
```

Use `deepline describe zoho_crm_deal_link_emails_link_emails_to_deals --json` for the latest machine-readable contract.

## Input reference

Request body schema

| 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.Emails` | `array` | No | — | List of emails to be linked to deals Maximum items: 20. |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Request body schema",
    "properties": {
      "contactId": {
        "type": "string",
        "description": "The ID of the contact to which the email is to be linked or unlinked",
        "enum": [
          "1238016000000476011",
          "1238016000000674013"
        ]
      },
      "Emails": {
        "type": "array",
        "description": "List of emails to be linked to deals",
        "maxItems": 20,
        "items": {
          "type": "object",
          "description": "Email link details",
          "properties": {
            "message_id": {
              "type": "string",
              "description": "Unique identifier of the email message",
              "enum": [
                "fa3efd2e3d21c63dfb3a1ead81cfbcac3428b9eb290577709d7f12289b5aa1bf5b2bd0f6744144c7a9aae67068ccdc7f"
              ]
            },
            "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": "Details of the record to which the email is to be linked",
              "properties": {
                "module": {
                  "type": "object",
                  "description": "Module information",
                  "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 linked record",
                  "enum": [
                    "Sai Deal"
                  ]
                },
                "id": {
                  "type": "string",
                  "description": "Unique identifier of the linked record",
                  "enum": [
                    "1238016000000514024",
                    "1238016000000002676"
                  ]
                }
              },
              "required": [
                "module",
                "id"
              ],
              "additionalProperties": false
            }
          },
          "required": [
            "message_id",
            "owner",
            "linked_record"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "contactId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Response schema |
| `result.data.Emails` | `array` | Yes | — | List of email link operation results Maximum items: 20. |
| `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: 255. |
| `result.meta` | `object` | No | — | Additional response metadata (status, paging). |

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

  ### Output JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Response schema",
        "properties": {
          "Emails": {
            "type": "array",
            "description": "List of email link operation results",
            "maxItems": 20,
            "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": 255
                    }
                  },
                  "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](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.