n8n
LiveSelf-hosted automation pipeline. If you run your own n8n instance, this is the lowest-friction way to wire Sloth Lee to anything.
Why n8n over Zapier or Make
- Self-hosted — webhook payloads never leave your network. Useful if you handle community moderation for a server that itself handles sensitive data.
- No per-task pricing — run as many workflows as your server can handle.
- Full Javascript in any node — verify HMAC signatures, transform payloads, branch on anything.
Set up
- In n8n, create a new Workflow. Add a Webhook trigger node. Set the HTTP method to POST and authentication to None — we sign the payload, not the request.
- Save the workflow once so n8n issues a webhook URL.
- In Sloth Lee's dashboard, create a webhook subscription pointing at that URL. See the Webhooks setup guide for the rest of the flow.
- Add a Function node next, and verify the signature using the snippet below before any downstream action runs.
Signature verification (n8n Function node)
const crypto = require('crypto');
// Replace SECRET with the value you copied from the dashboard.
// Best practice: store it in an n8n Credential, not here.
const secret = $env.SLOTH_LEE_WEBHOOK_SECRET;
const body = JSON.stringify($input.item.json);
const sig = $input.item.headers['x-sloth-signature'] || '';
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(body)
.digest('hex');
if (!crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(sig)
)) {
throw new Error('Invalid signature');
}
return $input.item;
Common n8n recipes
- Mod actions → PostgreSQL — pipe every
mod_actionevent into your own analytics DB for retention and pattern analysis. - Tickets → Sentry / Linear — bug-report tickets become Linear issues automatically; the n8n workflow extracts
[bug]tags from the subject. - Anomaly alerts → on-call rotation — time-of-day routing so the right person gets paged.