I’ve had success in creating new items on the board that I want from my Google apps script, but where I run into trouble is in the column_value part. Can’t quite seem to track down where I’m going wrong.
function myNewItem(){
var baseURL = “https://api.monday.com/v2”
var mondayApiToken = “mondayToken”
var query = mutation newItem { create_item(board_id: 2942342848, group_id: "new_group85282", item_name: "test2", column_values: "{\\"edit_request\\" : \\"New text\\"}"){ id } }
var headers = {
“Authorization”: mondayApiToken,
“Content-Type”: “application/json”
}
var options = {
headers: headers,
method: "Post",
payload: JSON.stringify({
query: query
})
}
var response = UrlFetchApp.fetch(baseURL, options).getContentText()
var result = JSON.parse(response)
console.log(“result:”, result.data)
}