Automations and webhooks
Connect a trigger to actions. Start an audit from your own tools with one call, and get the result on your webhook.
An automation connects a trigger to actions. You draw it on a canvas in the app under Developers → Automations, or create it over the API. You can keep 10 automations.
Automations are a developer tool. Turn on developer tools once in the app under Settings → Developer tools first; until then Automations is not in the menu, incoming webhooks answer 403 and nothing is sent. See Developer tools: who they are for.
What you can build
| Flow | Use it for |
|---|---|
| Incoming webhook → Run audit → Send webhook | Your deploy pipeline, Zapier, Make or n8n calls one address; Metricevo audits the site and posts the result back. |
| Incoming webhook → Run audit | Start an audit from outside and read the result in the app or over the API. |
| Audit finished → Send webhook | Get every finished audit of a site on your webhook, however it was started: by hand, on a schedule or over the API. |
Combine the last one with a repeating schedule and you have a weekly report pushed to your own system.
Build one on the canvas
- In the app, open Automation → Automations and press New automation. The canvas starts with the most common flow.
- Drag the steps where you like. To connect two steps, drag from the dot on the right of a step onto the next step. Click a line to remove it. From the keyboard, select a step and choose the next one under Then.
- Select Run audit and choose the Site.
- Select Send webhook and enter the Address: a public
https://address of yours. - Give the automation a Name and press Save.
Add steps with the buttons above the canvas. An automation has exactly one trigger, and the steps form one chain. If the flow is not one of the supported ones, saving tells you why.
The incoming webhook
After saving a flow that starts with Incoming webhook, the app shows its address once. Copy it then: only a fingerprint is stored.
curl -X POST "https://app.metricevo.com/api/v1/hooks/mevh_..."
- The address itself is the credential. Send no API key; treat the address like a password.
- The request body is ignored. The call can only start the audit drawn after it.
- The answer is
202with therunId. If an audit of the site is already waiting or running, the answer is409 run_in_progresswith that audit’srunId. - The account’s limits apply: 20 audits per hour, one at a time per site.
Leaked or lost? Press New incoming address on the automation. The old address stops working at once.
The outgoing webhook
When the audit has finished, Metricevo sends one POST with a JSON body to your address:
{
"id": "evt_01JCA4...",
"type": "audit_run.finished",
"createdAt": "2026-11-16T10:00:05.000Z",
"automationId": "aut_01JC9Z...",
"run": {
"id": "run_01JCA4...",
"siteId": "site_01JC9Z...",
"requestedUrl": "https://www.example.com/",
"status": "succeeded",
"errorCode": null,
"finishedAt": "2026-11-16T10:00:04.000Z",
"summary": [{ "area": "security", "pass": 9, "fail": 3, "noData": 0, "notTested": 1 }]
},
"totals": { "fail": 5, "pass": 31 },
"links": {
"report": "https://app.metricevo.com/app/audits/run?id=run_01JCA4...",
"run": "/api/v1/audit-runs/run_01JCA4...",
"observations": "/api/v1/audit-runs/run_01JCA4.../observations"
}
}
The body carries the counts and the links. For every check, read links.observations with an API key.
Your address must be public and use https. Private and internal addresses are refused, and redirects are not followed. Answer with any 2xx within 10 seconds. A delivery is tried once; a failure is listed under Activity on the automation.
Verify the signature
Each delivery has a Metricevo-Signature header: t=<unix seconds>,v1=<hex>. The v1 value is the HMAC-SHA256 of t, a dot and the raw request body, keyed with the automation’s signing secret (under Connection details).
import { createHmac, timingSafeEqual } from "node:crypto";
export function verify(secret, header, rawBody) {
const t = header.match(/t=(\d+)/)?.[1];
const v1 = header.match(/v1=([0-9a-f]+)/)?.[1];
if (!t || !v1 || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = createHmac("sha256", secret).update(`${t}.${rawBody}`).digest("hex");
return v1.length === expected.length && timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}
Check the signature before you trust a delivery, and reject old timestamps as above.
Turn off, change, remove
- Turned on switches an automation off without losing it. An incoming call then gets
409 automation_disabled, and nothing is sent. - Changing the canvas and saving keeps the incoming address and the signing secret.
- Delete removes the automation and its activity. Its incoming address stops working.
Over the API
Everything above is in the API: an automation is a graph of nodes and edges.
curl -X POST "$METRICEVO_API/automations" \
-H "Authorization: Bearer $METRICEVO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Audit after deploy",
"graph": {
"nodes": [
{ "id": "trigger", "type": "trigger.webhook" },
{ "id": "audit", "type": "action.run_audit", "config": { "siteId": "'"$SITE_ID"'" } },
{ "id": "send", "type": "action.send_webhook", "config": { "url": "https://example.com/hooks/metricevo" } }
],
"edges": [
{ "from": "trigger", "to": "audit" },
{ "from": "audit", "to": "send" }
]
}
}'
The answer carries hookUrl (once) and signingSecret. Reading needs audits:read, changing needs audits:write. Reference: Automations.