Describe the issue/error/question
I have a workflow running in n8n.cloud that receives a JSON object with data, we copy a Google sheets file from a template, extract the data from the JSON, insert it in the new Google sheet, then extract the modified data from Google sheets and finally make back 1 object as the response.
This works as expected in about 20 seconds if I make 1 request from Postman at a time. However, if I make more than 1 request at a time some work and some get errors. It is not a consistent result. I send 5 requests and get 1 error. I send 7 requests and get 5 errors. Etc.
What is the error message (if any)?
{
"message": "Workflow did error."
}
I am sure there are plenty of improvements to make to this workflow and happy to receive suggestions and help.
Please share the workflow
Workflow is too big to share here.
Share the output returned by the last node
What do you have to do to make this scale and work with many requests?
Information on your n8n setup
- Running version [email protected]
- Database you’re using (default: SQLite):
- Running n8n with the execution process [own(default), main]:
- Running n8n via [Docker, npm, n8n.cloud, desktop app]:
Maybe it is the Google Sheets API Quota limits set to 60 reads and 60 writes per minute per user. Requesting an increase to see.
Hey @markhanson,
It can possibly be the Google Sheets API limits, but I can’t say for sure. Are you saving the error executions? If yes, can you check the error executions and check which node results in the error? The error message will help us learn more about the issue.
I also see that you have a lot of similar steps that get repeated in the workflow. You can break them down into sub-workflows using the Execute Workflow node.
May you consider use wait node between requests, let me know if it’s possible in your case
According to google docs: Usage limits | Sheets API | Google Developers
You can make 500 requests/100 seconds/project and 100 req/100 sec/user
1 Like
Hi @harshil1712 ,
The error executions confirms it is Google Sheets API Quota:
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:498586711441’.
@Shirobachi Google Sheets API Quota limits set to 60 reads and 60 writes per minute per user. I have requested these to be increased, expected answer within 2 business days. I don’t want to wait, I want it to go faster.
Thanks for the help and yes there are probably plenty of ways to optimize the workflow.
1 Like
I mean if you run it like one time an hour or fewer you can try to add delay between every 60 reads or/and writes otherwise just wait for google answer