Webhooks
Receiver recipes
Copy-paste patterns that come up most often in production. Signature verification is included in every one.
Recipe 1 — send a KakaoTalk notification
On a status change, notify everyone connected to the idea over KakaoTalk — by far the most common setup.
Express + KakaoTalk
Recipe 2 — route by traits
KakaoTalk for plan: "pro" users, email for everyone else.
Recipe 3 — push to heavy users only
Recipe 4 — post to Discord (Slack and JANDI convert automatically)
Discord isn't converted automatically, so you'll need to format the payload yourself.
Recipe 5 — n8n / Zapier
n8n and Zapier handle this in their GUI, no code required.
- Create a Webhook trigger node in n8n and copy its URL
- Register that URL under
Settings → Webhooksin Lenit - Chain whatever you need in n8n's visual builder — create a Notion page, send a Slack message, append to Google Sheets
TipPreviewing the payload shape
n8n and Zapier trigger nodes learn the payload schema from the first request they receive. Fire a test trigger from the Lenit admin — change one idea's status — to register the schema, then wire up the nodes that follow.
Recipe 6 — retry queue (recommended in production)
Lenit is fire-and-forget: if your server is down for a moment, that event is gone for good. Put a queue in front of it and run the retries yourself.
Retry queue with BullMQ + Redis
Debugging tips
| Symptom | What to check |
|---|---|
| No notification arrives | Check the URL and the ticked events under Settings → Webhooks. Register webhook.site temporarily to confirm the payload arrives |
audience is empty | Confirm the event is idea.status_changed or announcement.published and that audience targets are ticked. It comes through empty when only anonymous (fingerprint) visitors are involved |
| 401 verification failure | Automatic parsing such as express.json() can destroy the raw body — use express.raw() instead |
| Signatures match but it still fails | Make sure the sha256= prefix is part of the comparison, and check for stray whitespace |