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

# Klaviyo

> Connect Klaviyo with one-click OAuth to export Brew emails as reusable CODE templates.

Connect your Klaviyo account to export emails created in Brew directly into Klaviyo as reusable CODE templates. Use Brew for the creative work; keep your campaign and flow execution in Klaviyo.

<Frame>
  <img src="https://mintcdn.com/brew-796f053a/4fNlkdfQMQ1sba0M/images/integrations/Klaviyo_OG.png?fit=max&auto=format&n=4fNlkdfQMQ1sba0M&q=85&s=aae420c2fb39f1d6f7d018f46ce6fcfa" alt="Klaviyo Integration" className="w-full rounded-xl" width="1024" height="576" data-path="images/integrations/Klaviyo_OG.png" />
</Frame>

## Setup

<Steps>
  <Step title="Connect your Klaviyo account">
    In Brew, go to **Integrations** and click the **Klaviyo** card. You'll be redirected to Klaviyo to authorize the connection. Brew never sees your Klaviyo password or API keys.
  </Step>
</Steps>

That's it. Klaviyo is now connected to Brew.

## Exporting a Template

<Steps>
  <Step title="Open the email">
    Open the email you want to export in Brew.
  </Step>

  <Step title="Send → Export Template">
    Click **Send** in the top right and select **Export Template**.
  </Step>

  <Step title="Choose Klaviyo">
    Pick **Klaviyo** as the destination, name the template, review the subject and preview text, then click **Export**.
  </Step>
</Steps>

The template lands in your Klaviyo templates library as a CODE template, ready to use in a campaign or flow.

## How the Integration Works

When you export to Klaviyo, Brew:

1. Renders the email to production-ready HTML
2. Adds the preview text from the export flow
3. Swaps Brew unsubscribe placeholders for Klaviyo's unsubscribe tag format
4. Creates a reusable **CODE** template in your Klaviyo account

<Info>
  Brew keeps the shared subject and preview fields in the export flow so you can review them before handoff. Klaviyo stores the HTML template, and you can set the final subject line when you use the template in Klaviyo.
</Info>

## Requirements

* A Klaviyo account with admin access (needed to authorize OAuth)

<Snippet file="need-help.mdx" />
