Mailchimp new subscriber notifications on your phone.

Get a low-priority push notification when someone subscribes to your Mailchimp audience, with their name and email.

How it works

Three steps to your first push

STEP 01

Install the recipe

One click in Studio gives you a personal webhook URL.

STEP 02

Paste your URL into Mailchimp

Add it as a webhook for Email subscribes.

STEP 03

Get a push on your phone

With the text, sound and buttons from the recipe.

Setup

How to set up the Mailchimp email subscribes webhook

  1. Click Install in Studio and sign in. The recipe is added to your account and you get a personal webhook URL.
  2. In Mailchimp, open Audience, pick your audience, then More options > Audience settings > Manage webhooks and click Create webhook.
  3. Paste your webhook URL as the Callback URL. Mailchimp checks it with a quick GET, which JustPush accepts silently.https://••••••••/•••••••• your personal URL, shown after install
  4. Tick only Email subscribes under the update types, keep all three sources ticked, and click Create webhook.
  5. Mailchimp only sends the audience's ID, not its name. To show the name in the push, add it to the Callback URL:
  6. ```
  7. your webhook URL?audience=Weekly%20Newsletter
  8. ```
  9. (`%20` is a space.) Leave it out and the push says "your audience".
  10. Mailchimp checks the URL with a GET request when you save the webhook. The recipe answers it without sending a push.
  11. Mailchimp can sign deliveries (`X-Mailchimp-Signature`) and shows a signing secret once after you save. JustPush doesn't check that signature yet, so you can dismiss the secret and keep your endpoint URL private.
The code

What runs when the webhook arrives

Studio calls handleRequest(request) with the incoming webhook and sends the message it returns. It's yours after install; change anything.

transform.js
1// Mailchimp → subscribe (new subscriber)
2// Fires when someone subscribes to a Mailchimp audience, through a signup form,
3// an admin adding them, or the API.
4// Docs: https://mailchimp.com/developer/marketing/guides/sync-audience-data-webhooks/
5//
6// Mailchimp POSTs form-encoded fields such as type=subscribe, data[email]=…,
7// data[merges][FNAME]=…. Depending on how the body was parsed, it can arrive as a
8// nested object, a flat object with bracket keys, or only as the raw string.
9
10// Keys that must never become object properties.
11const UNSAFE = new Set(["__proto__", "constructor", "prototype"])
12
13// Put a value at a bracket path such as data[merges][FNAME].
14function setPath(target, key, value) {
15 const parts = String(key).replace(/\]/g, "").split("[")
16 if (parts.some((p) => p === "" || UNSAFE.has(p))) return
17 let node = target
18 for (const part of parts.slice(0, -1)) {
19 if (!node[part] || typeof node[part] !== "object") node[part] = {}
20 node = node[part]
21 }
22 node[parts[parts.length - 1]] = value
23}
24
25// Decode one form-encoded piece; a bad escape shouldn't break the whole body.
26function decode(value) {
27 try {
28 return decodeURIComponent(String(value).replace(/\+/g, " "))
29 } catch {
30 return String(value)
31 }
32}
33
34// Turn whatever Studio gives us into { type, fired_at, data: { … } }.
35function readForm(request) {
36 const body = request.body
37 const out = {}
38 if (body && typeof body === "object" && !Array.isArray(body)) {
39 // Nested keys are copied as they are; bracket keys are expanded.
40 for (const [key, value] of Object.entries(body)) {
41 if (key.includes("[")) setPath(out, key, value)
42 else if (!UNSAFE.has(key)) out[key] = value
43 }
44 if (out.type) return out
45 }
46 // Fall back to the raw form-encoded string.
47 const raw = typeof request.raw === "string" ? request.raw : typeof body === "string" ? body : ""
48 if (raw.includes("=")) {
49 for (const pair of raw.split("&")) {
50 const at = pair.indexOf("=")
51 if (at > 0) setPath(out, decode(pair.slice(0, at)), decode(pair.slice(at + 1)))
52 }
53 }
54 return out
55}
56
57// Form fields are strings; treat blanks as missing.
58function text(value) {
59 return typeof value === "string" && value.trim() ? value.trim() : null
60}
61
62function handleRequest(request) {
63 // Mailchimp checks the callback URL with a GET when you save the webhook.
64 if (String(request.method ?? "").toUpperCase() === "GET") {
65 console.log("Mailchimp URL check (GET) — nothing to send")
66 return null
67 }
68
69 const form = readForm(request)
70 const data = form.data && typeof form.data === "object" ? form.data : {}
71
72 // Guard: only subscribes, so other update types on this webhook stay quiet.
73 if (form.type !== "subscribe") {
74 console.log(`Ignoring Mailchimp "${form.type ?? "unknown"}" update`)
75 return null
76 }
77
78 const merges = data.merges && typeof data.merges === "object" ? data.merges : {}
79 const email = text(data.email) ?? text(merges.EMAIL)
80 const name = [text(merges.FNAME), text(merges.LNAME)].filter(Boolean).join(" ")
81 const who = name && email ? `${name} (${email})` : name || email || "Someone"
82 // Mailchimp only sends the audience ID, so ?audience=Newsletter names it for you.
83 const audience = text(request.query?.audience)
84
85 return {
86 title: "📬 New subscriber",
87 message: `${who} joined ${audience ?? "your audience"}`,
88 topic: "Mailchimp",
89 priority: -1, // Low — good news, nothing to do
90 }
91}
Payload

The Mailchimp subscribe webhook

This is what Mailchimp sends to your URL for email subscribes. It is a sample, trimmed to the fields recipes use.

subscribe · sample.json
1{
2 "data": {
3 "id": "8a25ff1d98",
4 "email": "[email protected]",
5 "ip_opt": "203.0.113.10",
6 "merges": {
7 "EMAIL": "[email protected]",
8 "FNAME": "Ada",
9 "LNAME": "Lovelace",
10 "INTERESTS": "Weekly digest"
11 },
12 "list_id": "a6b5da1054",
13 "ip_signup": "203.0.113.10",
14 "email_type": "html"
15 },
16 "type": "subscribe",
17 "fired_at": "2026-09-29 09:35:57"
18}
FAQ

Mailchimp new subscriber notifications: questions

Does this work on iPhone and Android?

Yes. Install the JustPush app from the App Store or Google Play and sign in. Every phone signed in to your account gets the notification.

Do I need to write code?

No. Install the recipe in Studio, paste your webhook URL into Mailchimp and you are done. The code is there if you want to change the text, the sound or the buttons.

Can I change what the notification says?

Yes. After install the recipe's code is yours. Edit it in Studio and test it against the sample payload before you save.

What does it cost?

JustPush is free for 30 days. After that it's $19.99 a year, or $39.99 once. There is no extra charge for recipes.

Ready when you are

Mailchimp on your phone in two minutes.

Install the recipe, paste one URL, done. Free for 30 days, no credit card required.