Create and preview an email template
Email templates include a subject and HTML body. Previewing converts the draft into customer-visible output for review without publishing or sending it.
Create an English email template named “Payment receipt” for receipts. Use the subject “Receipt for order {{order_number}}” and a short HTML body that greets {{customer_name}}, states {{amount}}, and links to {{receipt_url}}. Declare the appropriate required variable types. Show the draft before creating it, then preview it with representative values. Do not publish or send it.
The agent confirms create_message_template, then uses preview_message_template. The preview includes the rendered subject, text, HTML, header names, and available safety status without exposing stored header values.
Sample response
Email draft previewed
The rendered receipt is ready for review and remains unpublished.
- Template
- Payment receipt tmpl_example_receipt
- Status
- Draft
- Subject
- Receipt for order WEB-1042
- Safety
- Passed
Required variables used in the preview
| Variable | Type | Preview value |
|---|---|---|
| customer_name | string | Ama Mensah |
| order_number | string | WEB-1042 |
| amount | string | GHS 125.00 |
| receipt_url | url | https://example.com/receipts/WEB-1042 |
Text preview: “Hi Ama Mensah, we received GHS 125.00 for order WEB-1042. View your receipt.”
Illustrative values. The exact presentation depends on the MCP client.
Template attachments can be stored for email templates, but send_customer_template does not currently send templates with attachments.