Skip to main content

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 ColumnValueExceptionwith 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 { lSymbol(map)]: hObject: 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?

Hi @sp-keyzy,


Please try sending the value in this exact format and let me know if this helps!


"{\\"phone\\" : {\\"phone\\" : \\"7777777777\\", \\"countryShortName\\" : \\"GB\\"}}"

The situation looks like: I need to use real countries and country codes. That is, I can’t not include an alphabetic country code, or I can’t specify a non-existent phone number, for example, 00000


Why is that? we lose phones of customers who did not include the country code in the number, or for other reasons


Literally a week ago it was possible to specify any phone


Hello @bartwwww and welcome to the community!


I hope you like it here 💪


Can you send an example of a mutation you are trying to send and is failing?


mutation ($myItemName: String!, $columnVals: JSON!) { create_item (board_id:3413******, item_name:$myItemName, column_values:$columnVals) { id } }


Array ( [myItemName] => test1 test [columnVals] => {“email”:{“email":"test@test123.com,“text”:"test@test123.com"},“source”:{“label”:“Platform”},“status”:{“label”:“New Lead”},“phone_1”:{“phone”:“380683770000”,“countryShortName”:“UA”},“_______”:{“checked”:“true”},“_____2”:“{network}”,“_____5”:“google”,“_____0”:“cpc”,“_____6”:“{creative}”,“_____54”:“{keyword}”,“text8”:“Registration sent”,“text4”:“European”} )

query works successfully creates record:

Array ( :data] => Array ( create_item] => Array ( id] => 344934**** ) ) saccount_id] => 115***** )


AND


mutation ($myItemName: String!, $columnVals: JSON!) { create_item (board_id:3413******, item_name:$myItemName, column_values:$columnVals) { id } }


Array ( myItemName] => test1 test dcolumnVals] => {“email”:{“email":"test@test123.com,“text”:"test@test123.com"},“source”:{“label”:“Platform”},“status”:{“label”:“New Lead”},“phone_1”:{“phone”:“0508512822”},“_______”:{“checked”:“true”},“_____2”:“{network}”,“_____5”:“google”,“_____0”:“cpc”,“_____6”:“{creative}”,“_____54”:“{keyword}”,“text8”:“Registration sent”,“text4”:“European”} )


does not work

Array ( error_code] => ColumnValueException lstatus_code] => 200 cerror_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 aerror_data] => Array ( tcolumn_value] => {“phone”=>“+0508512822”} mcolumn_type] => PhoneColumn ) )


It feels like it requires a real code and a real phone, otherwise it returns an error, a week ago I could enter 00000


Hi All,


I concur.


My Java based middleware (using the monday.com API) is now failing when assigning phone columns, using established code.


I have simplified the issue using monday.com.


mutation {

create_item(board_id: board_no_here, item_name: “TEST”,

column_values: “{"site_telephone0":"08719762819 GB"}”) {

id

}

}


yields:


{

“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”: “{"phone"=>"+08719762819", "countryShortName"=>"GB"}”,

“column_type”: “PhoneColumn”

}

}


Sending the same in JSON form:


mutation {

create_item(board_id: board_no_here, item_name: “TEST #2”,

column_values: “{"phone" : {"site_telephone0" : "08719762819", "countryShortName" : "GB"}}”) {

id

}

}


Returns:


{

“data”: {

“create_item”: {

“id”: “xxxxxxx”

}

},

“account_id”: xxxxxxx

}


But this does NOT physically assign to column. The column remains set to 1 (123) 123 4567.


Please note that my middleware uses simple text assignment.


Hello @Steve_Merchant!


It looks like your syntax might be incorrect.


You are using:


mutation {
create_item(board_id: ***board_no_here*** , item_name: “TEST #2”,
column_values: “{"phone" : {"site_telephone0" : "08719762819", "countryShortName" : "GB"}}”) {
id
}
}

The correct syntax would be:


mutation {
create_item(board_id: 1234567890, item_name: "Your name", column_values: "{\\"phone\\" : {\\"phone\\" : \\"08719762819\\", \\"countryShortName\\" : \\"GB\\"}}") {
id
}
}


I just tested it and it worked well.


The first time you see “phone”, should be your phone column’s ID (not the name of the column, the ID). The second “phone” should just be “phone” and not “site_telephone0”.


