Hi,
I’m trying to use the monday API to update an item based on an update to a GitHub issue (i.e. if a label is added to a GitHub issue, add it to list of labels in its corresponding Monday item).
I’m getting a 200 from the call, but I’m not seeing the changes reflected in Monday.
The fetch call:
const targetBoardId = 111111;
const targetItemId = 22222;
const updateItemResp = await fetch('https://<enterprise_domain>.monday.com/v2', {
method: 'post',
headers: {
'Content-Type': 'application/json',
Authorization: shortLivedToken // This is all within an integration recipe, so grabbing auth from there
},
body: JSON.stringify({
query: 'mutation ($targetBoardId:Int!, $targetItemId:Int!, $newColumnValues:JSON!) { change_multiple_column_values(item_id: $targetItemId, board_id: $targetBoardId, column_values: $newColumnValues) { id } }',
variables: JSON.stringify({
targetBoardId,
targetItemId,
newColumnValues: JSON.stringify(columnValues),
}),
}),
}).then((res) => {
console.log(res);
return res;
})
.catch((err) => {
console.log(err);
});
For reference here is an example of what I’m passing as columnValues:
{
status: 'Open',
dropdown2: 'bug,duplicate,good first issue',
link: 'https://www.github.com/user/example-repo/issues/7 Test Issue #7',
date: null,
numbers: 7,
dropdown: 'Feature',
people_1: '1234567,1234568'
}
When I try the same mutation in the playground I’m able to successfully update and see the changes reflected in the Monday item, but not so through my Monday app. Any suggestions?
FYI I’m building my app following the example from this repo: welcome-apps/apps/github-node at master · mondaycom/welcome-apps · GitHub
Thanks!