Hi Theo,
Thanks for reaching out. I am Harry, from the Google Ads Scripts Team and allow me to assist you in this. I would assume that the undefined error is caused by the spreadsheetData[i][2] variable not having or containing any value; thus, the toLowerCase method would not be able to proceed. Kindly try to debug this code block and check if it is correctly retrieving the values from your spreadsheet. You may simply add a logger statement "Logger.log(keyword)" after your keyword variable to check its value. Please see Logger output for more information.
If you would need further assistance, kindly provide the script name and your CID and also a shareable link or a copy of the spreadsheet file so that I could check this on our end. You may send them here or privately via the reply to author option. If this option is not available at your end, you may send the requested information through our email (googleadsscr...@google.com) instead.
Thanks,
|
||||||