// The following method will be invoked whenever Ultradox executes the script
function execute(mode1) {
var sheet = SpreadsheetApp.openById('1U8rRo87vzEG3yDYD6-TAB-3n9-Rlunza1TgYnBUyRyc').getSheetByName('Pagare-Entries');
//Change the sheet Id and name as appropriate
var lastRow = sheet.getLastRow();
var response = UrlFetchApp.fetch('http://www.ultradox.com/run/6VbYGN7gDDOf4MvFcAT2808ricy8bW?chunk='+lastRow);}
I am running the above script on a MYSCRIPT block and I am getting the following error:
The script Published script failed with error: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1
The script is designed to grab the last row of an google sheet...
The script triggers another Ultradox which has the blocks for the Google Sheet...but the Script does not pick up the lastRow...it generates a blank document.
So the ?chunk='+lastRow parameter for the UrlFetch is not working properly.