{"product_id":"handle-http-429-rate-limits-in-n8n-retry-after-logic","title":"Handle HTTP 429 Rate Limits in n8n: Retry-After Logic","description":"\u003ch3\u003eStop HTTP 429 failures in n8n—auto-wait and retry using the server’s “Retry-After” header\u003c\/h3\u003e\n\u003cp\u003eThis credential-free n8n workflow demonstrates a reliable strategy to handle HTTP 429 rate limits by reading \u003cstrong\u003eRetry-After\u003c\/strong\u003e, waiting the required time, and retrying the request until success (or a max-attempt limit). Perfect for n8n users and automation engineers who want predictable rate-limit behavior.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRuns from a \u003cstrong\u003emanual trigger\u003c\/strong\u003e to execute a self-contained retry loop demo.\u003c\/li\u003e\n  \u003cli\u003eBuilds a demo job payload containing retry settings such as \u003cstrong\u003emaxAttempts\u003c\/strong\u003e, backoff controls (e.g., base\/max seconds), and a \u003cstrong\u003esafeToRetry\u003c\/strong\u003e flag, while preserving request context across attempts.\u003c\/li\u003e\n  \u003cli\u003eSimulates an API behavior: the first attempt returns \u003cstrong\u003eHTTP 429\u003c\/strong\u003e with a `Retry-After` header; the second attempt returns \u003cstrong\u003eHTTP 200\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eApplies a retry policy that interprets \u003cstrong\u003eRetry-After\u003c\/strong\u003e as either \u003cstrong\u003eseconds\u003c\/strong\u003e or an \u003cstrong\u003eHTTP date\u003c\/strong\u003e, then falls back to \u003cstrong\u003ebounded exponential backoff with jitter\u003c\/strong\u003e when needed.\u003c\/li\u003e\n  \u003cli\u003eDecides whether to retry, stop, review, or defer—based on the attempt count and retry rules.\u003c\/li\u003e\n  \u003cli\u003eWhen retrying, calculates the provider interval, uses a \u003cstrong\u003eWait\u003c\/strong\u003e node to pause, increments the attempt counter, and reruns the simulated request.\u003c\/li\u003e\n  \u003cli\u003eValidates the expected outcome: \u003cstrong\u003etwo attempts\u003c\/strong\u003e, a \u003cstrong\u003eminimum two-second gap\u003c\/strong\u003e, and the original job ID—then outputs a \u003cstrong\u003ePASS\u003c\/strong\u003e result.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eRate-limited calls to third-party REST APIs that return \u003cstrong\u003eHTTP 429\u003c\/strong\u003e with \u003cstrong\u003eRetry-After\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eSaaS operators needing safer automation that respects provider throttling policies.\u003c\/li\u003e\n  \u003cli\u003en8n workflow builders adapting the demo to a real \u003cstrong\u003eHTTP Request\u003c\/strong\u003e step while keeping the same request context across retries.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eNodes\/logic used: \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003ewait\u003c\/strong\u003e, \u003cstrong\u003esticky note\u003c\/strong\u003e, and \u003cstrong\u003emanual trigger\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eRetry controls you can adjust in the initial payload: \u003cstrong\u003emaxAttempts\u003c\/strong\u003e, \u003cstrong\u003ebaseSeconds\u003c\/strong\u003e, \u003cstrong\u003emaxInlineSeconds\u003c\/strong\u003e, and \u003cstrong\u003esafeToRetry\u003c\/strong\u003e.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eTip:\u003c\/strong\u003e To use this pattern in production, replace the simulated response step with an \u003cstrong\u003eHTTP Request\u003c\/strong\u003e that returns status codes and headers (including \u003cstrong\u003eRetry-After\u003c\/strong\u003e), while preserving the original request context across retries.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46190237909171,"sku":"N8N-20626","price":48.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/kx4ps8fKbbN7ZdBdAjbGX_0aMXNGF2.png?v=1791450927","url":"https:\/\/buyflowscripts.com\/products\/handle-http-429-rate-limits-in-n8n-retry-after-logic","provider":"N8N Commerce","version":"1.0","type":"link"}