App Script and Data

Hi All, I am trying to recall a data item in the App Script. Here is what I have:

 

var timeZone = Session.getScriptTimeZone();
var Data = {
Id: Id
}
const payload = JSON.stringify({ text: "Site Manager - DMS Services - Please Re-Synchronise - TEST POST - "+ Data + " "+Utilities.formatDate(new Date(), timeZone, "dd-MM-yyyy | HH:mm:ss")});
 
Domearian_0-1710835259966.png

What do I need to set in the Data variable to read the parameter [Id]?

Solved Solved
1 2 426
1 ACCEPTED SOLUTION

I did actually manage to resolve the issue. To recall the data this is what is required:

function sendMessage(ID,DATEI){
 
The data needs to be called within the function call. Then the data can be fed into the const:
const payload = JSON.stringify({ text: "Site Manager - DMS Services - Please Re-Synchronise - "+ (ID) + " - "+(DATEI)+"

View solution in original post

2 REPLIES 2
Top Labels in this Space