Issue that didn't pass github AI

Bug Description
This also maybe a feature request
When you use OpenAI node with an API from other service, in case of RPM / TPM limit the entire flow fails, despite the fact it ran parts of the runs.
It should:
Continue the processes already ran and drop the failed ones.
Or maybe in case of RPM/TPM to wait time.
To be able to set a ratelimit from the n8n module.
And I don’t know if it’s possible, process the Gmail one by one be not async.
To Reproduce
Run the process.
My Gmail trigger has 48 records.
Expected behavior
Continue the processes already ran and drop the failed ones.
Or maybe in case of RPM/TPM to wait time.
To be able to set a ratelimit from the n8n module.
Debug Info
The error is:
From OpenAI
Error code
429
Full message
{ “error”: { “message”: “LiteLLM Rate Limit Handler for rate limit type = key. Crossed TPM / RPM / Max Parallel Request Limit. current rpm: 10, rpm limit: 50, current tpm: 0, tpm limit: 100000, current max_parallel_requests: 10, max_parallel_requests: 10”, “type”: “None”, “param”: “None”, “code”: “429” } }
The ETL of N8N is:
{
“name”: “Mail to SMS copy”,
“nodes”: [
{
“parameters”: {
“pollTimes”: {
“item”: [
{
“mode”: “everyMinute”
}
]
},
“simple”: false,
“filters”: {},
“options”: {}
},
“id”: “79b617fe-e8b6-4f8c-a000-d3d8d9a33017”,
“name”: “Gmail Trigger”,
“type”: “n8n-nodes-base.gmailTrigger”,
“position”: [
3712,
1600
],
“typeVersion”: 1.2,
“credentials”: {
“gmailOAuth2”: {
“id”: “qIeInz1rGh5ikFUt”,
“name”: “Gmail account”
}
}
},
{
“parameters”: {
“topic”: {
“__rl”: true,
“value”: “arn:aws:sns:us-east-1:811041629820:Test”,
“mode”: “list”,
“cachedResultName”: “Test”,
“cachedResultUrl”: “https://us-east-1.console.aws.amazon.com/sns/v3/home?region=us-east-1#/topic/arn:aws:sns:us-east-1:811041629820:Test
},
“subject”: “={{ $(‘Gmail Trigger’).item.json.from.value[0].name }}”,
“message”: “={{ $json.output[0].content[0].text }}”
},
“type”: “n8n-nodes-base.awsSns”,
“typeVersion”: 1,
“position”: [
4512,
1600
],
“id”: “b618c03e-3175-4e70-91a4-0449cf016c40”,
“name”: “AWS SNS”,
“credentials”: {
“aws”: {
“id”: “U9SocnvuO8w3m6Qx”,
“name”: “AWS (IAM) account”
}
}
},
{
“parameters”: {
“modelId”: {
“__rl”: true,
“value”: “deepseek-v3.2-exp”,
“mode”: “list”,
“cachedResultName”: “DEEPSEEK-V3.2-EXP”
},
“responses”: {
“values”: [
{
“role”: “system”,
“content”: “=You are an intelligent assistant. Your scope is to help in processing, ordering and alerting for important emails.”
},
{
“content”: “=Read the incoming emails content and sender and provide a summary (maximum 150 characters). {{ $(‘Gmail Trigger’).item.json.from.value }} {{ $(‘Gmail Trigger’).item.json.subject }} {{ $(‘Gmail Trigger’).item.json.html }}”
}
]
},
“builtInTools”: {},
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 2.1,
“position”: [
4160,
1600
],
“id”: “5a4def6b-6a49-40be-ab13-dd467b282128”,
“name”: “Message a model”,
“credentials”: {
“openAiApi”: {
“id”: “KsZDBDuGQRB3hAQ7”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“operation”: “addLabels”,
“messageId”: “={{ $json.id }}”,
“labelIds”: [
“Label_120”
]
},
“type”: “n8n-nodes-base.gmail”,
“typeVersion”: 2.2,
“position”: [
3936,
1600
],
“id”: “3fdcf627-e878-42bc-b5b4-087411f2f680”,
“name”: “Add label to message”,
“webhookId”: “79d134f0-5091-459e-99f1-a9861019f7a1”,
“credentials”: {
“gmailOAuth2”: {
“id”: “qIeInz1rGh5ikFUt”,
“name”: “Gmail account”
}
}
}
],
“pinData”: {},
“connections”: {
“Gmail Trigger”: {
“main”: [
[
{
“node”: “Add label to message”,
“type”: “main”,
“index”: 0
}
]
]
},
“Message a model”: {
“main”: [
[
{
“node”: “AWS SNS”,
“type”: “main”,
“index”: 0
}
]
]
},
“Add label to message”: {
“main”: [
[
{
“node”: “Message a model”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“active”: true,
“settings”: {
“executionOrder”: “v1”,
“timeSavedMode”: “fixed”,
“callerPolicy”: “workflowsFromSameOwner”,
“availableInMCP”: false
},
“versionId”: “e3e450c7-d4b3-413c-ae3b-27609dbaaece”,
“meta”: {
“templateId”: “6287”,
“templateCredsSetupCompleted”: true,
“instanceId”: “e9e76b137a0e9e80cec8ce0c82d362e8d24cb571f072f004626fce0383c7f25b”
},
“id”: “eCwaLWS8ivDFXubZ”,
“tags”:
}
Operating System
Docker n8nio/n8n
n8n Version
2.0.3
Node.js Version
1.3.2
Database
SQLite (default)
Execution mode
queue
Hosting
self hosted

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Looks like you’re hitting OpenAI’s rate limits. You could try adding a `Delay` node after your OpenAI node to slow down the flow and avoid hitting those limits. Make sure the delay time is longer than OpenAI’s recommended interval. Let me know if this works!

1 Like