Skip to content

Mailchimp Overview

What is the Mailchimp integration?

The Mailchimp integration covers two distinct responsibilities:

  1. 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.
  2. Mailchimp webhookAudit 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

DirectionOwned byWhat happens
Givebutter → MailchimpNOMA SyncAdd/update list member, tags, merge fields when someone donates or registers.
Square → Mailchimp (optional)NOMA SyncSame contact pipeline for merchandise buyers.
Givebutter → LGLNOMA SyncConstituents, gifts, interactions.
Square → LGLNOMA SyncOrders, constituents.
Mailchimp ↔ LGL (subscription status)LGL’s built-in integrationNightly sync; LGL uses “MailChimp Status” category (Subscribed, Unsubscribed, Bounced, etc.). NOMA Sync does not update LGL from Mailchimp webhooks.

Mailchimp Webhook (Audit Only)

Mailchimp EventNOMA Sync actionLGL
UnsubscribeLog to sync_log (source: mailchimp)Updated by LGL’s Mailchimp integration (nightly)
CleanedLog to sync_logSame

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.

Next Steps