Home / Companies / Contentful / Blog / Post Details
Content Deep Dive

A loosely-coupled approach to creating MailChimp campaigns with Contentful webhooks

Blog post from Contentful

Post Details
Company
Date Published
Author
Chris Knowles
Word Count
1,900
Language
English
Hacker News Points
-
Summary

Contentful provides a modern approach to generating email notifications that keeps code and design separate, using webhooks functionality and cloud functions to create, schedule, and send campaigns based on publish events in Contentful. The solution uses MailChimp's templates with editable sections, Mustache templating language, and JSON-friendly templating to simplify the process of sending campaigns. To trigger the creation of a campaign in MailChimp, Contentful's webhook is used to send data that is then processed by a cloud function, which generates HTML content using Mustache's render function and sends it to MailChimp for campaign creation. The solution aims to keep template design in MailChimp, minimize errors, and improve scalability.