Skip to main content
Platform-provided resource. Datum operates this resource; you typically reference or read it rather than create it. See Platform resources.
API resource reference for EmailTemplate. See Platform resources for related platform-provided resources. To read or inspect, see Reading resources.
This resource is part of the v1alpha1 API and is subject to change. Fields and behavior may change in future releases.

Identity

Groupnotification.miloapis.com
Versionv1alpha1
KindEmailTemplate
ScopePlatform

Overview

An EmailTemplate is a reusable e-mail template that Datum Cloud renders when it needs to send a notification. The template defines a subject line along with HTML and plain-text bodies written as Go template strings, and it enumerates the variables that callers are expected to provide when the message is rendered. Use it to standardize the wording and formatting of notification e-mails so the same content can be produced consistently by substituting the declared variables at send time.

Spec fields

FieldTypeRequiredDescription
spec.subjectstringYesThe string that composes the email subject line.
spec.htmlBodystringYesThe string for the HTML representation of the message.
spec.textBodystringYesThe Go template string for the plain-text representation of the message.
spec.variables[]ObjectNoEnumerates all variables that can be referenced inside the template expressions.
spec.variables[].namestringYesThe identifier of the variable as it appears inside the Go template (e.g. {{.UserName}}).
spec.variables[].requiredbooleanYesWhether the variable must be provided when rendering the template.
spec.variables[].typestringYesA hint about the expected value of this variable. One of string or url.

Status fields (read-only)

FieldTypeDescription
status.conditions[]ObjectLatest available observations of the template’s current state, indicating whether it is ready for use.

Usage

apiVersion: notification.miloapis.com/v1alpha1
kind: EmailTemplate
metadata:
  name: welcome-email
spec:
  subject: "Welcome to Datum Cloud, {{.UserName}}"
  htmlBody: "<p>Hello {{.UserName}}, visit <a href=\"{{.DashboardURL}}\">your dashboard</a> to get started.</p>"
  textBody: "Hello {{.UserName}}, visit {{.DashboardURL}} to get started."
  variables:
    - name: UserName
      required: true
      type: string
    - name: DashboardURL
      required: true
      type: url
datumctl apply -f emailtemplate.yaml
datumctl get emailtemplates
datumctl describe emailtemplate welcome-email
Run datumctl explain emailtemplates --recursive to see the full, live field tree for this resource.
Last modified on July 2, 2026