Mailchimp recipe

Portico leads and rewards into Mailchimp.

Portico has no native Mailchimp connector. This recipe takes each signed webhook event into Mailchimp through Zapier's Mailchimp app, Make or a small endpoint of your own: a player who leaves their details joins your audience with the status their consent allows, the form's answers fill your merge fields, and the reward they won becomes a tag and a subscriber event your automations can start from.

Discuss your campaign
01

Before you start

You need a brand on the Brand or Group plan, where webhooks and identified embeds are included, a Mailchimp account with API access or a Zapier or Make account, and the brand's webhook secret from the Portico console (Integrations). Portico posts to public https URLs only, never follows a redirect, and sends each event as JSON with the headers x-portico-event (the type), x-portico-delivery (the delivery's id) and x-portico-signature. Every key is always present, with null where the event has no value, so a mapping made from the sample works on every real event. A brand may have up to ten endpoints; one per automation is the usual pattern.

02

Which event goes where

Four of Portico's six events carry what a CRM wants: lead.captured when a player leaves their details, reward.awarded when they win, reward.redeemed when the code is used at your till or checkout, and quiz.completed when a quiz is scored. (calculator.completed and prediction.settled follow the same envelope.) Each event names the campaign, the participant, the session and the form's answers under the CRM names you chose, then its own block. This is how they land in Mailchimp.

