Send a project’s events to n8n and other orchestrators
Your team’s orchestrator, n8n for example, runs the release’s validation: it starts the Jenkins jobs, reads their artifacts and posts to Slack. Fistron works with it both ways:
- Fistron starts the workflow: a webhook of the project sends what happens in it (a cause concluded, an investigation done, a fix proposed) to the workflow’s address, signed.
- The workflow starts Fistron’s work: n8n asks the control plane’s API to investigate a failed build, and is told when the work finishes.
The same works with any tool that takes a POST of JSON.
Before you start
- A control plane (Team, Business or Enterprise) with its
secrets_keyset: a webhook’s secret is kept sealed with it. - The role Manager in the project, or in the organisation.
- In n8n, a workflow that starts with a Webhook node, its HTTP Method POST, and under Options Raw Body on, so that the signature can be checked on the body as it came.
Add a webhook
-
Open the project, then under Project settings Webhooks.
-
Click Add a webhook: a name, and the address (the Webhook node’s Production URL).
-
Choose the events it is sent, and optionally the operations it is limited to (empty: every one):
Event When work.finisheda work finished: done, partly done or failed, with its other events in its data investigation.donean investigation of a failed build is done: its groups of failed tests, how many causes concluded, the questions waiting cause.concludedan investigation concluded causes: each with its group, failed step, root cause and fix fix.proposeda cause’s fix or a test’s repair was opened as a pull or merge request triage.donetriage gave new failures their verdicts review.donea Daily CI review was made: how many of its streams are red report.donea release’s report was made from its epic -
Click Add the webhook. Its secret is shown this once: copy it into your workflow. New secret makes another; the former one signs nothing more.
Test sends ping at once and says what the address answered. What
went lists the last 50 deliveries: the event, its work, the tries and
what came back, What it sent, and Send again (the same delivery,
signed again). Turn a webhook off with Change; Delete removes it
with what went to it.
What a request carries
A POST of JSON with these headers:
| Header | Value |
|---|---|
X-Fistron-Event |
the event, e.g. cause.concluded |
X-Fistron-Delivery |
the delivery’s id, the same when it is sent again |
X-Fistron-Timestamp |
when it was signed, in Unix seconds |
X-Fistron-Signature |
sha256= and the HMAC-SHA256, with the secret, of the timestamp, a dot and the raw body, in hex |
{
"id": "0b6c…",
"event": "cause.concluded",
"at": "2026-11-30T14:05:00+00:00",
"project": {"id": "…", "slug": "shop", "name": "Shop"},
"work": {
"id": "…", "operation": "causes-analyze", "state": "succeeded",
"started_by": "person", "input": {"url": "https://ci.example.com/job/nightly/289/"},
"warnings": [], "error": null, "documents": ["sha256:…"],
"url": "https://fistron.example.com/projects/…/work/…",
"api": "https://fistron.example.com/api/v1/projects/…/work/…"
},
"data": {
"build": "https://ci.example.com/job/nightly/289/",
"causes": [{"group": "g1", "step": "When I …", "tests": 3,
"classification": "test_issue", "confidence": 0.86,
"root_cause": "…", "action": "…", "verified": true}]
}
}
started_by is a person, a schedule, a token or the system, never a
person’s name. A work’s input larger than 8 kB, and anything else the
request leaves out, is read through the API at work.api.
Check every request before the workflow acts on it: the signature, and
that the timestamp is recent. In n8n, a Code node after the Webhook node
does it (on n8n you run yourself, allow it the crypto module:
NODE_FUNCTION_ALLOW_BUILTIN=crypto). The check itself, in JavaScript:
const { createHmac, timingSafeEqual } = require("crypto");
// raw: the body as it came (a Buffer); headers: its headers, in lower case
function fromFistron(raw, headers, secret) {
const timestamp = headers["x-fistron-timestamp"] ?? "";
const expected = "sha256=" +
createHmac("sha256", secret).update(`${timestamp}.`).update(raw).digest("hex");
const given = Buffer.from(headers["x-fistron-signature"] ?? "");
const recent = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
return recent && given.length === expected.length &&
timingSafeEqual(given, Buffer.from(expected));
}
Stop the workflow when it returns false.
How it is sent
- After the work finishes, tried up to three times (at once, after 10 seconds and after a minute) while the address does not answer or answers 5xx, 408 or 429. Another answer is final: n8n’s 404 says the workflow is not active.
- Over https, to an address of the internet. On an installation for one
organisation, an address of its own network and http too (the chart’s
controlPlane.webhooks.privateAddressesdecides otherwise). Never a loopback or link-local address. Every address of the host is checked before each try; no redirect is followed. - On premises the chart lets the control plane out on 443
(
networkPolicy.webhooks); add n8n’s own port (5678) there when it listens on it.controlPlane.webhooks.enabled: falseturns webhooks off.
Let n8n start Fistron’s work
-
An admin makes an automation token of the role Engineer (Create an API token); in n8n it is a credential of the type Header Auth:
Authorization,Bearer <the token>. -
An HTTP Request node: POST to
https://<your control plane>/api/v1/projects/<project id>/workwith the body{ "operation": "causes-analyze", "input": {"url": "{{ $json.build_url }}"}, "callback": "{{ $execution.resumeUrl }}" }GET /api/v1/operationslists the operations and their inputs. -
A Wait node, Resume On Webhook Call, HTTP Method POST. When the work finishes, Fistron sends
work.finishedto the callback, signed with the secret of the webhook on n8n’s address, and the workflow goes on with it: its data holds the work’s other events (the causes concluded, for example).
A callback is taken only on the address of an enabled webhook of the
project: the same scheme, host and port, so add n8n’s address as a webhook
first. Without a callback, read the work’s state and result with GET /api/v1/projects/<project id>/work/<work id>.