Skip to content
AI Agents

OpenAI 429 Classifier: Rate Limit vs Quota Exhaustion with Batch Halt Decision

8 nodes 81 8 Manual trigger
Download

Loading workflow…

Workflow Description

Analyzes a JSON OpenAI error log and classifies each record as quota_exhausted, rate_limit, other_error or invalid_record using status, message, code and type. It computes per-category counts and ratios, then an IF node issues halt_batch when any quota error exists or the rate-limit ratio exceeds the configured threshold, otherwise continue, always with a reason. It makes no external calls and performs no retries; quota record IDs are listed for account action.

How it works

  1. 1.Run Manual Trigger
  2. 2.Code node emits six fictional error records
  3. 3.Classify each record, compute counts, ratios and decision reason
  4. 4.IF checks should_halt
  5. 5.Set adds decision halt_batch or continue and retry_performed=false
  6. 6.Merge branches and output one decision item

Use cases

  • Stop OpenAI batches when credits run out
  • Distinguish temporary rate limits from billing issues
  • List records needing account action

Requirements

  • Error log with request_id, status, message, code or type
  • Set RATE_LIMIT_HALT_RATIO in the classify node
  • No credentials needed

Setup and testing in n8n

  1. Import the JSON into n8n
  2. Execute and confirm halt_batch with two reasons
  3. Remove quota records and one rate-limit record to see continue
  4. Keep the empty record to verify invalid_record

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

Manual Trigger Code If Set Merge No Op

Details

Trigger Manual trigger
Nodes 8
Apps 6
Views 81
Downloads 8

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (8)

Manual Trigger

Manual Trigger

#1

Build Sample Error Log

Code

#2

Classify And Summarize Errors

Code

#3

Halt Needed?

If

#4

Set Halt Batch Decision

Set

#5

Set Continue Decision

Set

#6

Merge Decisions

Merge

#7

Batch Decision Output

No Op

#8

Note Stages

Sticky Note

#9

Note Setup

Sticky Note

#10
Stay in the loop

Fresh workflows, straight to your inbox

Get newly published DROPIDEA workflows, a clear overview of what they do, and a link to explore them.

  • New workflows
  • Clear overviews
  • Setup guides

Be first to discover what is new

Your name, your email, and one confirmation.

Email confirmation · Unsubscribe anytime