Hi there,
We are currently building an application which is able to create Boards, Groups, Items and SubItems via the API by importing third-party projects into monday.com (data formats which are currently not supported by the official importer).
Everything worked so far until we reached the SubItems. Attempting to create a SubItem via the create_subitem mutation results in a NoSubitemsColumnInThisBoard error telling that “There is no subitem column on this board, please add it first”.
Unfortunately creating SubItems is a key-feature for our use-case since we are importing data which is structured as multiple layers. Quick Example:
1.1 Collection of tasks
1.1.1 Main Task
1.1.1.1 Sub Task 1
1.1.1.1 Sub Task 2
We even tried to issue a create_column mutation with the undocumented type subtasks as observed in the UI which failed as well.
Is there any to create SubItems via the API without touching the Board in the UI? Thanks in advance!
I’ve just learned python, and basic programming just to learn your api, and now know more about GraphQL and discovered all of the logical ways of solving a very similar problem to the poster here are not supported.
There’s no way to setup a master template, pushing changes to boards created from it today.
So the natural next idea was to create the template and use the “move to board” option, this is not supported by the API yet.
Then I figured out how to simply create new the entire board change I needed, how to scale it to hundreds of boards ( which all have unique hard to find identity IDs ) and associate with the extremely obfuscated workspace association, and now I have a script capable of finally pushing all of this to all of these boards, and I run into this error.
‘There is no subitem column on this board, please add it first’
I need to be able to scale this platform and I’m not going to manually step into hundreds of our boards just to enable something that should be an option by default, please consider providing a workaround and forwarding this to your engineering team.
This response suggest to me that I need to change the argument type of “parent_item_id” to Int!, but when I do the whole function fails and the request is not sent.
In my API call headers, I added in version 2023-10 (based on this snippet from API docs for subitems.)
Thank you! That helped as I am now able to add the subitem.
However, I was also trying to pass my column values as a variable. When I add that variable in my query, I get basically the same original query I had that does not function. It returns a "TypeError: Cannot Read Property ‘create_subitem’ of undefined.
Here is my query:
mutation ($parentItemId: ID!, $subitemName: String!, $columnValues: JSON) {
create_subitem(
parent_item_id: $parentItemId,
item_name: $subitemName,
column_values: $columnValues) {
id
name
column_values {
id
value
}
board {
id
}
}
}
“TypeError: Cannot Read Property ‘create_subitem’ of undefined” sounds to me like there might be an issue with the script and maybe not with the mutation itself, since that does not look like a message coming from monday’s server, but rather from the script itself. I would check that as well.
Thank you again! I think there is something wrong with my column values, as I am able to create the sub-item with the correct name (and under the correct Parent item ID). But then when I add the ColumnValues variable to my query, that is when I get the script error.
Here is the columnValues JSON string I am using - does anything look weird to you in this?
columnValues:
{"date":"Mon Feb 06 00:00:00 GMT-05:00 2023",
"text":"Sat Dec 30 17:30:00 GMT-05:00 1899",
"text92":"1 Towne Centre Blvd",
"text7":"Fredericksburg",
"text84":"Virginia",
"text20":"22407.0",
"text5":"Spotsylvania"}