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 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.
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
}
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.