Skip to main content

Launch: −50% for 3 months with LANSARE50

Pricing →

n8n

Header auth, a verified webhook trigger or a scheduled poll.

  • Credential "Header Auth": Authorization / Bearer mf_live_….
  • Instant: "Webhook" node with the raw body enabled, then a "Code" node with verifyMformSignature, then "IF".
  • Polling: "Schedule Trigger" + "HTTP Request" with n8n pagination on next_cursor.
const crypto = require("crypto");
const raw = $input.first().binary?.data ? Buffer.from($input.first().binary.data.data, "base64").toString("utf8") : JSON.stringify($json.body);
const header = $json.headers["mform-signature"];
// verifyMformSignature: see /docs/api/webhooks
if (!verifyMformSignature(raw, header, $env.MFORM_WEBHOOK_SECRET)) throw new Error("bad signature");
return [{ json: JSON.parse(raw) }];