> ## Documentation Index
> Fetch the complete documentation index at: https://docs.migma.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Export Options

> Export to HTML, MJML, PNG, or directly to Mailchimp, Klaviyo, Omnisend, HubSpot, and Brevo

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

<Info>
  Export is available on **paid plans** only.
</Info>

***

## Export Formats

<Tabs>
  <Tab title="HTML">
    Production HTML with inlined CSS, table layouts for Outlook, responsive rules, and dark mode metadata. Ready for any ESP.
  </Tab>

  <Tab title="MJML">
    Responsive email framework markup. Compile to HTML with the MJML CLI when ready.
  </Tab>

  <Tab title="PNG">
    Full email rendered as a high-resolution image. Useful for previews, portfolios, and presentations.
  </Tab>

  <Tab title="PDF">
    Export your email as a PDF document for sharing and archiving.
  </Tab>
</Tabs>

***

## Provider Handoff

Prepare your email in an integrated platform without rebuilding it there:

<CardGroup cols={2}>
  <Card title="Mailchimp" icon="envelope" href="/integrations/mailchimp">
    Export a Mailchimp template or draft campaign. Choose between plain HTML or Mailchimp-optimized HTML with merge tags (`*|FNAME|*`, `*|EMAIL|*`, etc.).
  </Card>

  <Card title="Klaviyo" icon="database" href="/integrations/klaviyo">
    Export a Klaviyo template or campaign draft for final review in Klaviyo.
  </Card>

  <Card title="HubSpot" icon="building-office" href="/integrations/hubspot">
    Export HubSpot-ready draft email work for review in HubSpot.
  </Card>

  <Card title="Omnisend" icon="envelope" href="/integrations/omnisend">
    Export to Omnisend as a draft campaign after connecting OAuth.
  </Card>

  <Card title="Brevo" icon="paper-plane" href="/integrations/brevo">
    Export as a Brevo template.
  </Card>
</CardGroup>

Each integration requires a one-time connection setup in your [integration settings](/integrations/overview).

## Design Handoff

<Card title="Figma" icon="https://mintcdn.com/migmaai/kT6TJgF40rDP8_qB/images/logos/figma.svg?fit=max&auto=format&n=kT6TJgF40rDP8_qB&q=85&s=1388542bde3d29ae9480addef82339cf" href="/integrations/figma" width="24" height="24" data-path="images/logos/figma.svg">
  Export reviewed email work for Figma handoff when designers need to inspect or adapt it outside Migma.
</Card>

***

## How to Export

<Steps>
  <Step title="Open the Publish menu">
    Click **Publish** in the email viewer toolbar.
  </Step>

  <Step title="Choose your destination">
    Select an ESP integration or click **Get the Code** for format export.
  </Step>

  <Step title="Copy or download">
    Copy the code to your clipboard or download the file. For ESP exports, follow the integration-specific flow to create a draft or template.
  </Step>
</Steps>

**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
* **Omnisend drafts** — connect Omnisend once, then export campaigns as drafts for final review in Omnisend

***

## ESP Variables

Migma preserves ESP template variables during export. Include variables in your prompt using your ESP's syntax:

```text theme={null}
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](/sdk), [CLI](/cli), or [MCP](/mcp-server).

```typescript theme={null}
const { data } = await migma.export.html(conversationId);
const html = await fetch(data.files[0].url).then(r => r.text());
```

The CLI supports core file and platform formats. Run `migma export --help` to see the destinations available in your installed version.

***

## Next Steps

<CardGroup cols={2}>
  <Card title="Platform Integrations" icon="plug" href="/integrations/platform-integrations">
    Set up platform connections
  </Card>

  <Card title="Email Service Providers" icon="envelope" href="/integrations/email-service-providers">
    Choose a direct sending provider
  </Card>

  <Card title="Email Preflight" icon="check-double" href="/email-editor/email-preflight">
    Test before exporting
  </Card>

  <Card title="Outlook without domain setup" icon="envelope-open-text" href="/email-editor/outlook-export">
    Share HTML through Outlook during a trial
  </Card>

  <Card title="Send a Campaign" icon="paper-plane" href="/campaigns/send-campaign">
    Send directly from Migma
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/introduction">
    Automate exports via API
  </Card>
</CardGroup>
