{"product_id":"n8n-circuit-breaker-webhook-for-data-table-api-protection","title":"n8n Circuit Breaker Webhook for Data Table API Protection","description":"\u003ch3\u003ePrevent repeated API failures in n8n with a circuit breaker webhook + Data Table state\u003c\/h3\u003e\n\u003cp\u003eThis \u003cstrong\u003en8n Circuit Breaker Webhook\u003c\/strong\u003e stops your workflows from hammering an unavailable downstream API. It tracks failures in an n8n \u003cstrong\u003eData Table\u003c\/strong\u003e, opens a “circuit” after consecutive errors, enforces a cooldown, and only allows a controlled \u003cstrong\u003ehalf-open\u003c\/strong\u003e recovery attempt.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eChecks permission to call\u003c\/strong\u003e: When your calling service sends a \u003cstrong\u003ePOST\u003c\/strong\u003e to \u003ccode\u003e\/webhook\/circuit-breaker-check\u003c\/code\u003e with a \u003ccode\u003eservice_key\u003c\/code\u003e, the workflow determines whether the downstream call should proceed.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEvaluates circuit state\u003c\/strong\u003e: It looks up the service’s circuit record in the \u003cstrong\u003e\u003ccode\u003eservice_circuits\u003c\/code\u003e\u003c\/strong\u003e Data Table and uses the current state plus a cooldown window to decide: allow, block, or initiate a half-open trial.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eHalf-open trial handling\u003c\/strong\u003e: When entering half-open, the workflow creates\/updates the circuit record and responds with \u003ccode\u003eallow_request\u003c\/code\u003e, the current \u003ccode\u003estate\u003c\/code\u003e, and \u003ccode\u003eretry_after_seconds\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRecords outcomes\u003c\/strong\u003e: After an allowed call, your service posts to \u003ccode\u003e\/webhook\/circuit-breaker-result\u003c\/code\u003e with \u003ccode\u003eservice_key\u003c\/code\u003e, \u003ccode\u003esuccess\u003c\/code\u003e, and optional \u003ccode\u003eerror\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCloses or opens the circuit\u003c\/strong\u003e: On success it closes the circuit. On repeated failures (or half-open failure), it increments failure count, opens the circuit, and sets an \u003ccode\u003eopen_until\u003c\/code\u003e time.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eShield n8n automations from outages in a \u003cem\u003eData Table API\u003c\/em\u003e or any downstream endpoint.\u003c\/li\u003e\n  \u003cli\u003eReduce workflow churn when a third-party service is intermittently failing.\u003c\/li\u003e\n  \u003cli\u003eImplement a reliable retry strategy with cooldown and half-open recovery trials.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWebhook endpoints\u003c\/strong\u003e: \u003ccode\u003e\/webhook\/circuit-breaker-check\u003c\/code\u003e and \u003ccode\u003e\/webhook\/circuit-breaker-result\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStorage\u003c\/strong\u003e: n8n \u003cstrong\u003eData Table\u003c\/strong\u003e named \u003cstrong\u003e\u003ccode\u003eservice_circuits\u003c\/code\u003e\u003c\/strong\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNodes used\u003c\/strong\u003e: \u003cstrong\u003eWebhook\u003c\/strong\u003e, \u003cstrong\u003eData Table\u003c\/strong\u003e, \u003cstrong\u003eCode\u003c\/strong\u003e, \u003cstrong\u003eSwitch\u003c\/strong\u003e, and \u003cstrong\u003eSticky Note\u003c\/strong\u003e\n\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup\u003c\/strong\u003e: Create the \u003cstrong\u003eservice_circuits\u003c\/strong\u003e Data Table with the template columns (including \u003ccode\u003eservice_key\u003c\/code\u003e, \u003ccode\u003estate\u003c\/code\u003e, \u003ccode\u003efailure_count\u003c\/code\u003e, \u003ccode\u003efailure_threshold\u003c\/code\u003e, and timestamp fields). Then copy both webhook URLs and configure your caller to use the two endpoints.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45950068785331,"sku":"N8N-19163","price":59.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/VuBlJF9BM9QJqxMVnU5a1_erJuxTg0.png?v=1788513186","url":"https:\/\/buyflowscripts.com\/products\/n8n-circuit-breaker-webhook-for-data-table-api-protection","provider":"N8N Commerce","version":"1.0","type":"link"}