Generic Outbound Webhooks
Send a JSON payload to any HTTPS endpoint whenever a run finishes: your own service, a Zapier zap, an n8n workflow or a custom alerting system. With a signing secret, every request carries an HMAC SHA-256 signature so your server can verify it came from Agnox.
Capabilities
| Feature | Description |
|---|---|
| Every run source | Hosted runs, @agnox/playwright-reporter runs and JUnit/Allure uploads (POST /api/v1/reports). Local runs from a developer machine are not sent |
| HMAC SHA-256 signing | With a secret configured, each request includes an x-agnox-signature: sha256=<hex> header |
| Readable payload | Run name, group, environment (including qa), source, project, structured counts and a sanitized first failure |
| Bounded delivery | 10-second timeout per attempt; network errors, 429 and 5xx are retried up to 3 attempts with backoff. Redirects are not followed |
| Send Test Event | Posts a signed webhook.test event to check your endpoint |
Prerequisites
- An HTTPS endpoint on a public address that accepts
POSTrequests with a JSON body. Private, loopback and link-local addresses are rejected when you save and again on every delivery. - The endpoint must respond with
2xxwithin 10 seconds.
Step 1 — Configure in Agnox
- In the Agnox dashboard, go to Settings → Connectors.
- Find the Generic Webhook card and fill in the fields:
| Field | Value |
|---|---|
| Webhook URL | Your HTTPS endpoint (e.g. https://hooks.example.com/agnox) |
| Webhook Secret | (Optional) A random string used to compute the HMAC-SHA256 signature |
- Click Save Configuration.
- Click Send Test Event to post a signed
webhook.testevent to the endpoint.
The secret is stored encrypted (AES-256-GCM) and never returned. Once set, the card shows Signing secret configured:
- Saving with the secret field blank keeps the stored secret (for example when you only change the URL).
- Typing a new secret replaces it.
- Checking Remove signing secret on save removes it; requests are then unsigned.
The API behaves the same way: PUT /api/integrations/webhook keeps the stored secret unless the body has a non-empty secret or clearSecret: true.
:::tip Generating a strong secret Use a cryptographically random string of at least 32 characters:
openssl rand -hex 32
:::
Payload Schema
Every run delivery is a POST with this shape:
{
"event": "execution.finished",
"executionId": "6750f2c1a8b4e2d3f1a9c001",
"taskId": "ingest-1764583200000-3f9a1c2b",
"status": "FAILED",
"title": "Nightly Checkout",
"runName": "Nightly Checkout",
"groupName": "web-shop",
"environment": "qa",
"source": "external-ci",
"projectId": "6750f2c1a8b4e2d3f1a9b777",
"summary": { "total": 49, "passed": 45, "failed": 3, "skipped": 1, "quarantined": 0 },
"errorSnippet": "Checkout > pays with card\nError: expect(received).toBe(expected)",
"startTime": "2026-12-01T11:56:00.000Z",
"endTime": "2026-12-01T12:00:12.000Z",
"url": "https://app.agnox.dev/dashboard?drawerId=ingest-1764583200000-3f9a1c2b"
}
| Field | Type | Notes |
|---|---|---|
event | string | execution.finished (or webhook.test for Send Test Event) |
executionId | string | Execution document ID |
taskId | string | null | Run ID shown in the dashboard |
status | string | PASSED, FAILED, ERROR or UNSTABLE |
title | string | runName, else groupName, else the test folder |
runName, groupName | string | null | Readable labels sent by the reporter, CLI or trigger |
environment | string | null | development, qa, staging or production |
source | string | agnox-hosted or external-ci |
projectId | string | null | Agnox project ID |
summary | object | null | Counts from the run's test results; failed excludes quarantined failures, which are counted in quarantined |
errorSnippet | string | null | First non-quarantined failure, ANSI-stripped and secret-redacted, at most 300 characters |
startTime, endTime | ISO date | null | Run start and end |
url | string | Link to the run in the Investigation Hub |
The test event is:
{ "event": "webhook.test", "message": "Test event from Agnox. Real deliveries use the execution.finished event.", "sentAt": "2026-12-01T12:00:00.000Z" }
Verifying the Signature
Agnox computes the signature as:
HMAC-SHA256(secret, rawRequestBody)
and sends it in the x-agnox-signature header as sha256=<hex>. Strip the sha256= prefix, compute the HMAC over the raw body bytes and compare in constant time.
Node.js Example
import crypto from 'crypto';
import express from 'express';
function verifyAgnoxWebhook(rawBody: Buffer, header: string | undefined, secret: string): boolean {
if (!header?.startsWith('sha256=')) return false;
const received = Buffer.from(header.slice('sha256='.length), 'hex');
const expected = crypto.createHmac('sha256', secret).update(rawBody).digest();
// timingSafeEqual throws when the lengths differ, so check them first
return received.length === expected.length && crypto.timingSafeEqual(received, expected);
}
const app = express();
app.post('/agnox', express.raw({ type: 'application/json' }), (req, res) => {
const signature = req.header('x-agnox-signature');
if (!verifyAgnoxWebhook(req.body, signature, process.env.AGNOX_WEBHOOK_SECRET!)) {
return res.status(401).send('Invalid signature');
}
const payload = JSON.parse(req.body.toString('utf8'));
// handle payload...
res.sendStatus(200);
});
Python Example
import hashlib
import hmac
def verify_agnox_webhook(raw_body: bytes, header: str | None, secret: str) -> bool:
if not header or not header.startswith("sha256="):
return False
received = header[len("sha256="):]
expected = hmac.new(secret.encode(), raw_body, hashlib.sha256).hexdigest()
return hmac.compare_digest(expected, received)
:::info Always use the raw body Parse the JSON after verification. Computing the HMAC over a re-serialised object can produce a different digest. :::
Troubleshooting
| Issue | Likely Cause |
|---|---|
Signature mismatch | Secret doesn't match, the sha256= prefix wasn't stripped, or you're verifying a parsed body instead of the raw bytes |
| No delivery received | Your endpoint took longer than 10 s on every attempt, returned a redirect, or the run was a local run |
Invalid webhook URL when saving | The URL is not HTTPS, carries credentials, or resolves to a private address |
| Payload received but no signature header | No secret is configured — set one in Settings → Connectors → Generic Webhook |