A complete list of column types?

I don’t understand how to know what column types to pass. I would think it would be this list:

But doesn’t seem to always be the case? There are vars for a create_item mutation:

  let vars = {
    "myItemName": name,
    "columnVals": JSON.stringify({
      "website": { "url": website, "text" : website},
      "deal_stage" : {"label" : stage},
      "date_added5" : {"date" : today},
      "description" : {"text" : description},
      "connect_boards" : {"item_ids" : [founderID]},
      "deal_owner" : {"personsAndTeams" : [ {"id" : dealOwner, "kind" : "person"} ]  }

I only was able to figure out that “website” (a link type) should be passed “url” from asking on this forum. Now I face the same issue with “description”, which is a text field.

Here is the error:

{"error_code":"ColumnValueException","status_code":200,"error_message":"invalid value, please check our API documentation for the correct data structure for this column. https://developer.monday.com/api-reference/docs/change-column-values","error_data":{"column_value":"{\"text\"=\u003e\"The best!\"}","column_type":"TextColumn"}}

If not “text” then what should I be passing?

If description is just a text (not long text) column. Text, Numbers, and Name are simple strings, not a change object.

"description": description

For text column, you can look at the “update the text column” and JSON subsection here: Text to see an example. You’ll want to remove the \ of course - and those strings have been put through JSON.stringify() already so you need to keep that in mind.

1 Like

Thanks Cody! That worked of course. Really appreciate the help. But geez, I wish this protocol was more consistent. It’s been quite the uphill battle just to get going!

I guess if anyone from Monday is paying attention. You really need to
(1) create more complete examples. I.e. Post an example of creating an item with one of each type of column.
(2) Make your protocol consistent! If a long_text type requires {“text” : “Hello!”}, then at least allow text to also take {“text” : “Hello”}. And perhaps the other way around as well. If text can use a simple form of columnId : “Hello” , then allow long_text, label, date also to take this simple form.

What I think monday needs is documented types for each change like the following typescript. I use Zod so I can check things are valid before using them.

type LongTextValueChange = {
 url: string;
 text: string;

type StatusValueChange = 
| {
 label: string;
| {
 index: number; //a validator would check for actual valid indexes, 
                //since its a sparse range between 0 and 200

Here is another one to look at:

mutation {
  change_simple_column_value (item_id:9876543210, board_id:1234567890, column_id:"dropdown", value: "1,2") {
mutation {
  change_simple_column_value (item_id:9876543210, board_id:1234567890, column_id:"dropdown", value: "Cookie, Cupcake") {

in this case its a Dropdown column, and you can pass either indexes or labels as a comma separated list (but not both). In text, long_text, status (what you’re calling a label column, is a status column, its just they have templates like label, priority, etc. that are configured differently but all are status columns) you just pass the string. But only one column at a time, and not all types.

1 Like