Render email preview
render_email_previewRender an email document with the workspace brand, without sending. Returns {subject, html, text}. Errors: invalid_document, unknown_variable (add a fallback like {{FIRST_NAME|Friend}} or pass vars), missing_address, invalid_variable. Next: send it, or fix the document and render again.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document": "<document>"
},
"name": "render_email_preview"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| vars | No | Values for {{NAME}} variables, such as {"FIRST_NAME":"Ana"}. | |
| document | Yes | The email document: {version:1, style:"designed"|"plain", subject, preheader?, blocks:[{type:"heading",text,level}|{type:"text",text}|{type:"button",label,url}| {type:"image",src,alt,href?}|{type:"divider"}|{type:"footer",unsubscribe}| {type:"rows",rows:[[label,value],...]}|{type:"code",code}]}. |