Trying to programatically create subitems on a monday board with a phone number column. I’m formatting the phonenumber as per the API documentation but I’m getting ColumnValueException
with phone numbers
ClientError: GraphQL Error (Code: 200): {“response”:{“error_code”:“ColumnValueException”,“status_code”:200,“error_message”:“invalid value, please check our API documentation for the correct data structure for this column. https://api.developer.monday.com/docs/change-column-values",“error_data”:{“column_value”:"{"countryShortName"=>"GB", "phone"=>"+7777777777"}”,“column_type”:“PhoneColumn”},“status”:200,“headers”:{}},“request”:{“query”:“\n mutation {\n create_subitem (\n parent_item_id: 3441762528, \n item_name: "Test name",\n column_values: "{\"name\":\"Test name\",\"phone\":{\"countryShortName\":\"GB\",\"phone\":\"7777777777\"},\"email\":{\"text\":\"simon@keyzy.com\",\"email\":\"simon@keyzy.com\"},\"date\":{\"date\":\"2000-01-01\",\"time\":\"00:00:00\"},\"numbers\":1,\"numbers7\":0,\"status4\":{\"index\":0},\"dup__of_personal_details\":{\"index\":null},\"dup__of_dup__of_personal_details\":{\"index\":null},\"dup__of_dup__of_dup__of_personal_details\":{\"index\":0},\"dup__of_dup__of_dup__of_dup__of_dup__of_personal_details\":{\"index\":0},\"dup__of_dup__of_dup__of_dup__of_personal_details\":{\"index\":null},\"check\":{\"checked\":\"true\"},\"status5\":{\"index\":2},\"dup__of_right_to_uk\":{\"index\":1},\"dup__of_dup__of_right_to_uk\":{\"index\":1},\"dup__of_dup__of_dup__of_right_to_uk\":{\"index\":1}}"\n ) {\n id\n }\n }\n “}}
at /app/node_modules/graphql-request/src/index.ts:410:11
at step (/app/node_modules/graphql-request/dist/index.js:63:23)
at Object.next (/app/node_modules/graphql-request/dist/index.js:44:53)
at fulfilled (/app/node_modules/graphql-request/dist/index.js:35:58)
at processTicksAndRejections (node:internal/process/task_queues:95:5) {
response: {
error_code: ‘ColumnValueException’,
status_code: 200,
error_message: ‘invalid value, please check our API documentation for the correct data structure for this column. https://api.developer.monday.com/docs/change-column-values’,
error_data: {
column_value: '{“countryShortName”=>“GB”, “phone”=>”+7777777777”}‘,
column_type: ‘PhoneColumn’
},
status: 200,
headers: Headers { [Symbol(map)]: [Object: null prototype] }
},
request: {
query: ‘\n’ +
’ mutation {\n’ +
’ create_subitem (\n’ +
’ parent_item_id: 3441762528, \n’ +
’ item_name: “Test name”,\n’ +
’ column_values: “{\“name\”:\“Test name\”,\“phone\”:{\“countryShortName\”:\“GB\”,\“phone\”:\“7777777777\”},\“email\”:{\“text\”:\“simon@keyzy.com\”,\“email\”:\“simon@keyzy.com\”},\“date\”:{\“date\”:\“2000-01-01\”,\“time\”:\“00:00:00\”},\“numbers\”:1,\“numbers7\”:0,\“status4\”:{\“index\”:0},\“dup__of_personal_details\”:{\“index\”:null},\“dup__of_dup__of_personal_details\”:{\“index\”:null},\“dup__of_dup__of_dup__of_personal_details\”:{\“index\”:0},\“dup__of_dup__of_dup__of_dup__of_dup__of_personal_details\”:{\“index\”:0},\“dup__of_dup__of_dup__of_dup__of_personal_details\”:{\“index\”:null},\“check\”:{\“checked\”:\“true\”},\“status5\”:{\“index\”:2},\“dup__of_right_to_uk\”:{\“index\”:1},\“dup__of_dup__of_right_to_uk\”:{\“index\”:1},\“dup__of_dup__of_dup__of_right_to_uk\”:{\“index\”:1}}”\n’ +
’ ) {\n’ +
’ id\n’ +
’ }\n’ +
’ }\n’ +
’ ',
variables: undefined
}
}
If you notice, the request is sending the phonenumber WITHOUT the +
symbol, yet the API error shows the +
at the start of the string. What am I doing wrong here?