javascript - How to specify optional JSON body from app script to IFTTT Maker channel? -


i trying send ifttt request through maker channel , want send data (status). here's code using (in google app script):

function posttomaker(url, status) {    var payload = {      "status": status    };      var payloadjson = json.stringify(payload);      var options = {      'method': 'post',      'contenttype': 'json',      'payload': payloadjson    };      urlfetchapp.fetch(url, options);  }

the code triggers ifttt, variable "status" not sent data. sure there minor missing. appreciate advice.

your payload restricted keys of "value1", "value2" , "value3" only.

to trigger event make post or web request to:

https://maker.ifttt.com/trigger/{event}/with/key/f_lwzatmef6szm4pcohspsndfhd95dmq3wkhx_qheow.

with optional json body of:

{ "value1" : "", "value2" : "", "value3" : "" }

the data optional, , can pass value1, value2, , value3 query parameters or form variables. content passed on action in recipe.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -