Actions32
- Broadcast Actions
- Contact Actions
- Custom Event Actions
- List Actions
- Template Actions
- Transactional Actions
Template → Compile
AI-generatedSummary
Compile an MJML template by sending its visual editor tree along with optional test data and tracking settings, and receive rendered HTML content.
Inputs
- Message ID (required) — Unique message ID for tracking.
- Visual Editor Tree (JSON) (required) — MJML visual editor tree structure that must have a root type of "mjml".
- Test Data — Key/value pairs used for Liquid templating during the compilation process.
- Tracking Settings — Settings to enable click/open tracking and specify tracking endpoint with UTM parameters.
- Additional Fields — Optional additional parameters including the channel (email or web), email subject, and inbox preview text, all rendered through the Liquid engine.
Output shape
a single JSON object containing the compiled template's rendered HTML and possibly other related metadata
The operation returns the compiled template result from the Notifuse API's /api/templates.compile endpoint as a JSON object. This includes rendered HTML and respects the input tracking and test data. Errors are managed and returned as node errors unless 'Continue on Fail' is enabled.
Examples
Example 1: You have an MJML template represented as a visual editor tree and want to compile it with custom variables and enable tracking.
Set 'Message ID' with a unique identifier, provide the MJML visual editor tree JSON, supply test data key/value pairs for dynamic content, configure tracking settings (enable tracking and provide endpoint/UTM parameters), and optionally set the email subject and preview text under additional fields.