docyrus-email-template-design
Docyrus Email Template Design
Design a reusable email template with docyrus studio create-email-template, then validate its shape and test that it renders/sends with real record data. An email template is a row in tenant_email_template: a subject + body, optionally bound to a data source, with {{field}} placeholders filled at send time. Templates are consumed by the automation send-email action node (and other send paths) — they don't send themselves.
Workflow
-
Confirm app + auth, and the source record shape. A template's placeholders must match real record fields.
docyrus auth who --json docyrus apps list --json docyrus studio list-data-sources --appSlug crm --json # the data source whose records will fill the email (optional binding) docyrus studio list-fields --appSlug crm --dataSourceSlug deals --json # the field slugs you can interpolate -
Design the subject + body. Decide the merge fields (
{{slug}}), what comes from expanded relations/enums ({{field.name}}), and any conditional/looping sections. Keep the body as HTML. See references/templating.md for the Handlebars context and helpers. -
Create the template (
create-email-template).--nameand--subjectare required;--bodyis the HTML; optionally bind a data source with--dataSourceSlug/--dataSourceId. See Create. -
Validate — read the template back and confirm subject/body/binding landed. See Validate.