Skip to main content

Overview

Export your emails in multiple formats or push directly to your email service provider. All export options are available from the Publish button in the email viewer.
Export is available on paid plans only.

Export Formats

Email-safe HTML with inline CSS, table-based layouts for Outlook compatibility, responsive media queries, and dark mode support. Ready to upload to any ESP.

Direct ESP Export

Push your email directly to integrated platforms without leaving Migma:

Mailchimp

Create or update a Mailchimp template. Choose between plain HTML or Mailchimp-optimized HTML with merge tags (*|FNAME|*, *|EMAIL|*, etc.).

Klaviyo

Export as a Klaviyo template. Opens directly in the Klaviyo editor after export.

HubSpot

Push to HubSpot as a draft template.

Brevo

Export as a Brevo template.
Each integration requires a one-time connection setup in your integration settings.

How to Export

1

Open the Publish menu

Click Publish in the email viewer toolbar.
2

Choose your destination

Select an ESP integration or click Get the Code for format export.
3

Copy or download

Copy the code to your clipboard or download the file. For ESP exports, follow the integration-specific flow to create a template.
Additional options:
  • Minification toggle — switch between pretty-printed and minified HTML (shows file size)
  • Mailchimp merge tags — when exporting to Mailchimp, choose “Merged Tags HTML” to auto-convert personalization variables to Mailchimp syntax

ESP Variables

Migma preserves ESP template variables during export. Include variables in your prompt using your ESP’s syntax:
Create a welcome email using:
- Customer name: {{ contact.firstname }}
- Order number: {{ order.id }}

Use HubSpot HubL syntax.
Supported syntaxes include HubL ({{ }}), Liquid ({{ }}/{% %}), Mailchimp merge tags (*|FIELD|*), Handlebars ({{field}}), and Mustache ({{field}}).

Programmatic Export

Export emails via the SDK, CLI, or MCP server.
const { data } = await migma.export.html(conversationId);
const html = await fetch(data.files[0].url).then(r => r.text());
The CLI supports all formats: migma export html|mjml|pdf|klaviyo|mailchimp|hubspot <id>.

Next Steps