Public | Automated Build

Last pushed: 10 months ago
Short Description
Ganomede's mailchimp registrar
Full Description


MailChimp microservice.


The mailchimp module will:

  • Listen for registrations and changes related events from ganomede-users.
  • Register the users' emails in mailchimp

Before starting, you should create mailchimp list and add following merge fields:

  • G_USERID of type text to store Ganomede User ID of registred user;
  • G_VIA of type text for app name user registred from;
  • G_COUNTRY of type text for user-selected country;
  • G_YOB of type number for user's year of birth.

This can be done by going to "List / Settings / List fields and *|MERGE|* tags" section of created list:

The add the required fields:

Worker will infer other subscriber information like location's latitude and longitude,
but it's always wortth to store original values too.


  • API_SECRET — non-empty string
  • LOG_LEVELlog level, defaults to INFO
  • Newsletter config:

    • NEWSLETTER_NAME non-empty string with internal name of newsletter (used in usermeta to track user's subscription status)
    • NEWSLETTER_ALLOW_FROM optional comma-seprated list; if specified, worker will only subscribe users from those apps
  • Mailchimp config

  • ganomede-events instance

    • EVENTS_PORT_8000_TCP_[ADDR|PORT|PROTOCOL] - IP|Port|Protocol to the events service
    • EVENTS_CLIENT_ID non-empty string to identify this worker
    • EVENTS_CHANNEL non-empty string, defaults to "users/v1", channel to listen for -vents on
    • EVENTS_PREFIX api prefix, defaults to "/events/v1"
  • ganomede-usermeta instance (trakc subscription status)

    • USERMETA_PORT_8000_TCP_[ADDR|PORT|PROTOCOL] - IP|Port|Protocol to the usermeta service
    • USERMETA_PREFIX api prefix, defaults to "/usermeta/v1"
  • StatsD for tracking stats (if host or port are missing, no stats will be sent)

    • STATSD_PREFIX defaults to "mailchimp.registrations."

    This will track 4 integers:

    • events total number of received events
    • failure number of errors
    • success number of successes
    • ignored number of ignored events
  • HTTP status server

    • HOST non-empty string, defaults to ""
    • PORT non-empty string, defaults to 8000


ganomede-users will emit the given events to ganomede-events: see here for the full specification

Newsletter registration status will be stored as a usermeta in the internal metadata newsletters, with value "<NEWSLETTER_NAME>" (retrieve from environment variables). The newsletters metadata is a comma separated list of newsletter names.

The module will also provide a monitoring API similar to other module of ganomede:

GET /mailchimp-worker/about

GET /mailchimp-worker/ping/:stuff

Pending design question

  • If possible, add the originator of the event ("from" field) as a source for the mailchimp registration.
Docker Pull Command
Source Repository