tl:dr - I have a code that can work but want to make it better by pulling everything from column E into 1 message (including header)
I am trying to get the output of a singular column to post to Discord - Here I have the script creating a message in a blank column and looking at the next empty line
function postFromSpreadsheet(){
const ss = SpreadsheetApp.getActiveSpreadsheet()
const ws = ss.getSheetByName ("Responses")
const messageCell = ws.getRange(ws.getMaxRows(),152).getNextDataCell(SpreadsheetApp.Direction.UP).offset(1,-147)
const currentMessage = messageCell.getValue()
if(currentMessage == "") return
postToDiscord(currentMessage)
messageCell.offset(0,147).setValue("posted")
I could do this but would need to loop it
Or
I am trying to take all the data from column 5 (E) and posting it as one message
I have the discord message posting current message and a if statement to stop once the column I am currently using says posted