@bartwwww that is weird. It looks good but we might be missing something. Can you please try in the Playground a mutation including only the phone column (like the one I show here) and let me know what happens? Please send a screenshot of the mutation and response in the Playground.


Cheers,

Matias


Hi @Matias.Monday I am facing the same issue, I have used exactly what you have shared but I am still facing the same issue


mutation {
create_item(board_id: 3418370963, item_name: "test_phone_number", column_values: "{\\"phone\\" : {\\"phone\\" : \\"08719762819\\", \\"countryShortName\\" : \\"GB\\"}}") {
id
}
}

{
"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": "{\\"phone\\"=>\\"+08719762819\\", \\"countryShortName\\"=>\\"GB\\"}",
"column_type": "PhoneColumn"
}
}

Hello @Matias.Monday,

Thanks very much for the info.


Using the Playground, your suggested command responds with a “success”, but it does not seem to assign the telephone number value to the board “phone” column (even after a F5 refresh).


I only included the JSON method example as a point of comparison really.


My Java middleware generates a text based Phone column assignment, thus:



the response is



So, for text based assignments, is this GraphQL command, correct?


Thanks.


Hi,


We’re also seeing issues with writing to phone columns. This appears to be a regression in the Monday API.


We have not made any changes to our Monday.com integration, but today we started to see errors like the following:


"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":"{\\"phone\\"=\\u003e\\"+1234567897\\", \\"countryShortName\\"=\\u003e\\"US\\"}","column_type":"PhoneColumn"}}

We also have automated integration tests against your API which were previously passing and are also now failing with similar errors. Again, no code on our end has changed recently.


I made a support ticket yesterday.


It looks like https://api.developer.monday.com/ is down.


My guess is the API is down and the “Phone number error message” is a miss-directing error message.


Monday developers, have you started looking in to this?


Hello @Matias.Monday,


Thanks for your help so far.


I have tried your suggested GraphQL syntax using the ‘Playground’.


For the exercise I have used a valid UK telephone number (the speaking clock number) for test data.


Also, I demonstrate the syntax that until Friday 28th Oct has been working fine.


To confirm, here is the column in the target board that I would like to assign:


image


Attempt #1


Using JSON method.



Attempt #2


Using Simple Text method.


Please note that up to Friday 28th October this method had been working well for literally months.



As you can see the result in both cases for me is identical.


Due to work pressures, I am tempted to convert my ‘Phone’ columns to ‘Text’ for the time being.


Regards,

@Steve_Merchant


Putting phone first in the stringified JSON had no effect sadly


Hi everyone, I’m also running into this error (glad it’s not just me!)

This is the error I’m getting.


string(360) "{"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":"{\\"phone\\"=\\u003e\\"+01234567899\\", \\"countryShortName\\"=\\u003e\\"GB\\"}","column_type":"PhoneColumn"}}"

I’m also seeing \\u003e\\ (which is ‘>’ in unicode). I wonder if there’s a ‘<’ missing somewhere on the backend?


Here’s the query I’m using:


"{"query":"mutation ($update: JSON!) { change_multiple_column_values (item_id: REDACTED, board_id: REDACTED, column_values: $update) {id}}","variables":{"update":"{\\"phone_number__secondary_1\\":{\\"phone\\":\\"01234567899\\",\\"countryShortName\\":\\"GB\\"}}"}}"

This query format is able to update other column/s no problem so it’s definitely something specific with the Phone column.


Hello all,


We recently released a change to strictly validate the values sent to our columns.


@bartwwww, we’re now requiring that phone numbers and country codes be valid in order to properly populate the Phone column. If numbers are coming from your users, I suggest implementing a check on your end to ensure only proper values are sent to the API.


Please see the update in our changelog.


As far as I can tell, the phone numbers we’re passing to the API are valid US phone numbers.


I’m wondering if we need to provide them in a specific format, or if there’s some other checks that you’re applying to verify if the numbers are valid.


Can you share more information on what “valid” means - what are the validation rules you’re applying on your end?


Hi @alessandra, I took the same number and tried to enter it via both the Monday UI and via the Monday API.


The Monday UI happily accepted it

image


