n8n Webhook Circuit Breaker for External APIs with Redis
n8n Webhook Circuit Breaker for External APIs with Redis
Regular price
£49.99
Regular price
£49.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Webhook Circuit Breaker for External APIs with Redis
Regular price
£49.99
Regular price
£49.99
Sale price
Unit price
/
per
Protect your external APIs with a Redis-backed circuit breaker (n8n Webhook)
This n8n automation workflow exposes a webhook-based circuit breaker that routes requests only to approved external APIs, monitors failures in Redis, and temporarily blocks calls when error thresholds are exceeded—optionally alerting you via a Slack-compatible webhook.
What this workflow does
- Receives a POST webhook containing a service name, plus the target path, method, and payload.
- Validates inputs by checking the service against a configured allowlist, then builds the target URL. Unknown services or unsafe paths are rejected with 404.
-
Checks circuit state in Redis to decide whether to:
- Allow the call
- Immediately reject with 503 and a Retry-After header
- Move into a half-open state after the cool-down
- Half-open probing: in half-open, it claims a single probe slot in Redis so only one request tests recovery; others receive 503.
-
Calls the external API with a configured timeout and classifies failures as:
- Network/timeout errors
- HTTP 5xx
- HTTP 408
- Updates Redis + responds: on success, it returns the upstream response (and closes the circuit if it was a probe). On failure, it increments a Redis failure counter, opens the circuit when the threshold is reached, optionally sends an alert via an HTTP webhook, and returns a 502 describing the failure and circuit status.
Use cases
- Reduce outages by preventing repeated calls to failing third-party services.
- Enforce allowlisted routing for external API access via a single n8n webhook.
- Protect SaaS reliability with automated backoff and Slack-style incident alerts.
Technical details
- Nodes/logic: webhook, redis, if, set, code, and sticky note.
- Requires Redis credentials on every Redis step and a reachable Redis instance from n8n.
- Supports optional alerting through a Slack-compatible HTTP webhook.
