Monday API - Change People Column

Hi All,

I’m trying to use the API to do an update in a People column, according to the documentation I’m using change_multiple_column_values (People), the response is OK without errors but I’m not seeing the updates in the board.

This is the request I’m using:
mutation {
change_multiple_column_values(item_id:1825344611, board_id:1315570528, column_values: “{“csm” : {“personsAndTeams”:[{“id”:13991717,“kind”:“person”}]}}”) {
id
}
}


I also try with this approach but the same OK result without any update in the board:
mutation {
change_simple_column_value(board_id: 1315570528, item_id: 1825344611, column_id: “csm”, value: “13991717”) {
id
}
}

hi @difer300

It depends how you enter this query (though your own app or by the API playground). What I think is missing is the escaping in the column_values. The string start with your first " (right after the : ) and ends directly after the first {. Therefore your query is not valid. You need to escape the " character inside your column_values string with a \ backslash.

JSON.strigify (JS) will do that for you is you are building this query from your own app. Does that make sense?

Also: keep in mind that when you want to assign a person to a column that person needs to be subscribed to the board.

1 Like

Hi @basdebruin,

I don’t get it I’m using the API playground and the same structure of the documentation. Can you explain again maybe with an example that works in the API playground?

Thank you!!

hi @difer300

This one works in the API playground, you need to escape the " characters inside the string.

mutation {
  change_multiple_column_values(item_id: 1825344611, board_id: 1315570528, column_values: "{\"csm\":{\"personsAndTeams\":[{\"id\":13991717,\"kind\":\"person\"}]}}") {
    id
  }
}

1 Like

Thank you @basdebruin!! It’s working fine now :slight_smile:

1 Like

@difer300

I’m so glad @basdebruin was able to help out here :slight_smile: He’s amazing!!

Thank you for helping with the example of JSON escaping too, @basdebruin :slight_smile:

-Alex

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.