Skip to main content

Overview

The Klaviyo integration allows you to export emails directly from Migma to Klaviyo with a single click. All Liquid merge tags are automatically preserved, and emails can be used in campaigns, flows, and templates.
One-Click Export: Create beautiful emails in Migma, then export them to Klaviyo instantly via API. No manual copying, no broken formatting, and merge tags are automatically preserved.

Campaign Export

Push campaigns directly to Klaviyo

Template Library

Save to Klaviyo template library

Merge Tags

Liquid variables automatically preserved

Flow Integration

Use in automated flows and sequences

Setup Klaviyo Connection

1

Get Klaviyo API Key

In Klaviyo:
  1. Go to Account → Settings → API Keys
  2. Click “Create Private API Key”
  3. Give it a name like “Migma Integration”
  4. Grant Full Access permissions:
    • Lists & Segments: Read/Write
    • Templates: Read/Write
    • Campaigns: Read/Write
  5. Copy your API Key
Keep your API key secure - it grants full access to your Klaviyo account
2

Connect in Migma

In Migma:
  1. Navigate to Settings → Integrations → Marketing Platforms
  2. Click “Connect Klaviyo”
  3. Paste your API Key
  4. Click “Authorize”
You’ll see a success message when connected.
3

Select Lists

Choose which Klaviyo lists to sync:Select the lists you want to access from Migma:
  • ☑ Main Newsletter List
  • ☑ VIP Customers
  • ☑ Abandoned Cart Segment
  • ☐ Test List
You can change these settings anytime.
4

Map Properties

Map Migma fields to Klaviyo properties:
Migma FieldKlaviyo Property
Emailemail
First Name$first_name
Last Name$last_name
Phone$phone_number
Custom FieldsAuto-detected
Migma automatically detects custom properties and maps them.
5

Test Connection

Click “Test Connection” to verify:
  • ✅ API authentication successful
  • ✅ Lists accessible
  • ✅ Properties mapped correctly

One-Click Export to Klaviyo

Export as Campaign

Create a campaign directly in Klaviyo:
1

Create Email in Migma

Design and finalize your email using Migma’s AI or visual editor
2

Click Export

In the email editor, click “Export” → “Klaviyo Campaign”
3

Configure Campaign Settings

In the export dialog:
Campaign Name: "Summer Sale 2024"
List/Segment: Main Newsletter List
Subject Line: "50% Off Summer Collection"
Preview Text: "Limited time offer - shop now"
From Name: "Your Store"
From Email: [email protected]
4

Export via API

Click “Export to Klaviyo”Migma automatically:
  • ✅ Creates campaign in Klaviyo via API
  • ✅ Uploads email HTML
  • ✅ Preserves all Liquid merge tags
  • ✅ Hosts images on CDN
  • ✅ Sets campaign as draft
5

Finish in Klaviyo

Go to Klaviyo to:
  • Review the campaign
  • Schedule send time
  • Send test emails
  • Launch campaign

Export as Template

Save to Klaviyo template library for reuse:
1

Export as Template

Click “Export” → “Klaviyo Template”
2

Template Settings

Configure:
  • Template name: “Product Showcase Template”
  • Category: “Newsletter”
  • Tags: “product”, “seasonal”
  • Description: “Reusable product showcase layout”
3

API Upload

Migma uploads the template via Klaviyo APITemplate appears in: Klaviyo → Templates → Saved Templates
4

Use in Campaigns and Flows

Use the template for:
  • New campaigns
  • Automated flows
  • A/B testing
  • Quick email creation

Merge Tags & Liquid Variables

Migma automatically preserves Klaviyo’s Liquid templating syntax. Use merge tags in your prompts, and they’ll work perfectly in Klaviyo.

Profile Properties

<!-- Basic profile fields -->
{{ first_name }}              → First name
{{ last_name }}               → Last name
{{ email }}                   → Email address
{{ phone_number }}            → Phone number

<!-- Custom profile properties -->
{{ person.company }}          → Company name
{{ person.job_title }}        → Job title
{{ person.favorite_category }} → Custom field

Event Properties

<!-- Product events -->
{{ event.product_name }}      → Product name
{{ event.product_price }}     → Product price
{{ event.product_image_url }} → Product image
{{ event.product_url }}       → Product link

<!-- Order events -->
{{ event.order_total }}       → Order total
{{ event.order_id }}          → Order ID
{{ event.shipping_address }}  → Shipping address

Conditional Logic

<!-- VIP customer check -->
{% if person.vip_status == true %}
  <h2>Exclusive VIP Offer!</h2>
  <p>Save 25% with your VIP status</p>
{% else %}
  <h2>Special Offer</h2>
  <p>Save 15% today</p>
{% endif %}

<!-- Purchase history -->
{% if person.total_orders > 5 %}
  Thanks for being a loyal customer!
{% endif %}

Default Values

<!-- Fallback values -->
{{ first_name|default:"Friend" }}
{{ person.company|default:"your company" }}

<!-- Example in greeting -->
Hi {{ first_name|default:"there" }},

Using Merge Tags in Migma

In Prompts

Tell Migma to include merge tags in your prompt:
Create a welcome email with:
- Greeting: "Hi {{ first_name }}!"
- Personalized content based on {{ person.company }}
- Product recommendations using {{ event.product_name }}
Migma will generate the email with merge tags intact.

Visual Editor

