n8n integration

Receive Jaina webhooks in n8n and trigger downstream automations.

The pattern

Jaina fires webhooks on record.created, record.updated, and record.deleted. n8n receives them and routes them to anywhere — Slack, Discord, GitHub Issues, Google Sheets, your custom HTTP service.

Step 1: an n8n webhook

In n8n, add a Webhook node:

  • HTTP method: POST
  • Path: jaina-records
  • Response: Last Node

Activate and copy the production URL (e.g., https://n8n.example.com/webhook/jaina-records).

Step 2: register the webhook in Jaina

Your project → Webhooks → New webhook:

  • URL: paste your n8n URL
  • Events: record.created, record.updated
  • Description: optional
  • Secret: auto-generated; copy it

Step 3: verify the signature

Add a Function node:

const crypto = require('crypto');
const secret = $env.JAINA_WEBHOOK_SECRET;
const signature = $request.headers['x-jaina-signature'];
const body = JSON.stringify($json);

const expected = 'sha256=' + crypto
  .createHmac('sha256', secret)
  .update(body)
  .digest('hex');

if (signature !== expected) {
  throw new Error('Invalid signature');
}

return $json;

Set JAINA_WEBHOOK_SECRET in n8n's env to the secret from step 2.

Step 4: route to anywhere

Common patterns:

  • Slack — post to a channel when a record is created with a specific tag.
  • GitHub Issues — open an issue when a record fails validation.
  • Google Sheets — append a row to a tracking sheet.
  • Custom HTTP — call your application backend to invalidate a cache.

Payload shape

{
  "id": "e5b9d72a-1c84-4f30-a6b2-9d0e1f2a3b4c",
  "type": "record.created",
  "data": {
    "project": { "id": "1f0a2b3c-4d5e-6f70-8192-a3b4c5d6e7f8", "slug": "my-game" },
    "schema":  { "id": "7c2e9b41-3a6d-4f85-9e0a-1b2c3d4e5f60", "slug": "enemy" },
    "record":  {
      "id":   "a3f1c8d2-5e7b-4a90-b1c3-2d4e6f8a0b1c",
      "data": { "name": "Goblin", "hp": 20 }
    }
  },
  "created_at": "2026-05-13T12:34:56.789Z"
}

Retries

Jaina retries failed deliveries up to 5 times with exponential backoff over ~15 minutes. Delivery attempts and outcomes are logged in your project's Webhooks → Delivery log.