0

Here is the script:

var sheet_id = "1wA0nalVyJ7ilv2pwS0kIWDoXudlPCTVZvEDPgIYviy4";
var sheet_name = "Start_ESP"

function doGet(e) {
  var ss = SpreadsheetApp.openById(sheet_id);
  var sheet = ss.getSheetByName(sheet_name);
  var date = Number(e.parameter.date);
  var sensor = Number(e.parameter.sensor);

  sheet.appendRow([sensor, date]);
}

An error occurs on startup:

TypeError: Cannot read properties of undefined (reading 'parameter') doGet @ Код.gs:9

I'm new to this, how can I fix this?

adiga
  • 34,372
  • 9
  • 61
  • 83
  • Please check [How can I test a trigger function in GAS?](https://stackoverflow.com/questions/16089041) and [Google Sheets- TypeError: Cannot read properties of undefined (reading 'source')?](https://stackoverflow.com/questions/74821383) and Linked questions of these questions – adiga Dec 26 '22 at 15:10
  • 1
    Do you have any additional lines of code? I am asking because the error message says the problem is in line 9 but according to the code you posted the line 9 should be a blank space. What is the specific line of code that the error makes reference to? – Fernando Lara Dec 26 '22 at 17:54

0 Answers0