Loss of messages between TTN and HTTP Google Sheet integration

Hello everyone,
I am using a setup where application data is sent from TTN via a HTTP integration to google sheets. I can’t remember what tutorial I used to set this up, but it was something along these lines.

Usually this setup works fine, but I have begun to notice that some messages are not transmitted properly (are lost). Would anyone know why? Could it be that the google sheets is script is being overwhelmed or something? And where should I look for the problem?

image
image

are you really transmitting data every second?
that would be not fit inside the fair use policy

1 Like

And apart from the abovementioned TTN Fair Access Policy (and EU868 regional legal duty cycle limitations), you’re probably also running into problems with Google Sheets:

  • Your Apps Script is not using any lock to prevent concurrent access from overwriting data.
  • Your Apps Script is not telling you about any errors.
  • Aside: your script is using SpreadsheetApp.openById which is not needed nowadays, when creating the script through menu Tools, Script editor in Google Sheets.

See another script as an example to handle that. That example will still not tell you about Google rate limiting, as when hitting that, Google returns 200 OK with a human-readable message, which is swallowed by the HTTP Integration. (Maybe Apps Script’s logging will tell you about that though.)

But above all: don’t send that often.