Appearance
What is the Mailchimp integration?
The Mailchimp integration covers two distinct responsibilities:
- Givebutter (and Square) → Mailchimp — NOMA Sync pass-through: when someone donates, registers, or buys, NOMA Sync adds or updates that contact in Mailchimp (list member, merge fields, tags). This is the main “sync” from transactional sources into Mailchimp.
- Mailchimp webhook — Audit only: when Mailchimp sends events (unsubscribe, cleaned), NOMA Sync logs them to sync_log. It does not update LGL. Subscription status in LGL is handled by LGL’s built-in Mailchimp integration (nightly).
Integration: Mailchimp
Webhook: POST /webhooks/mailchimp (audit-only)
Code: apps/worker/src/handlers/mailchimp-webhook.ts, lib/contact-sync.ts (Givebutter/Square → Mailchimp), lib/mailchimp-list-mapper.ts, lib/mailchimp-tag-rules.ts
Who Owns What
| Direction | Owned by | What happens |
|---|---|---|
| Givebutter → Mailchimp | NOMA Sync | Add/update list member, tags, merge fields when someone donates or registers. |
| Square → Mailchimp (optional) | NOMA Sync | Same contact pipeline for merchandise buyers. |
| Givebutter → LGL | NOMA Sync | Constituents, gifts, interactions. |
| Square → LGL | NOMA Sync | Orders, constituents. |
| Mailchimp ↔ LGL (subscription status) | LGL’s built-in integration | Nightly sync; LGL uses “MailChimp Status” category (Subscribed, Unsubscribed, Bounced, etc.). NOMA Sync does not update LGL from Mailchimp webhooks. |
Mailchimp Webhook (Audit Only)
| Mailchimp Event | NOMA Sync action | LGL |
|---|---|---|
| Unsubscribe | Log to sync_log (source: mailchimp) | Updated by LGL’s Mailchimp integration (nightly) |
| Cleaned | Log to sync_log | Same |
The Worker verifies the webhook, parses the payload, and writes an audit row. No LGL API calls. See Unsubscribe Flow and LGL Data.
List Mapping and Tag Rules
Dashboard → Mailchimp Settings lets you configure list mapping and tag rules. For the webhook, these are used for audit context (e.g. which list an event came from), not for updating LGL. Givebutter/Square → Mailchimp uses list mapping to decide which Mailchimp list(s) to add contacts to.
Dashboard
- Mailchimp Settings – List mapping, tag rules, test connection.
- Syncs – Filter by source Mailchimp to see webhook events (audit) or Givebutter/Square contact syncs to Mailchimp.
Environment / Secrets
- MAILCHIMP_WEBHOOK_SECRET – Optional; used to verify Mailchimp webhook requests.
- MAILCHIMP_API_KEY – Used when NOMA Sync adds/updates contacts in Mailchimp (Givebutter/Square → Mailchimp) and for list/tag API calls.

