I’m trying to use AppSheet API with an Appscript. Unfortunately nothing changes in table “Orders”.
Table Order
ID | Trigger |
---|---|
fff111 |
What wrong with my function?
const appId = "b8168b11-xxxxxx-xxxxxxxxx"; const appToken = "V2-DTXsD-8xxxxxxx-xxxxx-xxxx-xxxxx"; const tableName = "Orders"; function doPost() { var payload = { "Action": "Edit", "Properties": { "Locale": "en-US", "Location": "47.623098, -122.330184", "Timezone": "Pacific Standard Time" }, "Rows": [ { "_RowNumber": "2", "ID": "fff123", "Trigger": "TRUE" } ] }; var options = { "method": "post", "contentType": "application/json", "muteHttpExceptions": true, "payload" : JSON.stringify(payload) }; UrlFetchApp.fetch("https://api.appsheet.com/api/v2/apps/"+appId+"/tables/"+tableName+"/Action?applicationAccessKey="+appToken, options); }