I'm currently experimenting with using the IFTTT Maker Channel to generate a new text file in my Dropbox through Google Apps script. By connecting "value1" and "value2" to the content of the file, I attempted to implement the following code snippet (with the api key omitted).
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 seems to be activated, but the values are not being recognized correctly. Although the message "Congratulations! You've fired the Test_Event event" is displayed without any apparent errors, the resulting file is empty.
What am I missing here? How can I resolve this issue?