Google Sheets nodes - 503 error

Describe the problem/error/question

I have a set of 4 workflows that I regularly duplicate for each new customer we have.

Today I have duplicated them again, but one workflow (below) errors with a 503 whenever it does anything with Google Sheets. Even the first node - which just clears a sheet - throws a 503 error.

I did get it to clear a sheet once, but it has errored since.

What could be going wrong?

My other workflows using the same shared Google credentials are working fine. They have Google Sheets nodes too.

I’m using n8n cloud. Upgrading the instance to the latest version didn’t help.

What is the error message (if any)?

ERROR: Service unavailable - try again later or consider setting this node to retry automatically (in the node settings)
503 - {“error”:{“code”:503,“message”:“The service is currently unavailable.”,“status”:“UNAVAILABLE”}} - The service is currently unavailable.

NodeApiError: Service unavailable - try again later or consider setting this node to retry automatically (in the node settings)
    at Object.apiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Sheet/v2/transport/index.js:49:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at GoogleSheet.getData (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Sheet/v2/helpers/GoogleSheet.js:40:26)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Sheet/v2/actions/sheet/clear.operation.js:178:30)
    at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Sheet/v2/actions/router.js:67:23)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Sheet/v2/GoogleSheetsV2.node.js:21:16)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:706:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:656:53
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:1058:20

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.27.2
  • Database (default: SQLite): n/a - n8n cloud
  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a? - n8n cloud
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: n/a - n8n cloud

@ChrisTrunk , the error indicates an issue on Google side. Bad timing I presume. Try again.

Thanks. It’s still failing 12 hours later and other workflows with the same node are successful. Is there a way past this?

To try and debug this further, I set up a second copy of the workflow using the older style Google Sheets nodes and a brand new sheet.

The workflow succeeds some of the time, but mostly fails:

How can I / n8n debug this?

Here’s the workflow with the older style nodes:

Hey @ChrisTrunk,

The 503 will he coming back from Google, I would try setting the retry options in the node to see if that helps but it could be that you are hitting api limits for Google Sheets.

Have you tried using a smaller dataset then having a wait node for 10 seconds or a minute then processing the next batch?

Hi Jon, it would make sense to try that, but I’ve used this workflow for a long time with much larger datasets and it’s never timed out at Google Sheets, it times out at the postgres query first.

In this case, the dataset is actually quite small and it often fails at the “clear Google sheet” node.

I’m puzzled by the inconsistency of the behaviour:

I’ve also tried creating a brand new Google Sheet and authenticating with a different user (who also owns the Sheet) but there’s no difference.

For some reason Google Sheets doesn’t like receiving commands from n8n, but I have no information to debug why.

Hey @ChrisTrunk,

I have checked the workflows that run some of our course stuff which uses Google Sheets and they appear to be ok so I would say generally there isn’t an issue with n8n talking to Google Sheets.

The workflow not having issues all the time would suggest rate limiting or similar though. I would recommend the smaller dataset approach or add the retry to see if that helps as I suspect it will make a bit of a difference.