Accountmaker Docs
Tipos

Plantilla de Email

Plantilla reutilizable con variables para personalización.

email template personalization variables

Plantilla de Email

Una Plantilla de Email define contenido reutilizable con variables ({{variable}}).

Schema

interface EmailTemplate {
  id: string; // "emt_..." - Identificador único
  account_id: string; // Cuenta propietaria
  name: string; // Nombre
  event_type: string; // Evento (ej. "user_welcome")
  editor: "grapesjs_mjml"; // Editor
  editor_state: string; // Estado serializado
  mjml: string; // MJML fuente
  subject_template: string;
  body_text_template: string;
  body_html_template: string;
  archived_at: string | null;
}

Propiedades

PropiedadTipoDescripción
idstringKSUID con prefijo emt
account_idstringCuenta propietaria
namestringNombre legible
event_typestringEvento de negocio
editorstringTipo de editor
editor_statestringEstado del editor
mjmlstringFuente MJML
subject_templatestringAsunto
body_text_templatestringCuerpo texto
body_html_templatestringCuerpo HTML
archived_atstring?Fecha de archivado

Sintaxis de variables

Usa {{variable_name}}:

Subject: Welcome, {{name}}!

Dear {{name}},

Your account {{account_name}} is ready.

Ejemplo

{
  "id": "emt_2kHfPZcN9xW4mE8RtY7vB",
  "account_id": "acc_1jGePYbM8wV3lD7QsX6uA",
  "name": "welcome",
  "event_type": "user_welcome",
  "editor": "grapesjs_mjml",
  "editor_state": "{}",
  "mjml": "<mjml><mj-body></mj-body></mjml>",
  "subject_template": "Welcome to {{company}}, {{name}}!",
  "body_text_template": "Hi {{name}},\n\nWelcome to {{company}}...",
  "body_html_template": "<h1>Welcome, {{name}}!</h1>...",
  "archived_at": null
}

Relacionado