I am trying to use IFTTT Maker Channel to create a new text file in my dropbox, using Google Apps script. I mapped the "value1" and "value2" to the body of the file. Here is my sample code, without my api key.
function sendFileToMaker(){
var makerKey = 'app_key';
var eventName = 'Test_Event';
var url = 'https://maker.ifttt.com/trigger/' + eventName + '/with/key/' + makerKey;
var payload = {
"value1" : "test",
"value2" : "testFile"
};
var options = {
"method" : "POST",
"contentType": "json",
"payload":payload,
};
Logger.log(UrlFetchApp.fetch(url,options));
};
The trigger runs, but the values do not seem to be recognized. I get "Congratulations! You've fired the Test_Event event", so it seem as if I did not get an error, but the file it creates is empty.
What am I doing worng? How do I fix it?