n8n+DiffHook

n8n webhook trigger — powered by DiffHook

Stop polling pages and APIs from inside n8n. DiffHook watches the target for you, detects the exact diff, and fires a signed webhook into an n8n Webhook node the moment anything changes.

n8n's HTTP Request node is perfect for one-shot calls, but it's an awkward tool for "only run when this page changes". Schedule + HTTP Request + If node gets you there, but the workflow runs 1,440 times a day just to catch one edit, and every empty run costs execution minutes. DiffHook flips the flow: you register what to watch once, and n8n only wakes up when the page actually moves.

n8n

The complete n8n + DiffHook hub

See every n8n recipe, template, and pricing tier in one place.

Workflow

Wire DiffHook into n8n in 5 steps

Every step is a single action — no Code node, no Function node, no cron to babysit.

01

Add a Webhook node in n8n

Create a new n8n workflow, drop in the Webhook trigger node, set the method to POST, and copy the production URL. Leave authentication set to HMAC — DiffHook signs every delivery.

02

Create a DiffHook monitor

POST to /v1/monitors with the URL you want to watch, a CSS selector or JSON path, and a check interval. DiffHook handles fetch, cache, and diff — n8n never touches the source.

03

Attach the n8n webhook as a delivery

In the monitor payload, add a delivery of type webhook pointing at the n8n URL from step 1. DiffHook retries on 5xx, stores every delivery, and lets you replay any of them from the dashboard.

04

Verify the HMAC signature inside n8n

Add a Crypto node after the Webhook node, compute HMAC-SHA256 over the raw body using your DiffHook signing secret, and compare it to the X-DiffHook-Signature header. Reject anything that doesn't match.

05

Branch on the change payload

Use an IF node to route the diff — old vs new value, or the extracted selector text. From here it's normal n8n: post to Slack, create a Jira issue, update Airtable, or whatever the workflow needs.

API example

One POST creates the monitor and the n8n trigger

No SDK, no polling service, no cron job. The same request works from curl, from n8n's HTTP Request node, or from your own backend.

POST /v1/monitors
POST https://api.diffhook.com/v1/monitors
Authorization: Bearer $DIFFHOOK_API_KEY
Content-Type: application/json

{
  "type": "html_css",
  "url": "https://target.example.com/pricing",
  "css_selector": ".price-plan",
  "interval_seconds": 300,
  "deliveries": [
    {
      "type": "webhook",
      "url": "https://n8n.yourdomain.com/webhook/diffhook-pricing"
    }
  ]
}

Importable workflow

Start from a ready-made n8n workflow

Grab the JSON template from GitHub, import it into n8n with one click, paste your DiffHook key and signing secret, and you have a working diff-to-n8n pipeline in under a minute.

FAQ

n8n webhook — common questions

Why use DiffHook instead of the n8n HTTP Request + Schedule trigger?
Because Schedule + HTTP Request runs whether anything changed or not. On a 1-minute interval that's 1,440 executions a day against your n8n instance just to catch the rare edit. DiffHook does the polling on its side and only calls n8n when the value moved, so the workflow's execution count matches the number of real changes — not the number of checks.
How does DiffHook sign the webhook?
Every POST to your n8n webhook node carries an X-DiffHook-Signature header containing an HMAC-SHA256 of the raw request body, keyed with the signing secret shown in your DiffHook dashboard. In n8n, use the Crypto node to recompute the signature over $binary.data.data and compare — reject on mismatch before any downstream node runs.
What does the payload look like?
A flat JSON object with monitor_id, event ("change"), url, selector, previous_value, current_value, detected_at, and a delivery_id you can dedupe on. For JSON API monitors you also get json_path. Full schema is in the DiffHook docs, and the n8n template in GitHub maps each field to a typed item.
Can I retry or replay a delivery from n8n?
Yes — every delivery is logged in the DiffHook dashboard with the status code n8n returned. If n8n was down, you can replay the delivery with one click; DiffHook also retries 5xx responses automatically (exponential backoff, up to 24 hours) so transient outages don't lose changes.
Does this work with n8n self-hosted?
Yes. The only requirement is that your n8n webhook URL is reachable from the public internet (a Cloudflare Tunnel, Tailscale Funnel, or a standard public host all work). DiffHook never touches your n8n host directly — it just POSTs to the webhook URL you paste into the monitor.

Related workflows

Also great with DiffHook

Retire that "Schedule + HTTP Request" workflow

Free for 3 monitors, HMAC-signed on every plan, full REST API. Your n8n workflow only runs when it has to.