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

# Get email content

> Retrieve personalized content and event history for one sent Brevo email.

`getEmailContent` loads the recipient-specific message body and its event
history. It accepts either Brevo's email UUID or the message ID returned by a
send action.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { getEmailContent } from "automate.ax/brevo"

export default automation("Inspect a sent email", () => {
  onHttpRequest({ scope: "automation" })

  getEmailContent({ emailId: "<message_123@example.com>" })
})
```

## Inputs

`emailId: string` is required. `account` optionally selects the Brevo binding.
When the value is not a UUID, Automate.ax first looks up the first matching
transactional email record by message ID.

## Output

Returns `{ email, subject, body, date, events, attachmentCount?, templateId? }`.
`events` contains `{ name, time }[]`; `templateId` may be a number, `null`, or
absent. The action fails if the message ID cannot be resolved in the connected
account's retained transactional logs.
