Hello team,
I have this very basic structure:
mutation createSubItem($parent_item_id: ID!, $item_name: String!, $columnValues: JSON) {create_subitem ( parent_item_id: $parent_item_id, item_name: $item_name, column_values: $columnValues) { id }}
with the following variables:
{"parent_item_id":<CORRECT_PARENT_ITEM_ID>,
"item_name":"Item name string",
"columnValues":
"{\"status\": \"Requested\" , \"people__1\" : {\"personsAndTeams\":[{\"id\":5344389,\"kind\":\"person\"}]}}"
}
If I take out the PEOPLE’s section of my column_values, everything works, except for obviously no people’s assignment is happening. However, running the above code, I get the following error:
{
"error_message": "invalid value - unable to assign person with id: <PERSON'S ID>. Please check our API documentation for the correct data structure for this column. https://developer.monday.com/api-reference/docs/change-column-values",
"error_code": "ColumnValueException",
"error_data": {
"column_value": "{\"personsAndTeams\"=>[{\"id\"=><PERSON'S ID>, \"kind\"=>\"person\"}]}",
"column_type": "MultiplePersonColumn"
},
"status_code": 200,
"account_id": <MY_ACCOUNT_ID>
}
I tried passing as an array of persons as well as just as a stand alone object,
Please help
Update 1.0:
While I wasn’t getting anywhere with my original problem and I needed a solution quickly, I have implemented a patchy-workaround. Really ugly way of achieving my goal, but at least it works for now:
One pretty obvious approach is to temporarily set some other column value of same item (Box# in my example), like a text field to a predetermined value, say some arbitrary number 55.
And then, the workaround would be implemented via board automation:
This worked, but I don’t like this approach, obviously.
What am I doing wrong with my original API / graphql?