Hey there, I am developing a connection between some Service and Monday.com.
I am using mutation - create_item to create a new item.
my ‘column_values’ is a JSON format through the use of json.dumps()
columns[‘’] is a dictionary where the value is the Column Id and the key is the payload from the Service
On Line 65, I am trying to trying to set the field as someone based off their UserId and it is not working. What is wrong with the Syntax?
When I run this, I do not get an Error, just get a normal GraphQl response but no updates on the board
Note* I do have other fields below line 65 and they are either Text/Date which is showing up on the board as expected. This suggests there’s a Syntax Error
Here is the JS style object that your column values should be, before going through JSON.dumps() (sorry I am not a python guy, I hope you can interpret).
I see…
Thanks! It works now. Was trying the personsAndTeams Type as well but I realized I wrapped the entire array as a String so that cause it to not work.
On the side note… Would you happen to know why you don’t have to specify a type and some you do?
on line 99 you have to specify the type or it will throw an error. I’ve tried 4 with and without quotes and it and still an error. Only when the type is specified does it work.
However, i’m finding that you do not need to include the type for some of them. When do you need types and don’t need them?
That I don’t know a pattern to. It is annoying at times, but it is all documented somewhat:
Creating an item can support a mix of objects and strings for the column values. There are three change column methods: simple, multiple, and one thats just change_column. multiple and change_column use JSON, simple uses strings. Oddly, the create_item allows both strings and objects (all of which must be turned to JSON). No consistency at all.
certain column types support simple changes, other support both and some only support with objects. Its all by column type. See the column types reference to look at the example mutations if it shows a simple version it will take a string, if it shows JSON only you need to use an object that matches what they show serialized in the examples.
The lack of actual schemas for anything drives me nuts. I can look at the example mutations and figure it out but there isn’t a schema for any of the objects, so I can’t validate them when building them (officially at least).