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

# Integrations overview

> Connect the platforms you already run on — your email service provider for sending, and Square for your customer and booking data.

AlpacaRelay connects to the platforms you already run on, in two directions: it exchanges designs with the **email service provider** you send from, and it pulls **customer and booking data** in from Square.

## Send through your ESP

AlpacaRelay is where you design emails. Your ESP is where you send them. An integration connects the two, so a design never has to travel as a copied-and-pasted blob of HTML.

Designs move both ways:

> [card] Import
>
> Pull a template that already lives in your ESP into AlpacaRelay, then edit it like any other email.

> [card] Export
>
> Push a finished AlpacaRelay email into your ESP as a template, and re-sync it whenever you change the design.

### Supported providers

> [card] [Mailchimp](https://docs.alpacarelay.com/integrations/mailchimp.md)
>
> Connects with OAuth. Exports a saved template.

> [card] [Klaviyo](https://docs.alpacarelay.com/integrations/klaviyo.md)
>
> Connects with OAuth. Exports an HTML template.

> [card] [SendGrid](https://docs.alpacarelay.com/integrations/sendgrid.md)
>
> Connects with an API key. Exports a dynamic template.

> [card] [Postmark](https://docs.alpacarelay.com/integrations/postmark.md)
>
> Connects with a server token. Exports a standard template.

| Provider | How you connect | Export creates | Import available |
| - | - | - | - |
| Mailchimp | OAuth — sign in to Mailchimp | A saved template | Yes |
| Klaviyo | OAuth — sign in to Klaviyo | An HTML template | Yes |
| SendGrid | API key | A dynamic transactional template | Yes — dynamic templates only |
| Postmark | Server API token | A standard template | Yes — standard templates only |

> [!NOTE]
>
> You keep your own ESP account and your own sending. AlpacaRelay never sends your campaigns through your ESP — it reads and writes templates, nothing else.

### Connect a provider

Connections belong to the workspace, not to you personally. Once someone connects Mailchimp, everyone in the workspace can push emails to it.

**1. Open Connected apps**

Click your workspace name, then **Settings** → **Connected apps**.

**2. Pick a provider**

Click **Connect app** and choose your provider.

**3. Authorize**

Mailchimp and Klaviyo open their own sign-in page, where you approve access. SendGrid and Postmark ask for an API key instead — the provider pages explain which key to create and where to find it.

**4. Confirm it worked**

The provider appears in your connected apps list with a **Connected** badge and the account name it resolved.

> [!NOTE]
>
> **Connected apps** is limited to workspace owners. If you don't see it in Settings, ask an owner to connect the provider for you — you'll still be able to import and export once they have.

You can connect all four providers at once, but only **one account per provider per workspace**. To point AlpacaRelay at a different Mailchimp account, disconnect the current one first.

### Export an email to your ESP

**1. Save your email**

Export pushes the last **saved** version of a design, not unsaved edits in the editor. Save before you push.

**2. Open Send to app**

In the editor, open the dropdown next to the email's name and choose **Send to app**. From the emails list, use the **⋯** menu on the email's card.

**3. Create the template**

Each connected provider gets a row. Click **Create template** to push the design.

**4. Re-sync after changes**

Come back to **Send to app** and click **Re-sync**. The same template in your ESP is updated in place — the template ID never changes, so campaigns and automations already pointing at it pick up the new design.

#### How the link works

The first export creates a link between one AlpacaRelay email and one template in that provider. That link is what makes **Re-sync** update instead of duplicate.

> [accordion] One email links to one template per provider
>
> The same email can be linked to Mailchimp and Klaviyo at the same time — one template in each. It can't be linked to two Mailchimp templates.

> [accordion] Duplicating an email does not copy the link
>
> A duplicate starts unlinked. Its first **Create template** makes a brand-new template in your ESP, leaving the original's template untouched. This is deliberate — it lets you fork a design without overwriting what's already live.

> [accordion] Unlink leaves the ESP template alone
>
> **Unlink** only forgets the connection on the AlpacaRelay side. The template stays in your ESP exactly as it was. The next **Create template** makes a new one.

> [accordion] Deleting the email leaves the ESP template alone
>
> Deleting an AlpacaRelay email removes its links. Nothing is deleted in your ESP.

> [accordion] If you delete the template in your ESP
>
> The next **Re-sync** notices it's gone, drops the stale link, and creates a fresh template instead of failing permanently.

#### Export status on email cards

Cards in your emails list carry a small badge so you can see sync state without opening anything:

| Badge | Meaning |
| - | - |
| Green check | The latest saved version has been exported to that provider |
| Amber warning | You've changed the email since the last export. Click the badge to sync |
| Download arrow | This email was imported from that provider |

### Import a template from your ESP

**1. Start a new email**

From the emails list or the new-email screen, click **Import**.

**2. Choose a provider**

Your connected providers are listed under **Integrations** in the modal's sidebar, alongside **Upload file** and **Paste code**.

**3. Pick a template**

Browse the templates in that account and select one. Some providers group templates into views — use the view switcher to move between them.

**4. Import and edit**

The template's HTML is converted into an editable AlpacaRelay email. From there it behaves like anything else you've designed.

> [!WARNING]
>
> Not every template can be imported. Templates that don't expose usable HTML — layouts, wrappers, and drag-and-drop templates the provider only renders internally — appear greyed out with the reason on hover. Turn on **Hide unavailable templates** to filter them out.

Imported templates keep the provider's own placeholder syntax as literal text. AlpacaRelay doesn't interpret `{{ first_name }}` or similar tags, so they survive the round trip unchanged.

### Connection states

| Badge | What it means | What to do |
| - | - | - |
| **Connected** | Working normally | Nothing |
| **Needs attention** | A call to the provider failed authentication — usually revoked or expired access | Click **Reconnect** |
| **Disconnected** | Someone disconnected it | Click **Connect** to set it up again |

Reconnecting is the same flow as connecting. Your existing email-to-template links survive it, so **Re-sync** keeps updating the same templates afterwards.

Disconnecting revokes AlpacaRelay's access to that account. It does not touch any template already in your ESP.

### Troubleshooting ESP connections

> [accordion] Send to app says the email has no content
>
> The email has never been saved with content. Add something to the design, save, then push.

> [accordion] The provider isn't in my Send to app list
>
> It hasn't been connected for this workspace yet. An owner needs to add it under **Settings** → **Connected apps**.

> [accordion] Export fails right after it worked
>
> Access was probably revoked on the provider's side — a rotated API key, or a removed OAuth app. The connection flips to **Needs attention**; reconnect and try again.

> [accordion] My re-sync created a second template
>
> The linked template was deleted in your ESP, so AlpacaRelay made a new one. Repoint any campaign that referenced the old template.

## Bring in your customer data

Square is a different kind of integration: data flows **in**, not out. Connecting it syncs your customers, orders, payments, refunds, and appointments into AlpacaRelay, so you can see your business at a glance and email the people in it.

> [card] [Square](https://docs.alpacarelay.com/integrations/square.md)
>
> Sync customers, appointments, and purchase activity — then import your customers as contacts.

Square never receives your designs and never sends your email. It's a source of people and activity to send *to*.


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