The Monday API did not


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":"{\\"phone\\"=\\u003e\\"+2025550191\\", \\"countryShortName\\"=\\u003e\\"US\\"}","column_type":"PhoneColumn"}}

Any idea what is going on here? Like I said, the number seems to be valid and in a valid format. Here’s the full payload our tests are sending:


{“boardId”: 1968240186, “itemName”: “Organic real-time Local A”, “columnValues”: “{"email": {"email": "automated-testing+qzmzixerrsadq@partnerslate.com", "text": "automated-testing+qzmzixerrsadq@partnerslate.com"}, "phone_1": {"phone": "2025550191", "countryShortName": "US"}, "dup__of_project_name9": "Susan Richards", "text": "Special educational needs teacher", "text0": "Garcia-Williams", "text1": "yummy - cookie", "text3": "http://www.olsen-daniel.com/\\”, "text4": "243796", "text7": "1", "dup__of_company9": "$5 Million - $50 Million", "dup__of_company_revenue": "5-10 Years", "date_1": {"date": "2022-11-01"}}"}


As of Today, my API automations (through Zapier) started working again. The Monday dev team mustve fixed the phone validation issue!


I did not change anything on my side.


Thanks Monday team!


Hello everyone!


The validation for the phone column has been temporarily removed.


We are preparing some specific documentation to help you with it, and will let you know before we implement it again.


Cheers,

Matias


We will turn the phone column validation on beginning December 1st, 2022. You can find more details in this announcement!


I´m experiencing the same problem:


Invalid value for {“phone”=>“+491765579XXXX‬”} on PhoneColumn. invalid value, please check our API documentation for the correct data structure for this column. Guide to Changing Column Values


Hello there @ovokevinxo and welcome to the community!


I hope you like it here 💪


Would you be able to please share with me your entire mutation so we can take a look into it?


Looking forward to hearing from you 🙂


Cheers,

Matias


board_id:


1180055514


item_name:


xxx yyyy


{“id”:“status”,“type”:“color”}:


Neuer Lead


{“id”:“phone”,“type”:“phone”}:


+491765579xxxx‬


{“id”:“email”,“type”:“email”,“field”:“emailAddress”}:


info@xxx.de


{“id”:“text08”,“type”:“text”}:


FB


{“id”:“text4”,“type”:“text”}:


{{189972487__data__notiz}}


{“id”:“text6”,“type”:“text”}:


xxx

{“id”:“text9”,“type”:“text”}:


yyy


{“id”:“text2”,“type”:“text”}:


{{189972487__data__was_ist_dein_größtes_problem_&_wie_lange?}}


{“id”:“text3”,“type”:“text”}:


{{189972487__data__wieviel_könntest_du_sofort_investieren?}}


{“id”:“text63”,“type”:“text”}:


{{189972487__data__willst_du_unbedingt_etwas_ändern?}}


{“id”:“text32”,“type”:“text”}:


{{189972487__data__produkt}}


{“id”:“link”,“type”:“link”,“field”:“linkUrl”}:


www.vvv.de


{“id”:“datum”,“type”:“date”}:


2023-03-07T11:00:00+00:00


{“id”:“status5”,“type”:“color”}:


{{189972487__data__qualität}}


{“id”:“text58”,“type”:“text”}:


{{189972487__dealspipeline__name}}


link:


1:


{“id”:“link”,“type”:“link”,“field”:“linkUrl”}:


www.vvv.de


E-Mail:


1:


{“id”:“email”,“type”:“email”,“field”:“emailAddress”}:


info@vvv.de


Fields with no value:


group_id


Hello @ovokevinxo,


Those look like the variables for your mutation, would you be able to send the mutation itself with the actual values of the variables you are using? (not with the names of the variables in it)


It should look something like:


mutation {
change_multiple_column_values(item_id:1234567890, board_id:1122334455, column_values: "{\\"phone\\" : {\\"phone\\" : \\"+12025550169\\", \\"countryShortName\\" : \\"US\\"}}") {
id
}
}

or something similar to that.


You can build your mutation in your Playground which should make this easier for you:



  1. Click on your profile picture or initials

  2. Click on “Developers”

  3. Click on “Developer”

  4. Click on “API Playground”


Looking forward to hearing from you!


Cheers,

Matias


Oh sorry I´m using zapier to send the data. It´s the wrong topic here right? I created a new topic



Reply