unione-email-templates
Use when writing or fixing the HTML of an email for UniOne — welcome, password reset, OTP, receipts, notifications, newsletters — making it render in Gmail, Outlook and Apple Mail, adding substitutions and logic with the UniOne template engines (simple, Velocity, Liquid), storing it with template/set, or opening it in the UniOne visual editor for the user to edit.
Latest: v1.0.3
- Updated the skill metadata version from 1.1.7 to 1.1.8.
- Removed
skill-card.md.
UniOne email templates
Workflow
- Ask what the email is for and what data it shows; pick the engine: flat merge tags →
simple, objects / lists / conditions →liquid(references/engines.md). - Write the HTML by the mail-client rules (references/html-email.md) and a plaintext version with the same content.
- Store it with
template/set(editor_type: "html",template_engine,subject,from_email,from_name,body.html,body.plaintext); keep the returnedidin config, not the HTML in code. - Show it to the user in the visual editor:
https://cp.unione.io/en/templates/edit-body-html/<template_id>(the returnedid). In a coding agent offer to open the link in the browser; the user must be signed in to the control panel of the same account. After the user edits it, read it back withtemplate/get. - Test: send with
template_idand real substitutions to the user's own (or sandbox-confirmed) address; check Gmail, Outlook and a phone. Then usetemplate_idin the code.
template/set
{
"template": {
"name": "Password reset",
"editor_type": "html",
"template_engine": "liquid",
"subject": "Reset your password",
"from_email": "noreply@example.com",
"from_name": "Example",
"body": {"html": "<!DOCTYPE html>…{{ reset_url }}…", "plaintext": "Reset your password: {{ reset_url }}"}
}
}
Send it: email/send with template_id and recipients[].substitutions ({"reset_url": "https://…"}); fields
passed in the call override the template's.
Rules that matter most
- Tables and inline CSS, 600 px wide, no JavaScript / forms / external CSS; under ~100 KB (Gmail clips).
- Absolute
https://image URLs withalt,width,height; essential text never only in images. - Always a plaintext part;
lang, headings, contrast ≥ 4.5:1, buttons as styled links. - The syntax of the body must match
template_engine(defaultsimple): a Liquid body undersimplegoes out with raw{%tags; usenonefor literal braces. - Do not remove the unsubscribe link of marketing emails; transactional ones may set
options.unsubscribe_url. - Substitution names: Latin letters, digits,
_, starting with a letter; case-sensitive.
Related: the unione skill (sending, webhooks), unione-email-best-practices (content,
compliance).
