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

# Klaviyo Integration

> Connect Klaviyo and export reviewed Migma emails as templates or campaign drafts.

Use Klaviyo when your team wants Migma to prepare the email and Klaviyo to own lists, flows, profiles, campaign scheduling, or final sending.

## What you can do

<CardGroup cols={2}>
  <Card title="Connect with OAuth" icon="key">
    Authorize Klaviyo from brand integrations.
  </Card>

  <Card title="Export templates" icon="document-plus">
    Save reviewed emails for use in Klaviyo campaigns or flows.
  </Card>

  <Card title="Create draft campaign work" icon="paper-plane">
    Send finished email work to Klaviyo for final review where supported.
  </Card>

  <Card title="Preserve Liquid syntax" icon="code-bracket">
    Keep Klaviyo variables such as `{{ first_name }}` and conditional Liquid blocks.
  </Card>
</CardGroup>

## Connect Klaviyo

<Steps>
  <Step title="Open brand integrations">
    Open the brand, then go to **Integrations** and find **Klaviyo** under export destinations.
  </Step>

  <Step title="Click Connect">
    Sign in to Klaviyo and approve access.
  </Step>

  <Step title="Confirm the connected account">
    Migma shows the connected Klaviyo account before export.
  </Step>
</Steps>

<Note>
  Legacy private-key connections created before OAuth rollout continue to work until they are disconnected. New setup should use OAuth.
</Note>

## Export to Klaviyo

<Steps>
  <Step title="Review the email in Migma">
    Check copy, links, rendering, mobile behavior, and preflight.
  </Step>

  <Step title="Open Publish">
    Choose **Klaviyo** from export destinations.
  </Step>

  <Step title="Export the email">
    Migma prepares Klaviyo-compatible HTML and keeps supported variables intact.
  </Step>

  <Step title="Finish in Klaviyo">
    Review the result, choose the list, segment, campaign, or flow, then send from Klaviyo.
  </Step>
</Steps>

## Liquid variables

Migma preserves Klaviyo Liquid syntax that you include in the email.

```text theme={null}
Create an abandoned cart reminder for Klaviyo.
Use {{ first_name|default:"there" }} in the greeting and {{ event.product_name }} for the product.
```

Common patterns:

| Pattern                      | Use                     |
| ---------------------------- | ----------------------- |
| `{{ first_name }}`           | Profile property        |
| `{{ person.company }}`       | Custom profile property |
| `{{ event.product_name }}`   | Event property          |
| `{% if person.vip_status %}` | Conditional content     |

<Warning>
  Klaviyo validates variables against profile, event, list, and flow data. Preview with real Klaviyo test profiles before sending.
</Warning>

## Import contacts from Klaviyo

Bring an existing Klaviyo list or segment into Migma without exporting a CSV. Imports read from your connected Klaviyo account and run in the background.

<Steps>
  <Step title="Start from Contacts">
    In **Audience**, click **Add Contact** then **Import from integration** and choose **Klaviyo**. If Klaviyo is not connected yet, connect it from the same screen.
  </Step>

  <Step title="Choose a source">
    Pick the list or segment you want to import.
  </Step>

  <Step title="Confirm consent behavior">
    By default Migma imports contacts with email consent only. You can optionally include suppressed and never-subscribed profiles for record keeping, and those contacts stay non-sendable in Migma.
  </Step>

  <Step title="Start the import">
    The import runs as a background job. Watch progress in the dialog, or check **Import History** for the final counts.
  </Step>
</Steps>

Every import creates a source tag named after the list or segment, such as `Newsletter`, and a snapshot segment that targets it, so the imported audience is immediately usable. Importing the same source again reuses the same tag and segment, and each import still gets its own **Import History** record showing the provider, account, source, consent mode, and how many contacts were imported, updated, kept non-sendable, skipped, or failed.

<Note>
  Imports are one-time snapshots. Migma copies the selected source at import time and does not keep syncing it. Run another import when you want fresh data. Existing Migma contacts that unsubscribed or bounced are never resubscribed by an import.
</Note>

If the connected account cannot read lists and segments, the Klaviyo row offers **Reconnect**. Klaviyo connections created before contact import was available may need this once to allow reading contacts. After reconnecting, Migma returns you to the same import flow, and CSV or paste import remains available as a fallback.

## Related docs

<CardGroup cols={2}>
  <Card title="Export Options" icon="download" href="/email-editor/export-options">
    Compare Klaviyo export with other destinations.
  </Card>

  <Card title="Migma vs Klaviyo" icon="scale-balanced" href="/comparisons/migma-vs-klaviyo">
    Compare Migma and Klaviyo workflows.
  </Card>
</CardGroup>
