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

# On marketing email event

> Run an automation when any supported marketing email event.

`brevo.onMarketingEmailEvent` watches marketing email webhooks. Use a narrower trigger when only one event matters.

## Example

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

export default automation("Handle Brevo marketing email event", () => {
  const event = brevo.onMarketingEmailEvent()
  log(t`Brevo ${event.family} / ${event.type}`)
})
```

## Options

`account?: string | IntegrationAccountReference<"brevo">` selects a static Brevo API-key binding and defaults to the project binding. Runtime signals cannot select the watched account.

## Trigger data

`family` is `marketingEmail`. `type` is one of `delivered | hardBounced | softBounced | markedAsSpam | opened | clicked | unsubscribed`. Every event includes `webhookId` and the complete provider callback in `event`. Depending on the family, optional normalized fields include message identity, email or phone, campaign identity, timestamps, status, reason, link, reply, list IDs, and credit usage.

Automate.ax manages authenticated, non-batched Brevo webhooks for the required channels and deduplicates exact callback retries. A callback also matches `brevo.onEvent` and its family trigger when those triggers are present.
