Block 1 - README
- Type / Role
- n8n-nodes-base.stickyNote - stickyNote
- Config choices
- Version 1
Webhook Rate Limiter (Ainoflow Guard) Stop webhook flooding before it starts. Add production grade rate limiting to any n8n webhook in minutes reject abusive traffic before expensive workflow logic...
n8n-nodes-base.stickynote, n8n-nodes-base.webhook, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.httprequest, n8n-nodes-base.if, n8n-nodes-base.respondtowebhook
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Dmitrij Zykovic.
Original n8n.io sourceStop webhook flooding before it starts. Add production-grade rate limiting to any n8n webhook in minutes - reject abusive traffic before expensive workflow logic executes.
Webhook receives POST request
Identity extracted from headers:
x-api-key) β per-client limitingX-Forwarded-For / x-real-ip) β per-IP limitingPOST /api/v1/guard/{route:identity}/counterAllowed β your business logic executes β 200 OK
Denied β immediate 429 Too Many Requests + Retry-After header
Client β Webhook β Identity β Guard β Allowed? β Business Logic β 200 OK
β NO
429 + Retry-After
That's it. One credential, one API.
GuardCheck nodeConfig node with your limits:| Variable | Default | Description |
|---|---|---|
rate_limit |
30 |
Max requests per window |
window_sec |
60 |
Window in seconds |
identity_mode |
ip |
ip or apiKey |
route_name |
webhook |
Endpoint name |
BusinessLogic node with your workflowAccess original request:
const body = $('Webhook').first().json.body;
const headers = $('Webhook').first().json.headers;
Bash (Linux/macOS):
for i in {1..50}; do
curl -s -o /dev/null -w "%{http_code}\n" \
-X POST https://your-n8n.com/webhook/rate-limited-endpoint \
-H "Content-Type: application/json" \
-d '{"test": true}'
done
PowerShell (Windows):
1..50 | ForEach-Object {
(Invoke-WebRequest -Uri "https://your-n8n.com/webhook/rate-limited-endpoint" -Method POST -Body '{"test":true}' -ContentType "application/json" -UseBasicParsing).StatusCode
}
Expected: First 30 β 200, remaining β 429
curl -H "X-Forwarded-For: 1.2.3.4, 5.6.7.8" \
-X POST https://your-n8n.com/webhook/rate-limited-endpoint
Identity key should use 1.2.3.4 (first IP from chain).
{
"ok": true,
"data": { "message": "Request processed successfully" }
}
Headers: Retry-After: 17
{
"ok": false,
"error": "rate_limited",
"retryAfter": 17
}
| Section | Nodes | Description |
|---|---|---|
| Rate Limit Check | Webhook β Config β BuildIdentity β GuardCheck β IfAllowed | Extract identity, check Guard |
| Allowed Path | BusinessLogic β RespondOk | Your logic + 200 response |
| Denied Path | BuildDeniedResponse β RespondRateLimited | 429 + Retry-After |
Total: 9 nodes. Minimal by design.
Guard handles application-level rate decisions, not network security.
Best for public webhooks where clients don't have API keys.
X-Forwarded-For: 1.2.3.4, 5.6.7.8 β identity = "1.2.3.4"
x-real-ip: 10.0.0.1 β identity = "10.0.0.1"
β οΈ IP addresses can be shared (NAT, mobile carriers, offices).
Best for authenticated endpoints with per-client keys.
x-api-key: client_abc123 β identity = "client_abc123"
Falls back to IP if header is missing.
| Use Case | rate_limit | window_sec | Result |
|---|---|---|---|
| Burst protection | 30 | 60 | 30/min |
| API rate limiting | 100 | 3600 | 100/hour |
| LLM cost protection | 10 | 60 | 10/min |
| Daily limit | 1000 | 86400 | 1000/day |
Use different route_name values to create separate rate limits:
Config A: route_name = "orders" β key = "orders:1.2.3.4"
Config B: route_name = "payments" β key = "payments:1.2.3.4"
Each route has independent counters.
Default: Fail-open - Guard API uses failOpen=true, so Guard outage doesn't block traffic.
To switch to fail-closed: change failOpen query parameter to false in GuardCheck node.
Getting duplicate webhook deliveries? Add Ainoflow Shield before your business logic - one trigger, one execution, guaranteed. Guard + Shield = rate limiting + deduplication on the same endpoint.
allowPolicyOverwrite=true is set for easy demo/testing - Config node values always apply. Production: set to false in GuardCheck query params to lock policy and prevent hidden config driftWant to add temporary bans, cost protection mode, multi-tier rate limiting, or per-client usage dashboards?
Ainova Systems - We build custom AI automation infrastructure and safety layers for production workflows.
Tags: webhook, rate-limiting, security, guard, burst-protection, api-protection, ainoflow, production, webhook-security, cost-control
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Protect public webhooks with Ainoflow Guard rate limiting |
|---|---|
| Complexity | advanced |
| Nodes | 17 |
| Categories | SecOps |
| Author | Dmitrij Zykovic |
| Published | 18 Feb 2026 |
Use the JSON export at /data/workflows/13491/13491.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
Webhook Rate Limiter (Ainoflow Guard) Stop webhook flooding before it starts. Add production grade rate limiting to any n8n webhook in minutes reject abusive traffic before expensive workflow logic...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your SecOps use case.