Google sheet issue - The service is receiving too many requests from you! Perhaps take a break?

Hi!

Describe the issue/error/question

Stops on the error, although only 30-50 rows in the table.

What is the best way to fix the situation?
Thank you very much!

What is the error message (if any)?

ERROR: The service is receiving too many requests from you! Perhaps take a break?

Quota exceeded for quota metric ‘Read requests’ and limit ‘Read requests per minute per user’ of service ‘sheets.googleapis.com’ for consumer ‘project_number:50320’.

Please share the workflow

Share the output returned by the last node

{"message":"429 - {\"error\":{\"code\":429,\"message\":\"Quota exceeded for quota metric 'Read requests' and limit 'Read requests per minute per user' of service 'sheets.googleapis.com' for consumer 'project_number:509253320'.\",\"status\":\"RESOURCE_EXHAUSTED\",\"details\":[{\"@type\":\"type.googleapis.com/google.rpc.ErrorInfo\",\"reason\":\"RATE_LIMIT_EXCEEDED\",\"domain\":\"googleapis.com\",\"metadata\":{\"quota_limit\":\"ReadRequestsPerMinutePerUser\",\"service\":\"sheets.googleapis.com\",\"quota_location\":\"global\",\"quota_metric\":\"sheets.googleapis.com/read_requests\",\"quota_limit_value\":\"60\",\"consumer\":\"projects/509253320\"}},{\"@type\":\"type.googleapis.com/google.rpc.Help\",\"links\":[{\"description\":\"Request a higher quota limit.\",\"url\":\"https://cloud.google.com/docs/quota#requesting_higher_quota\"}]}]}}","name":"Error","stack":"Error: Request failed with status code 429\n    at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15)\n    at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12)\n    at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11)\n    at IncomingMessage.emit (node:events:525:35)\n    at endReadableNT (node:internal/streams/readable:1358:12)\n    at processTicksAndRejections (node:internal/process/task_queues:83:21)"}

Information on your n8n setup

  • n8n version: 0.188.0
  • Database you’re using (default: SQLite): SQLite
  • Running n8n with the execution process [own(default), main]:
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: Docker

Hi @Mikhail, my suggestion would be to add a Wait node into your loop. This node allows you to easily throttle the requests sent to Google Sheets.

2 Likes

Hi @MutedJam !

Thank you so much for such a quick response!

How much of a delay is better? Would 2 seconds be okay?

1 Like

So the exact delay depends on your total usage of the Google Sheets API. The exact limits are documented here. 2 seconds sounds like a good starting point, but you might need to experiment a bit to find the ideal value.

1 Like

Okay, got it - I’ll try it and then I’ll report the results!

1 Like

Hi @MutedJam !
A few days of testing showed no errors in work.
Most likely, the problem is solved!

1 Like

Can you share how your flow turned out? I’m having the same problem and putting the Wait before didn’t work.

Hey @Daniel_Ferreira,

The Wait node trick would only work if you are using split in batches to process your records. Can you share your workflow so we can take a look?

Hi @Daniel_Ferreira !

@Jon if I have a dataset of 100 records and would like to write them to a gsheet, does the n8n gsheet node execute 100 calls to gsheets API or one call?

Hey @Boris_Idesman,

That would possibly depend on the operation you are using and the node version, The Update / AppendOrUpdate operation uses the batch api option on Google Sheets so I would expect it to maybe be 3 API calls.

1 Like

@Jon the operation is Append or Update and the data mode is Auto-Map Input Data to Columns
The workflow even uses SplitInBatches operator and Wait operator (I attach a screenshot with the number of items)

Hey @Boris_Idesman,

Append or Update looks like it will use the batch endpoint although it is possible there is an issue there. Assuming the v2 node does the wait help it looks like it probably would.

Hey @Jon ,
It definitely uses more API calls then anticipated from the google sheets endpoint.
Do you have some hints, what can be to debug it?
And, what do you need by v2 node?

Hey @Boris_Idesman,

We updated the Google Sheets node recently, Can you share your workflow that will tell me if you are using the v1 or v2 node… Looking at the node code again there is actually 3 versions.

I suspect there could be some cases where it would trigger more than one call, If you wanted to dig into it you could run n8n from source and output some text on each connection. It could also be worth seeing what happens if you tell the node to only run once as that option looks like it should take all the input items in one hit.

I take it you are seeing the same error message and are on the latest n8n release?

Looking at the configuration, all nodes types seem to be v3.
How can I run a node only once (without the node executing multiple API calls in the background)?

Hello,

I still get the error, on the node (see above), that actually should clear the sheet:

ERROR: The service is receiving too many requests from you! Perhaps take a break?
Quota exceeded for quota metric ‘Write requests’ and limit ‘Write requests per minute per user’ of service ‘sheets.googleapis.com’ for consumer 'project_number:1122

Hey @Boris_Idesman,

I thought the code nodes were there to mock the data you would be working with. It looks like the issue though is going to specifically be on the clear because it is running 65 times, What I would do is run the clear as the first step so first clear your sheet then run the 2 code nodes so something like the below.

Hello @Jon you are right - that resolved the issue.
Thank you.

1 Like