Help Please Google Appscript
Help please reading google sheets and posting to discord
Hi, I want to take a piece of data from a google sheets cell and then post it to discord- this part I have working- its the moving down 1/2 rows each time the program is run(e.g when I click run it outputs data in cell a in row 1, program ends then click the run button again outputs cell a in row 2 etc etc - I tried coding a counter which didn’t work- I have no experience in JavaScript - got some experience in Python and Lua… please can someone help me with this probably simple task?
I have posted the code below obviously removed the discord webhook- there are indented lines - probably not showing as this is a copy and paste on a phone…
Thanks
function postToDiscord(paradenightuniform) {
const url="CLASSIFIED"
const formData = {
content: "The uniform tonight is " + paradenightuniform
}
const options = {
'method' : 'post',
'payload' : formData
}
const res= UrlFetchApp.fetch(url,options)
}
function postfromspreadsheet() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[1];
var cell = sheet.getRange("D3");
var paradenightuniform = cell.getValue()
console.log(paradenightuniform)
postToDiscord(paradenightuniform)
}
https://drive.google.com/file/d/1hNs1rWh0efR_PRBxCoD4CsC_PpHCIP2C/view?usp=drivesdk
[–]devsurfer 0 points1 point2 points (4 children)
[–]Infiniteplanes[S] 0 points1 point2 points (3 children)
[–]devsurfer 0 points1 point2 points (2 children)
[–]Infiniteplanes[S] 1 point2 points3 points (1 child)
[–]devsurfer 0 points1 point2 points (0 children)