I have tried to code in google script editor and i am not able to what is the issue is the query
the code is pasted below.
function makeAPICall(key, query) {
var url = “api.monday.com/v2”;
var options = {
“method” : “post”,
“headers” : {“Authorization” : key,},
“payload” : JSON.stringify({“query” : query}),
“contentType” : “application/json”
};
//Logger.log(options);
var response = UrlFetchApp.fetch(url,options);
Logger.log("API results: " + response.getContentText());
//return response;
}
function getValueMonday(){
var mondayAPIkey = “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”;
var boardID = 457712781;
var query = “mutation{create_item(board_id:457712781, item_name:‘name’){id}}”;
var worked = makeAPICall(mondayAPIkey, query);
Logger.log("Pulse ID returned was " + worked);
}
The Error is:
API results: {“errors”:[{“message”:“No query string was present”}],“account_id”:3669886}