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

# Create template

> Create a Brevo transactional email template from inline HTML or a public URL.

`createTemplate` creates the template definition; set `isActive` when it should
be immediately available to `sendEmail`.

## Example

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

export default automation("Create a receipt template", () => {
  onHttpRequest({ scope: "automation" })

  createTemplate({
    templateName: "Receipt",
    subject: "Your receipt",
    sender: { email: "receipts@example.com", name: "Example" },
    htmlContent: "<p>Thanks for your purchase.</p>",
    isActive: true,
  })
})
```

## Inputs

`templateName`, `subject`, and registered `sender` are required. Provide exactly
one of inline `htmlContent` (at least 11 characters) or public `htmlUrl`.
Optional `attachmentUrl`, `isActive`, `replyTo`, `tag`, and personalized
`toField` are supported. `account` selects the Brevo binding.

## Output

Returns `{ id: number }`. Creating a template does not send or test it and does
not consume a transactional send credit.
