build_email_template
Build and validate email templates by assembling components; receive a structured preview with personalization details and validation warnings.
Instructions
Build and validate email template, returning structured preview (NO HTML).
Each component is a dict with a "type" key and component-specific parameters. Component types: header, title, text, button, spacer, divider, image, disclaimer, footer, jinja_block.
Returns a rich structured preview with:
structure: Ordered list of components with content previews
personalization: Jinja variables, user attributes, conditionals
summary: Auto-generated human-readable description
validation: Errors and warnings
component_count, html_bytes
HTML is built internally but NOT returned (prevents context overflow). Use debug=True to save HTML to temp file for inspection.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| components | Yes | ||
| debug | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||