For my church · Automation
Replacing a broken integration with a nightly sync
The built-in link between our church database and Mailchimp didn't work, so a colleague kept the two in step by hand.

The problem
Our church keeps people in Elexio and sends its newsletter from Mailchimp. Elexio's own Mailchimp integration was broken, so a staff member reconciled the two by hand: adding new connect-card sign-ups, and carrying unsubscribes back the other way.
Comparing fresh every night
- Wrote small throwaway scripts first to check what each API really does, because the docs left the risky questions open. Every write was tested on a junk record, never a real person.
- Each night the job reads the Elexio newsletter group and the whole Mailchimp audience, and compares them directly. Nothing is remembered between runs, so a missed night catches up the next night and a re-run does no harm.
- Anyone in the group but not in Mailchimp is added. Anyone who unsubscribed or bounced goes on a list for a person to remove from the group. The job never writes to Elexio.
- Guard rails: it stops and alerts if it's about to add more than 25 people, if either list comes back empty, or if Mailchimp returns a short page. Every run is a dry run unless writes are switched on.
- It runs as a Railway cron job, and it's silent unless something breaks: a phone notification on failure, and a dead-man's switch if a night is missed.
Outcome
Before switching it on, I worked through the backlog with the staff member: 11 addresses fixed, 189 stale members removed from the group, and the 22 recent sign-ups reviewed and added. Since then it runs on its own.
What to know
It doesn't handle changed email addresses yet: a new address is added as a new contact. Detecting those, then removing unsubscribes from Elexio automatically, are the next steps, one direction at a time.