When editing in Migma’s visual editor, you can:
  1. Type merge tags directly: {{ first_name }}
  2. They’ll be preserved when exporting to Klaviyo
  3. Preview shows placeholder values

Common Examples

Abandoned Cart Email:
Hi {{ first_name }},

You left {{ event.product_name }} in your cart!

Regular price: ${{ event.item_price }}
Your price: ${{ event.sale_price }}

Complete your purchase: {{ event.checkout_url }}
Post-Purchase:
Thanks {{ first_name }}!

Order #{{ event.order_id }} is confirmed.
Total: ${{ event.order_total }}

Track your shipment: {{ event.tracking_url }}
Product Recommendation:
Hi {{ first_name }},

Based on your interest in {{ event.viewed_product_category }},
we think you'll love these:

{% for product in recommended_products %}
  - {{ product.name }}: ${{ product.price }}
{% endfor %}

Flow Integration

Use Migma templates in Klaviyo automated flows:

Setup Flow Template

1

Export Template

Export your email as a template to Klaviyo
2

Create/Edit Flow

In Klaviyo, create or edit an automated flow:
  • Welcome series
  • Abandoned cart
  • Post-purchase
  • Win-back campaign
3

Add Email Action

  1. Add an “Email” action to your flow
  2. Click “Select Template”
  3. Choose your Migma template
4

Configure Triggers

Set up flow triggers and timing:
  • Trigger: When someone joins a list
  • Delay: Immediate or timed
  • Filters: Segment conditions

Common Flow Use Cases

Email 1: Welcome + brand introduction
  • Trigger: List signup
  • Delay: Immediate
  • Merge tags: {{ first_name }}, {{ person.signup_source }}
Email 2: Product showcase
  • Delay: 2 days after Email 1
  • Merge tags: {{ event.browsed_category }}
Email 3: Special offer
  • Delay: 5 days after Email 2
  • Conditional: {% if person.purchase_count == 0 %}
Email 1: Cart reminder
  • Trigger: Started checkout, didn’t complete
  • Delay: 1 hour
  • Merge tags: {{ event.product_name }}, {{ event.checkout_url }}
Email 2: Discount incentive
  • Delay: 24 hours
  • Conditional discount code
Email 3: Last chance
  • Delay: 48 hours
  • Urgency messaging
Email 1: Order confirmation
  • Trigger: Placed order
  • Delay: Immediate
  • Merge tags: {{ event.order_id }}, {{ event.order_total }}
Email 2: Shipping notification
  • Trigger: Order fulfilled
  • Merge tags: {{ event.tracking_url }}
Email 3: Review request
  • Delay: 7 days after delivery
  • Merge tags: {{ event.purchased_products }}

List & Segment Sync

Sync Audiences

Bidirectional sync between Migma and Klaviyo:
Export subscribers from Migma to Klaviyo lists
Import Klaviyo lists into Migma
Automatic field mapping
Custom property sync

Configure Sync

  1. Settings → Integrations → Klaviyo
  2. Click “Manage Lists”
  3. Select sync direction:
    • ○ Migma → Klaviyo only
    • ● Bidirectional (recommended)
    • ○ Klaviyo → Migma only
  4. Choose sync frequency:
    • Real-time (instant sync)
    • Hourly batch
    • Daily batch

Best Practices

Do:
  • ✅ Personalize greetings: Hi {{ first_name }}
  • ✅ Show relevant products: {{ event.product_name }}
  • ✅ Add urgency: {{ event.cart_expires_at }}
  • ✅ Provide fallbacks: {{ first_name|default:"there" }}
Don’t:
  • ❌ Over-personalize (creepy factor)
  • ❌ Use merge tags without defaults
  • ❌ Forget to test with real data
Always test with real data:
  1. Export template to Klaviyo
  2. Create test campaign
  3. Send to test profiles with:
    • Complete data
    • Missing data (test defaults)
    • Edge cases
  4. Check rendering across devices
  5. Verify links and merge tags work
Keep templates organized:
  • Use clear naming: “Abandoned Cart - v2”
  • Add categories: Newsletter, Transactional, Promotional
  • Tag by season/campaign: “holiday-2024”, “summer-sale”
  • Document merge tag requirements
Track template performance:
  • Compare AI-generated vs manual emails
  • A/B test different designs
  • Monitor open/click rates
  • Iterate based on data

Troubleshooting

Problem: Can’t connect Klaviyo to MigmaSolutions:
  1. Verify API key is correct (no extra spaces)
  2. Check API key has Full Access permissions
  3. Ensure API key hasn’t been revoked
  4. Try creating a new API key
  5. Contact support if issue persists
Problem: Merge tags showing as {{ first_name }} instead of namesSolutions:
  1. Check syntax: Use {{ first_name }} not {first_name}
  2. Verify property exists in Klaviyo profiles
  3. Test with profiles that have complete data
  4. Add default values: {{ first_name|default:"Friend" }}
  5. Check Klaviyo preview in their dashboard
Problem: Export to Klaviyo failsSolutions:
  1. Check API connection is active
  2. Verify you have permission to create campaigns/templates
  3. Ensure list/segment exists in Klaviyo
  4. Check for special characters in campaign name
  5. Try exporting as template first
Problem: Images broken in KlaviyoSolutions:
  1. Verify images uploaded to Migma CDN
  2. Check image URLs are public
  3. Ensure Klaviyo can access external images
  4. Try re-uploading images in Migma
  5. Check image file sizes (< 1MB recommended)

Next Steps


Need Help?