Fix: n8n OpenAI 429 rate limit error

    Your n8n workflow hammers the OpenAI API and gets rate-limited. Here's the SplitInBatches + Wait pattern that fixes it.

    Last updated 2026-06-08~4 min read
    n8nOpenAIAI AgentHTTP Request

    Symptoms — what you're seeing

    • Your n8n workflow fails with a 429 Too Many Requests error from the OpenAI API
    • The error message includes "Rate limit reached" or "You exceeded your current quota"
    • The workflow works fine with 1–5 items but fails when processing batches of 20+
    • Adding retry logic just delays the same error
    • The error appears intermittently — sometimes the same workflow succeeds, sometimes it fails

    Why this happens

    OpenAI enforces rate limits on two dimensions: requests per minute (RPM) and tokens per minute (TPM). When your n8n workflow processes multiple items through an OpenAI node (HTTP Request or the native OpenAI node), it fires all requests nearly simultaneously. Ten items hitting GPT-4 at the same instant can easily exceed the RPM limit on lower-tier API plans.

    There are two distinct 429 errors, and they have different fixes:

    • "Rate limit reached for [model] in organization" — you're sending too many requests too fast. Fix: add delays between requests.
    • "You exceeded your current quota" — your billing limit or prepaid credits are exhausted. Fix: add credits or increase your billing limit in the OpenAI dashboard.

    The fix, step by step

    Fix 1: Batch with SplitInBatches + Wait (most common)

    1. Add a SplitInBatches node before your OpenAI node. Set batch size to 3–5 items (start conservative — you can increase after testing).
    2. Add a Wait node after your OpenAI node, before the loop closes back to SplitInBatches. Set it to wait 2–5 seconds between batches. This gives the rate limit window time to reset.
    3. The workflow structure should be:
      [Data Source] → [SplitInBatches (size: 3)]
          → [OpenAI Node] → [Wait (3 seconds)]
          → [loop back to SplitInBatches]
      → [Rest of workflow]
    4. Test with your full dataset. If you still hit 429s, reduce the batch size to 1 and increase the wait to 5–10 seconds. The goal is to stay under your RPM limit.

    Fix 2: Enable retry on the OpenAI/HTTP Request node

    1. Open the OpenAI or HTTP Request node settings
    2. Under Options, enable "Retry On Fail"
    3. Set Max Retries to 3
    4. Set Wait Between Retries to 5000ms (5 seconds)
    5. This handles transient rate limits but doesn't prevent them — combine with batching for best results

    Fix 3: Quota exhaustion (different error)

    If the error says "You exceeded your current quota," the fix isn't in n8n — it's in your OpenAI account:

    • Go to platform.openai.com → Settings → Billing
    • Check if you have remaining credits (prepaid) or if you've hit your monthly spending limit
    • Add credits or increase the limit
    • If you recently created the API key, you might be on the free tier with very low limits — upgrading to a paid plan significantly increases your rate limits

    Common variations

    • "Works in test but fails in production" — your test dataset has 3 items, your production run has 200. Add SplitInBatches before it hits production.
    • "Only fails with GPT-4, works with GPT-3.5" — GPT-4 has stricter rate limits than GPT-3.5-turbo, especially on lower-tier plans. Either batch more aggressively for GPT-4 or switch to GPT-3.5-turbo for high-volume tasks.
    • "429 from Azure OpenAI, not standard OpenAI" — Azure has its own rate limits per deployment. Check your Azure deployment's TPM allocation in the Azure portal and increase it if possible.
    • "The LangChain/AI Agent node hits rate limits" — the AI Agent node can make multiple API calls per execution (tool calls, chain-of-thought). Set a lower concurrency on the parent workflow or use sub-workflows with rate limiting.

    When this isn't the issue

    • If you get a 401 Unauthorized, your API key is invalid or revoked — not a rate limit
    • If you get a 400 Bad Request, your prompt or parameters are malformed — check the request body
    • If the node times out without an error code, the issue is n8n's HTTP timeout, not OpenAI — increase the timeout in the node settings

    For the full pattern on handling external API rate limits in production n8n workflows, see the production reliability checklist.

    Browse 4,900+ ready-to-import workflow templates →

    Need this workflow customized or debugged? Book a 30-min scope call →

    Stuck configuring this workflow?

    I build and fix n8n workflows for agencies and SaaS teams. 30-minute scope call — bring the problem, leave with an estimate.

    Related pages

    Related workflows