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

# Loops

> Export Brew emails as editable Loops drafts, or download a ZIP to keep your rendered design when uploading a custom email.

Connect your Loops account to export emails created in Brew as editable campaign drafts. Use a ZIP upload when you want to keep the rendered Brew design.

> [!NOTE]
>
> Moving your whole account off Loops instead? See [Migrate from Loops to Brew](https://docs.brew.new/migrations/loops.md).

## Connect

**1. Create an API key**

In Loops, open **Settings → API**, create a key and copy it. [Loops API keys](https://loops.so/docs/api-reference/api-key) covers the page.

**2. Connect the brand in Brew**

Select your brand in Brew, go to **Integrations** and click the **Loops** card. Paste the key and click **Connect**. Brew checks the key and campaign access without creating a draft.

## Export a Template

1. Open your email in Brew and choose **Send → Export template → Loops**.
2. Check the name, subject and preview text, then click **Create draft**.
3. Click **See draft** to open the campaign in Loops.
4. Review the layout, personalization, sender and audience in Loops before sending.

## Where It Lands

Export creates a campaign draft in Loops, which **See draft** opens. It does not send or schedule the campaign, and does not copy your contacts or audiences.

## What the Template Contains

The editable export supports text, headings, links, buttons, lists and static images. Simple contact properties and fallback values transfer with the design.

Brew adapts layouts to the Loops editor:

* Nested cards become flat editable sections, keeping their text, links and inner card colors
* Nested column rows stack within their parent column, and wider rows split into groups of up to four columns
* Table data stays editable as row content
* Decorative Brew textures use their solid fallback color; other inline background artwork becomes an image above its text

Review spacing, corner shapes and background artwork in the Loops draft. Use the ZIP option below when you need the rendered Brew design.

Editable exports have these limits:

* 100KB of LMX content
* Public HTTPS PNG, JPEG, GIF or WebP images
* 4MB per image and 20MB of images per export

Unsupported personalization and stylesheet-only background images need changes before export. Brew checks these limits before creating a campaign.

Loops uses the company details configured in its marketing footer. Imported `{{ organization.name }}` and `{{ organization.full_address }}` placeholders in the email body use that footer.

Static address text and footer links stay in the design. Check the company details, unsubscribe link and final preview in Loops.

## Keep the Design with a ZIP

This option requires a paid Brew plan. It does not require a connected Loops account in Brew.

1. In Brew, choose **Send → Export template → Loops ZIP** and click **Download ZIP**.
2. In your Loops email, choose **Code styling** and upload the downloaded ZIP. See [Upload a custom email to Loops](https://loops.so/docs/creating-emails/uploading-custom-email).
3. Confirm the subject and preview text in Loops. Preview the email and send yourself a test before using it with your audience.

Images keep their public HTTPS URLs. Keep those hosted files available after uploading. Replace local or embedded images before exporting.

Move stylesheet rules that reference `html` or `body` onto an inner table or container, and use plain CSS selectors. Brew rejects stylesheets it cannot preserve when MJML replaces the document shell.

Replace Brew merge tags and fallbacks with the appropriate Loops tags before downloading a ZIP. Existing Loops tags stay in the file. See [Merge Tags](https://docs.brew.new/create-emails/merge-tags.md).

Brew uses Loops' unsubscribe link in the exported footer.

ZIP download and upload are manual steps. For programmatic creation, use the editable draft export.

## From an Agent or Code

Connect Loops to the brand in the app first. Then call `export_email` over [MCP](https://docs.brew.new/api-reference/mcp/tools.md), or send `POST /v1/emails/{emailId}/export` with `provider` set to `loops`.

```bash theme={null}
curl --request POST "https://brew.new/api/v1/emails/EMAIL_ID/export" \
  --header "Authorization: Bearer $BREW_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: UNIQUE_EXPORT_KEY" \
  --data '{"provider":"loops","templateName":"Welcome","dryRun":true}'
```

The dry run checks the connection, design and images without creating a Loops draft. It does not prove that Loops will accept a later write. Set `dryRun` to `false` to create the draft.

The response's `templateId` is the Loops campaign ID. If an error includes a partial draft ID, inspect that draft in Loops before starting another export. Follow the [idempotency guidance](https://docs.brew.new/api-reference/api/idempotency.md) when retrying.

* [`INTEGRATION_NOT_CONNECTED`](https://docs.brew.new/api-reference/api/errors#integration-not-connected): Loops isn't connected to this brand. Connect it on the Integrations page.
* [`EXPORT_UNSUPPORTED`](https://docs.brew.new/api-reference/api/errors#export-unsupported): the design uses content the editable export can't carry, or exceeds a limit above. Change it and export again.
* [`EXPORT_PROVIDER_ERROR`](https://docs.brew.new/api-reference/api/errors#export-provider-error): Loops refused or failed the export. Check the connection and retry.

## Requirements

* A Loops team with Content API access enabled. A valid API key alone does not enable campaign creation.
* A sending domain configured in Loops.
* For the ZIP option, a paid Brew plan. ZIP download needs no Loops API access.

## Need Help?

Our team is ready to support you at every step of your journey with Brew. Choose the option that works best for you:

**Self-Service Tools**

> **Search Documentation**
>
> Type in the "Ask any question" search bar at the top left to instantly find relevant documentation pages.

> **[Ask ChatGPT or Claude](#top)**
>
> Click here to open the **Copy page** menu at the top of this page, then send the page to ChatGPT, Claude, or your editor.

**Talk to Our Team**

> **[Schedule a Call](https://calendar.google.com/calendar/u/0/appointments/schedules/AcZssZ1iYoRUG1J792XQpbuQLjSRRDupr7MwraFK-HQRCtTYdBmrQi8nZu2qXfzKQigb8gbKJK3KN3-R)**
>
> Book time with our founders for personalized guidance on strategy, best practices, or complex implementation questions.

> **Call Us Directly**
>
> Need immediate assistance? Reach us at **+1-(332)-203-2145** for urgent issues or time-sensitive questions.

> **Slack Channel**
>
> Our preferred support channel. You'll receive an invite after signup for direct founder support and fast responses.

> **[Email Support](mailto:support@brew.new)**
>
> Contact us at **[support@brew.new](mailto:support@brew.new)** for detailed inquiries or if you prefer not to use Slack.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.