const spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
const sheet = spreadsheet.getSheetByName('GAS');
const lastRow = sheet.getLastRow();
const lastColumn = sheet.getLastColumn();
for (let i = lastRow; i > 1; i--) {
const rowValues = sheet.getRange(i, 1, 1, lastColumn).getValues()[0];
// Create a message to send to ChatWork.
const message = `[info][title]this is task today; [/title]
${rowValues.join(", ")}
[/info]`;
// Send the message to ChatWork.
const client = ChatWorkClient.factory({token: "0c0219265533e71d160bda27ec3f"});
client.sendMessage({room_id: "room_Id", body: message});
}
}
is that if there are 3 rows of data in column B, it will send a message 3 times to chatwork consecutively.