Google Sheets: ETIMEDOUT when appending data

Hello,

I’m trying to save data from the Facebook API in Google Sheets, but when I insert the data into the spreadsheet, the insertion is extremely slow, and the ETIMEDOUT error appears.

I increased the number of execution attempts in cases of error, but it is still very slow and giving this error.

Does anyone have a solution for this problem?

Information on your n8n setup

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

Hi @altemberg, welcome to the community :tada:

I am sorry to hear you are having trouble. The ETIMEDOUT (Operation timed out) error could suggest a network problem.

From looking at your screenshot it seems you’re calling the Google Sheets node (and thus the respective API) 72 times in total. Are you doing so in quick succession? If so, some throttling logic on Google’s end might have kicked in here.

So in a first step, I’d try adding a short Wait between each of the requests and also configure the Google Sheets node to retry a request if it his an error. This can be done like so:

image

1 Like

Hi @MutedJam

I have a wait after the Google Sheets node, should there be before too?

I even increased the number of attempts, but the error persists.

Here is a screenshot of my flow:

I think the position of the Wait node is fine (it shouldn’t really matter whether you wait before the first request or not, seeing the problems occurs towards the end of the loop).

Does the input data sent to your Google Sheets node perhaps change in any significant way on the failing loop run compared to previous successful loop executions? Perhaps because you use expressions in your credentials or something?

And does the behaviour change if you increase the Wait time?

In some moments the flow works normally, but in others it hangs a lot in the Google Sheets node.

I’ve tried increasing the wait time and that didn’t work either. At some point it ends up crashing everything.

I did some tests with other apps like Airtable and they worked fine, but I would really like to resolve the Google Sheets issue due to using Datastudio.

Exponential backoff should be usefull to avoid troubles with google Sheets and other external APIs with throotling that blocks you when you retry.

Nice feature for the error handler in de On-prem and Cloud Version.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.