Email marketing

Mailchimp

Push new clients to a Mailchimp audience automatically.

What you get

Every new client and every lead-to-client conversion in RemixCRM is automatically pushed to a Mailchimp audience as a subscribed member. The sync runs asynchronously and doesn't block the user — if Mailchimp is down or the contact already exists, RemixCRM logs it and moves on.

This is one-way: RemixCRM → Mailchimp. RemixCRM doesn't pull existing Mailchimp subscribers back into your client database (use Mailchimp's CSV export → RemixCRM's client import for a one-time backfill).

Prerequisites

  • A Mailchimp account
  • An existing audience (Mailchimp calls these "audiences"; older docs say "lists")

Setup

1. Generate an API key

  1. Log in to admin.mailchimp.com
  2. Click your account icon (bottom-left) → Account & billing
  3. Extras → API keys
  4. Click Create A Key and copy it

Mailchimp API keys look like 0123456789abcdef0123456789abcdef-us21. The trailing -us21 is your data center prefix — RemixCRM reads this automatically from the key, you don't need to set it separately.

2. Find your Audience ID

  1. Audience → All contacts
  2. Click your audience name (or View Contacts for the right one)
  3. Settings → Audience name and defaults
  4. Scroll to Audience ID — looks like a1b2c3d4e5

3. Configure in RemixCRM

  1. Settings → Integrations → Email Marketing
  2. Select Mailchimp (the provider radio)
  3. Under Mailchimp credentials:
    • API Key — paste your key (including the -us21 suffix)
    • Audience ID — paste the ID
  4. Save

The "Server prefix" field doesn't exist in the UI — it's derived from the key on save and stored on org_settings.mailchimp_server_prefix.

4. Test

Create a test client in RemixCRM with an email address you control. Within a few seconds you should see them appear in your Mailchimp audience with status subscribed. Their First Name, Last Name, and Phone (if provided) populate the standard FNAME, LNAME, PHONE merge fields.

How RemixCRM uses Mailchimp

Trigger When What's sent
New client Client created via UI or imported POST /lists/{audience}/members with email + name + phone
Lead → client conversion Lead converted (to event or just to client) Same — the lead's email is upserted as a subscriber

The push is a fire-and-forget — if it fails, the client creation still succeeds. RemixCRM treats Mailchimp's HTTP 400 ("already a member") as a success since the contact exists either way.

Compliance notes

RemixCRM sends contacts with status: 'subscribed' — i.e. it assumes the client has consented to be on your marketing list as part of doing business with you. If you're operating in a strict-consent jurisdiction (EU, etc.), you may want to:

  • Add a consent checkbox to your booking forms
  • Change the sync to push status: 'pending' instead, triggering Mailchimp's opt-in confirmation email (this requires a custom code change — let us know if you need it)
  • Disable the integration and use Mailchimp's signup forms separately

Programmatic sync

lib/marketing/contact-sync.ts exposes:

import { syncContactToMarketing } from '@/lib/marketing/contact-sync'

const result = await syncContactToMarketing(orgId, {
  email: 'jane@example.com',
  firstName: 'Jane',
  lastName: 'Doe',
  phone: '+15551234567',
})
// → { ok: true, provider: 'mailchimp' } or { ok: false, error, disabled? }

The function routes to whichever provider the org has selected, or returns { disabled: true } if neither is configured.

Troubleshooting

"Mailchimp not fully configured"

API key, server prefix, OR audience ID is missing. Check Settings → Integrations → Email Marketing. If the server prefix is blank, your API key didn't end in -xxxXX (e.g. -us21) — make sure you copied the full key.

HTTP 401 from Mailchimp

The API key is invalid or revoked. Generate a new one in Mailchimp and re-save.

Contact appears in Mailchimp but tags/merge fields are wrong

RemixCRM only sets the standard FNAME / LNAME / PHONE merge fields. If you have custom required fields in Mailchimp, the push fails with HTTP 400. Either make those fields optional or don't use this integration (or wire a custom sync via outbound webhooks → Zapier → Mailchimp).