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

# HubSpot: Log Email

> Log a sent or received email on the HubSpot timeline of contacts, companies, or deals. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

Log a sent or received email on the HubSpot timeline of contacts, companies, or deals.

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

## 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(
  'hubspot_log_email',
  {
    "time_stamp": "example"
  },
);

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

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute hubspot_log_email --input '{
  "time_stamp": "example"
}' --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": {
    "time_stamp": "example"
  }
}
```

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

## Input reference

Log a HubSpot email engagement payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.id` | `string` | No | — | — |
| `payload.time_stamp` | `string` | Yes | — | — |
| `payload.created_date` | `string` | No | — | — |
| `payload.subject` | `string` | No | — | — |
| `payload.text` | `string` | No | — | — |
| `payload.html` | `string` | No | — | — |
| `payload.direction` | `"EMAIL" \| "INCOMING_EMAIL" \| "FORWARDED_EMAIL"` | No | — | Allowed: `EMAIL`, `INCOMING_EMAIL`, `FORWARDED_EMAIL`. |
| `payload.status` | `string` | No | — | — |
| `payload.owner` | `string` | No | — | — |
| `payload.associations` | `array` | No | — | — |

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

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Log a HubSpot email engagement payload.",
    "properties": {
      "id": {
        "type": "string"
      },
      "time_stamp": {
        "type": "string"
      },
      "created_date": {
        "type": "string"
      },
      "subject": {
        "type": "string"
      },
      "text": {
        "type": "string"
      },
      "html": {
        "type": "string"
      },
      "direction": {
        "type": "string",
        "enum": [
          "EMAIL",
          "INCOMING_EMAIL",
          "FORWARDED_EMAIL"
        ]
      },
      "status": {
        "type": "string"
      },
      "owner": {
        "type": "string"
      },
      "associations": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "to": {
              "type": "number"
            },
            "types": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "association_category": {
                    "type": "string"
                  },
                  "association_type_Id": {
                    "type": "number"
                  }
                },
                "required": [
                  "association_category",
                  "association_type_Id"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "to",
            "types"
          ],
          "additionalProperties": false
        }
      }
    },
    "required": [
      "time_stamp"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

Standard tool result payload.

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | Provider response payload. |
| `result.data.id` | `string` | No | — | — |
| `result.data.time_stamp` | `string` | Yes | — | — |
| `result.data.created_date` | `string` | No | — | — |
| `result.data.subject` | `string` | No | — | — |
| `result.data.text` | `string` | No | — | — |
| `result.data.html` | `string` | No | — | — |
| `result.data.direction` | `"EMAIL" \| "INCOMING_EMAIL" \| "FORWARDED_EMAIL"` | No | — | Allowed: `EMAIL`, `INCOMING_EMAIL`, `FORWARDED_EMAIL`. |
| `result.data.status` | `string` | No | — | — |
| `result.data.owner` | `string` | No | — | — |
| `result.data.associations` | `array` | No | — | — |
| `result.data.associations[].to` | `number` | Yes | — | — |
| `result.data.associations[].types` | `array` | Yes | — | — |
| `result.data.associations[].types[].association_category` | `string` | Yes | — | — |
| `result.data.associations[].types[].association_type_Id` | `number` | Yes | — | — |
| `result.meta` | `record` | 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": "Provider response payload.",
        "properties": {
          "id": {
            "type": "string"
          },
          "time_stamp": {
            "type": "string"
          },
          "created_date": {
            "type": "string"
          },
          "subject": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "html": {
            "type": "string"
          },
          "direction": {
            "type": "string",
            "enum": [
              "EMAIL",
              "INCOMING_EMAIL",
              "FORWARDED_EMAIL"
            ]
          },
          "status": {
            "type": "string"
          },
          "owner": {
            "type": "string"
          },
          "associations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "to": {
                  "type": "number"
                },
                "types": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "association_category": {
                        "type": "string"
                      },
                      "association_type_Id": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "association_category",
                      "association_type_Id"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "to",
                "types"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "time_stamp"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": {}
      }
    },
    "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

* [HubSpot provider guide](https://deepline.com/docs/providers/hubspot/guide.md)
* [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.