Hi,
I’m receiving a ton of issues creating an item with column_values. I’ve gotten both the HTTP 500 error, parse errors on the column_id and parse errors on “{” and etc.
Can someone kindly help with this, here’s the rough code:
function createItem(){
var column = JSON.stringify({numbers:'88'});
var mutation = 'mutation{create_item(board_id:my_board_id, group_id:my_group_id, item_name:testingname, column_values:{numbers: 88}) {id} }';
var mutation1 = 'mutation{create_item(board_id:my_board_id, group_id:my_group_id, item_name:testingname, column_values:'+column+') {id} }';
var response = UrlFetchApp.fetch("https://api.monday.com/v2", {
method: 'post',
headers: {
'Content-Type': 'application/json',
'Authorization': apiKey
},
payload: JSON.stringify({
'query': mutation1
}),
muteHttpExceptions: true
})
Logger.log(JSON.stringify({'query': mutation}))
var json = response.getContentText()
var returndata = JSON.parse(json)
Logger.log(returndata)
}
Using mutation1 returns me “Parse error on “numbers” (STRING) at [1, 103]”
While using mutation returns me “Internal server error”
And “numbers” is the id for the column within the board that I would like to change as an example. The create_item works fine without the column_value input.