Portico eventMailchimp callWhat it records
lead.capturedAdd or update the audience member by email (Mailchimp Marketing API, or Zapier's Add/Update Subscriber).email_address, merge fields such as FNAME, LNAME and PHONE, status from marketingConsent, and a tag named after campaign.slug.
reward.awardedAdd a tag (Add Subscriber to Tag) and a subscriber event (Create Custom Event).A tag such as portico-reward-coffee from reward.tierKey, and an event with reward.label and occurredAt. The code only if your endpoint includes codes.
reward.redeemedAdd a tag and a subscriber event.A tag such as portico-redeemed, and an event with redemption.redeemedAt and redemption.receipt.
quiz.completedAdd a tag and a subscriber event.A tag such as portico-quiz-passed when quiz.passed is true, and an event with quiz.score and quiz.maxScore.
03

Consent, and how it maps

In Mailchimp, consent is the member's status, and in GDPR-enabled audiences also its marketing permissions. Portico sends one boolean, as it stands now. In Portico a capture form records consent by purpose: participation and prize delivery are implied and their texts shown, marketing is a tick box that is never pre-ticked or required, and analytics follows the page's cookie banner. participant.marketingConsent is the marketing purpose's latest state; a form field you marked as marketing-only is left out of answers when it is false.

Portico fieldMailchimp fieldRule
participant.marketingConsent (true)status: subscribed, and the email marketing permission enabledSubscribe only on true.
participant.marketingConsent (false)Do not add the member, or add them with status transactionalA transactional member receives no campaigns. Do not set subscribed, pending or unsubscribed from a false.
participant.email, participant.phoneemail_address, the PHONE merge fieldMember identifiers. They are never in answers.
answers.<your CRM names>Merge fields of the same tagsName each form field after its merge tag in the Portico console, such as COMPANY or ROLE.
campaign.slugA tagOne tag per campaign keeps audiences from one Portico campaign apart from the next.
profile.marketingOptIn (opted_in, opted_out, not_asked)The same status, on campaigns with entry requirementsTreat not_asked as no change, not as a no.
04

Set up in Zapier

One Zap with a Catch Raw Hook trigger, a signature check and a path per event type. Zapier's hook URL is a public https address, which is what Portico requires.

  1. In Zapier, start a Zap with the trigger Webhooks by Zapier, Catch Raw Hook, and copy the hook URL.
  2. In the Portico console, open Integrations, Event webhooks, and add an endpoint with that URL. Tick lead.captured, reward.awarded, reward.redeemed and quiz.completed. Leave “Include prize codes and offer links” off unless Mailchimp should hold the code.
  3. Press “Test lead.captured”. Zapier receives the sample with every key filled, so the mapping you make from it works on every real event.
  4. Add a Code by Zapier step that checks x-portico-signature against your webhook secret (the snippet below) and parses the body, then a Paths step on type.
  5. lead.captured path: a Filter on participant.marketingConsent is true, then Mailchimp, Add/Update Subscriber, with status subscribed, merge fields from answers and a tag from campaign.slug. A second branch for false either stops or adds the member as transactional.
  6. reward.awarded, reward.redeemed and quiz.completed paths: Mailchimp, Add Subscriber to Tag, and Mailchimp, Create Custom Event, both found by participant.email.
  7. Turn the Zap on. In Portico's delivery log, each event should show sent with status 200; a failed delivery can be sent again from there with the same id.
05

Set up in Make

The same shape in Make: a custom webhook, a router and Mailchimp's modules or the HTTP module. Make's formula language has sha256 with a key, so the signature check is a filter rather than a code step.

  1. In Make, add a Webhooks, Custom webhook module and copy its address.
  2. Add the address as an endpoint in the Portico console (Integrations, Event webhooks), tick the four events and press a test so Make learns the structure.
  3. Add a Router. On every route, a filter compares the header's v1 with sha256(t + "." + body; hex; secret) and stops when they differ; a second condition routes on type.
  4. lead.captured: Mailchimp, Add/Update a Subscriber, with status subscribed only when marketingConsent is true, merge fields from answers and a tag from campaign.slug.
  5. reward.awarded, reward.redeemed, quiz.completed: Mailchimp, Add a Tag to a Subscriber, then an HTTP request to the member's events endpoint for the subscriber event.
  6. Run once, check the delivery log in Portico shows 200, then schedule the scenario to run on each webhook.
06

A worked lead.captured payload

This is the published sample, exactly as the console's Sample payloads and “Test lead.captured” send it: the envelope every event shares, then the lead's own keys. qualified and reasons appear only on a campaign that qualifies its leads (the B2B lead quiz), and profile only on a campaign with entry requirements; every other campaign leaves them out, so an existing mapping reads the same.

lead.captured, as the test send posts it
{
  "version": 1,
  "occurredAt": "2026-10-01T09:30:00.000Z",
  "campaign": {
    "id": "7b3f6a52-3f0e-4c8e-9a51-2f7d8c1e0a11",
    "slug": "spring-quiz"
  },
  "participant": {
    "id": "crm-123",
    "email": "[email protected]",
    "phone": "+46701234567",
    "marketingConsent": true
  },
  "session": {
    "ref": "0123456789abcdef"
  },
  "answers": {
    "company": "Example AB",
    "role": "Buyer",
    "newsletter": true
  },
  "id": "lead.captured:c1a2b3c4-d5e6-4f70-8a91-b2c3d4e5f607",
  "type": "lead.captured",
  "qualified": true,
  "reasons": [
    "Quiz: 4 of 5 (pass mark 3)",
    "Company size: 50–249 (at least 10–49)"
  ],
  "profile": {
    "version": 1,
    "name": "Alex Example",
    "company": "Example AB",
    "title": "Head of Marketing",
    "phone": "+46701234567",
    "telegram": "alex_example",
    "linkedinFollowClickedAt": "2026-10-01T09:28:00.000Z",
    "marketingOptIn": "opted_in"
  }
}
07

A worked reward.awarded payload

The same envelope with the reward block. code and deepLink are filled only for an endpoint that includes codes; otherwise both are null. delivery says how Portico delivered the reward (such as code or link). A gift card adds a giftCard block with its value and expiry.

reward.awarded, for an endpoint that includes codes
{
  "version": 1,
  "occurredAt": "2026-10-01T09:30:00.000Z",
  "campaign": {
    "id": "7b3f6a52-3f0e-4c8e-9a51-2f7d8c1e0a11",
    "slug": "spring-quiz"
  },
  "participant": {
    "id": "crm-123",
    "email": "[email protected]",
    "phone": "+46701234567",
    "marketingConsent": true
  },
  "session": {
    "ref": "0123456789abcdef"
  },
  "answers": {
    "company": "Example AB",
    "role": "Buyer",
    "newsletter": true
  },
  "id": "reward.awarded:5d2c9e1a-8b4f-4a37-b6c2-0e9f1a2b3c4d",
  "type": "reward.awarded",
  "reward": {
    "claimId": "5d2c9e1a-8b4f-4a37-b6c2-0e9f1a2b3c4d",
    "tierKey": "coffee",
    "label": "A free coffee",
    "delivery": "code",
    "code": "COFFEE-7Q2X",
    "deepLink": "https://example.com/redeem?code=COFFEE-7Q2X"
  }
}
08

Check the signature

Every delivery carries x-portico-signature: t=<unix seconds>,v1=<hex>, where v1 is HMAC-SHA256 of t, a full stop and the raw body, keyed with the brand's webhook secret. Recompute it over the body exactly as received, before parsing, and compare in constant time. Dedupe on id: a retry of the delivery, a replay from the delivery log and a repeat of the same action all carry the same id. If you want replay protection, refuse a t more than a few minutes from your clock; Portico's own inbound signed calls allow five.

Node, as the console shows it
// Header: x-portico-signature: t=<unix seconds>,v1=<hex>
// Recompute over the raw body exactly as received.
const [t, v1] = header.split(",").map((p) => p.split("=")[1]);
const expected = crypto
  .createHmac("sha256", WEBHOOK_SECRET)
  .update(t + "." + rawBody)
  .digest("hex");
const genuine = crypto.timingSafeEqual(
  Buffer.from(v1, "hex"),
  Buffer.from(expected, "hex"),
);
09

Retries, and where it stops

A delivery that fails is tried again after one minute, then five, thirty, two hours and twelve: six attempts over about sixteen hours, after which it is marked dead and can be sent again by hand from the delivery log. Create the merge fields in the audience first; an unknown merge tag is dropped. Mailchimp counts audience members per plan, so a false consent that stops the Zap costs nothing, while transactional members do count. Portico never reads from Mailchimp: nothing comes back unless your systems send a business event or a redemption callback.

Mailchimp is a trademark of its owner; Portico Play is not affiliated with it. The Portico side of this recipe (events, keys, headers, signature, retries, consent) is taken from the product as it runs. The Mailchimp, Zapier and Make names are from their public documentation at the time of writing and may change; check them against your account.

Your brand. Your next big idea.

Let’s make it
worth playing.

Tell us about your audience and your next campaign. We’ll help you find the right game.

Talk to the studio