Webhooks, Zapier and HubSpot

mado can send what happens on your demos to your own tools: a JSON POST to any https address for each event you pick. A Zapier Catch Hook, a Make or n8n webhook, or your own server all work. Webhooks are part of the Pro and Team plans; HubSpot is part of Team. Set them up in Studio under Settings, Integrations. Owners and admins can add, pause and delete them.

Events

  • lead.submitted — Someone filled in a demo’s lead form. The only event that carries `lead` (what they typed).
  • link.opened — A tracked link (?for=…) was opened. Once per link per demo per day, like the alert.
  • cta.clicked — Someone clicked the end card’s call to action. Once per person per demo per day.
  • demo.completed — A viewer reached the end of the demo. Once per view.

Viewers that look like bots send nothing. Studio’s Send test sends a webhook.test event with example values, so you can map fields before a real lead arrives.

Payload

{
  "id": "evt_5k2m9q…",
  "type": "lead.submitted",
  "v": 1,
  "createdAt": "2026-11-11T10:04:31.000Z",
  "workspace": { "id": "ws_…", "name": "Acme Sales" },
  "demo": {
    "id": "dm_…",
    "title": "Onboarding in two minutes",
    "url": "https://mado.show/d/3dpbw6m1dc4f"
  },
  "link": { "label": "globex" },
  "view": {
    "stepsSeen": 4,
    "totalSteps": 9,
    "completed": false,
    "ctaClicked": false,
    "device": "desktop",
    "country": "DE",
    "embedHost": "www.acme.example"
  },
  "lead": { "email": "jane@globex.example", "name": "Jane Doe", "company": "Globex" }
}

link is null when the viewer did not come through a tracked link, view is null when the view is no longer stored, and lead is null on every event but lead.submitted. Payloads never carry an IP address or anything that identifies a viewer’s device. v is the payload version; fields are only ever added, so ignore the ones you do not know.

Headers and signature

  • Mado-Signature: t=1762855471,v1=5f3a… — v1 is the HMAC-SHA256 of t, a dot and the raw body, keyed with the endpoint’s signing secret, in hex.
  • Mado-Event-Id — the same as id in the body, and the same on every retry of one event. Use it to ignore repeats.
  • Mado-Event-Type — the same as type.

The signing secret (whsec_…) is shown once, when you add the endpoint. Rotate it in Studio to get a new one; the old one stops working at once. Checking a signature in Node:

import crypto from 'node:crypto';
import express from 'express';

const app = express();
const SECRET = process.env.MADO_WEBHOOK_SECRET; // whsec_…

// Read the raw body: the signature is over the exact bytes mado sent.
app.post('/mado', express.raw({ type: 'application/json' }), (req, res) => {
  const header = req.get('Mado-Signature') ?? '';
  const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
  const t = Number(parts.t);
  const body = req.body.toString('utf8');

  const expected = crypto.createHmac('sha256', SECRET).update(`${t}.${body}`).digest('hex');
  const given = Buffer.from(parts.v1 ?? '', 'hex');
  const fresh = Math.abs(Date.now() / 1000 - t) < 300; // refuse replays older than 5 minutes

  if (!fresh || given.length !== 32 || !crypto.timingSafeEqual(given, Buffer.from(expected, 'hex'))) {
    return res.status(400).send('bad signature');
  }

  const event = JSON.parse(body);
  // Deliveries can repeat: skip an event id you have already handled.
  console.log(event.type, event.id);
  res.sendStatus(200);
});

app.listen(3000);

Retries

Answer with any 2xx within 5 seconds. Anything else, a timeout or a redirect counts as a failure, and mado tries again after about 1 minute, 5 minutes, 15 minutes, 1 hour, 3 hours, 6 hours and 12 hours, never later than 24 hours after the event. Redirects are not followed. An answer of 410 Gone stops the deliveries and pauses the endpoint at once (a deleted Zap answers 410).

After 20 failures in a row the endpoint is paused and the workspace’s owners and admins get an email. Resume it in Studio once the receiver works again. The delivery log in Studio shows every attempt with its answer for 30 days.

Addresses must be public https addresses. mado refuses private, loopback and link-local addresses, checked again each time it connects.

Connect to Zapier with a Catch Hook

  1. In Zapier, make a Zap. For the trigger choose Webhooks by Zapier, then Catch Hook, and copy the webhook URL it gives you.
  2. In mado Studio, open Settings, Integrations. Paste the URL, tick the events you want (for example A lead form is filled in) and click Add webhook. Keep the signing secret if you will check signatures; Zapier does not need it.
  3. Click Send test next to the new webhook. In Zapier, click Test trigger: the test event arrives with example values, such as the lead’s email and the demo’s title.
  4. Add the action, for example a row in Google Sheets or a message in Slack, and map the fields. Turn the Zap on.

Make and n8n work the same way with their own webhook triggers.

HubSpot

On the Team plan, click Connect HubSpot in Settings, Integrations and approve mado in HubSpot. Then:

  • A filled-in lead form creates a HubSpot contact, or updates the one with that email, and adds a note naming the demo and the tracked link.
  • When a person who left their email opens their tracked link again or finishes the demo, their contact gets a note.
  • You choose which HubSpot property the name and company go to. The email always goes to the contact’s email.

Disconnect deletes mado’s sign-in to your HubSpot account. Data sent to your webhook or your HubSpot goes there because you set it up; what happens to it there is between you and that service.