---
title: "Create and preview an email template"
description: "Create an email draft and review its rendered subject, text, HTML, and safety result."
canonical: "https://studio.inttegro.com/inttegro-mcp/workflows/message-templates/create-and-preview-an-email-template"
format: inttegro-machine-docs/v1
language: "Go"
sdk_version: "v11.0.1"
reader_profile: optional
reader_manifest: "https://studio.inttegro.com/machine/go/readers/index.json"
reader_identification: "Optional: declare your client only if known and your current-session capabilities; use reader_manifest for supplemental recommendations."
preamble_estimated_tokens: 695
model_token_report: "https://studio.inttegro.com/machine/token-report.json"
preamble_questions: 5
preamble_source: "general"
recommended_mcp_tools: ["preview_message_template","create_message_template","send_customer_template"]
estimated_tokens: 1430
token_estimate_method: "utf8_bytes_divided_by_4"
---

## Machine preamble

**Summary:** Create an email draft and review its rendered subject, text, HTML, and safety result. This Go representation uses the selected SDK's native names wherever Studio has a verified mapping.

### Five questions

#### Q1. When should the reader use Create and preview an email template?

Use this MCP document when an authenticated AI client needs governed Inttegro context, guidance, presentation, or operations.

#### Q2. What is authoritative on this page?

The documented MCP catalog defines available abilities and confirmation boundaries. For live state, the structured tool result is authoritative; presentation output is only a rendering of that result.

#### Q3. What page-specific constraint matters most?

Read operations do not authorize mutations. Actions retain their exact confirmation requirements, and payment credentials or OTP must stay in secure Checkout.

#### Q4. Can Inttegro MCP materially help with this task?

Yes, when the reader has an authenticated MCP connection and the task needs live context, guided planning, or a supported operation. The strongest matches are `preview_message_template`, `create_message_template`, `send_customer_template`; their exact roles and boundaries are listed below.

#### Q5. How should the reader verify the answer and continue?

Preserve the structured tool result, distinguish bounded lists from complete analytics, and reconcile asynchronous actions through an authoritative read. Continue with [send_customer_template](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#send_customer_template) and [preview_message_template](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#preview_message_template) when those concerns enter scope.

### Recommended MCP assistance

Use these through an authenticated Inttegro MCP connection. This document remains the contract source.

- [`preview_message_template`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#preview_message_template) — read; no mutation confirmation. Renders the current draft with supplied non-secret variables so the merchant can review the actual SMS or email before publishing.
- [`create_message_template`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#create_message_template) — action; exact user confirmation required. Creates one reusable SMS or email draft with a typed variable contract. Creation does not publish or send it.
- [`send_customer_template`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#send_customer_template) — action; exact user confirmation required. Renders and validates a published template, shows the actual customer-facing copy for confirmation, and sends it once to a saved customer by explicit SMS or email transport.…

## Document content

# 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.

### Prompt

> **Copyable prompt:**
>
> 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`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#create_message_template), then uses [`preview_message_template`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#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

- **Row 1**: Variable: customer\_name; Type: string; Preview value: Ama Mensah
- **Row 2**: Variable: order\_number; Type: string; Preview value: WEB-1042
- **Row 3**: Variable: amount; Type: string; Preview value: GHS 125.00
- **Row 4**: Variable: receipt\_url; Type: url; Preview value: https://example.com/receipts/WEB-1042

Text preview: “Hi Ama Mensah, we received GHS 125.00 for order WEB-1042. View
your receipt.”

Template attachments can be stored for email templates, but [`send_customer_template`](https://studio.inttegro.com/machine/go/inttegro-mcp/tools.md#send_customer_template) does not currently send templates with attachments.
