Skip to content

n8n

ErrLens sends the full event JSON to an n8n Webhook node. From there you can route the event through any n8n workflow — fan it to Notion, PagerDuty, your on-call rotation, a Slack DM filtered by environment, whatever the workflow author wants.

We deliberately do not sign the payload for the n8n kind. n8n's stock Webhook node doesn't validate signatures and forcing operators to add a Function node just to verify HMAC is friction we'd rather avoid.

Payload shape

json
{
  "event": "issue.first_seen",
  "delivery_id": "fb1f...-uuid",
  "occurred_at": "2026-05-13T09:00:00Z",
  "project": {
    "id": "uuid",
    "slug": "checkout-api",
    "name": "checkout-api",
    "platform": "go"
  },
  "issue": {
    "id": "uuid",
    "title": "panic: runtime error: invalid memory address",
    "culprit": "handlers/charge.go:142",
    "level": "fatal",
    "environment": "prod",
    "release": "checkout-api@4.2.1",
    "times_seen": 1,
    "first_seen": "2026-05-13T09:00:00Z",
    "url": "https://acme.errlens.dev/projects/checkout-api/issues/uuid"
  }
}

event is either issue.first_seen (new issue) or project.frequency (threshold rule crossed). The shape is identical — issue carries the representative issue for frequency alerts.

Headers on every delivery:

  • X-ErrLens-Event — same value as event
  • X-ErrLens-Delivery — the delivery's UUID (for idempotency)
  • X-ErrLens-Kind: n8n — tells the receiver which formatter ran
  • X-ErrLens-N8N: 1 — n8n-specific marker

Set up the n8n webhook

  1. Open n8n → New workflow.
  2. Add a Webhook node as the trigger. Method = POST. Path = whatever you like, e.g. errlens.
  3. Test webhook vs Production webhook: n8n shows two URLs. Use the Production one in ErrLens; the test URL only listens while you're staring at the editor.
  4. Save the workflow. The Production webhook URL looks like https://n8n.example.com/webhook/errlens.

Add it to ErrLens

  1. Open Org alerts (or a project's Alerts tab).
  2. Add destination → pick n8n.
  3. Paste the Production webhook URL → set a destination name → save.
  4. Click Send test event. Open the workflow's Executions panel in n8n — you should see one execution containing the test payload.

A starter workflow (importable JSON)

This minimal workflow receives the ErrLens event and posts a formatted message to a Slack channel via the Slack node. Copy / paste into n8n via Workflow → Import from clipboard:

json
{
  "nodes": [
    {
      "parameters": { "httpMethod": "POST", "path": "errlens" },
      "type": "n8n-nodes-base.webhook",
      "name": "ErrLens",
      "typeVersion": 1
    },
    {
      "parameters": {
        "channel": "#alerts",
        "text": "={{ $json.event }}: {{ $json.issue.title }} ({{ $json.project.slug }}) → {{ $json.issue.url }}"
      },
      "type": "n8n-nodes-base.slack",
      "name": "Slack",
      "typeVersion": 2
    }
  ],
  "connections": {
    "ErrLens": { "main": [[{ "node": "Slack", "type": "main", "index": 0 }]] }
  }
}

Quirks

  • Test webhook URL goes idle. If you accidentally use the test URL, n8n only listens while the editor is open and stops after one execution. The destination's consecutive failures counter will tick up the next time ErrLens fires.
  • No HMAC. If you want signature verification, use the generic webhook kind and add a Function node to recompute and compare against X-ErrLens-Signature.

Troubleshooting

  • Execution panel empty: the Production webhook URL needs Save + Activate on the workflow. Test URLs don't persist across editor reloads.
  • 4xx from n8n: the workflow is paused or the URL changed. Re-copy the production URL.