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

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Log email

> Log an email on HubSpot CRM record timelines without sending it.

Use `hubspot.logEmail` to log an email on HubSpot CRM record timelines without sending it.

```ts automations/hubspot-log-email.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { hubspot } from "automate.ax/hubspot"

export default automation("Log email", () => {
  onDashboardRun({ title: "Log email" })
  hubspot.logEmail({
    timestamp: new Date(),
    subject: "Proposal follow-up",
    text: "Sent the revised proposal.",
    from: "ada@acme.example",
    to: "buyer@example.com",
    status: "SENT",
  })
})
```

## Inputs

`timestamp` is required. Optional fields include subject, text, HTML, sender and recipient email addresses, direction, status, owner, and associations. Optional second argument `{ account }` selects a named HubSpot binding.

## Output

Returns the created HubSpot email activity record.
