Sending JSON in a GraphQL query to Monday.com

I have a board containing high-level goals, each of which may be linked to multiple tasks in another board. A mirror column contains the links to each task. Each task may only be linked to one goal, but each goal may have many linked tasks.

I am using make.com to trigger when the tasks board is updated. A new task, linked to a goal, triggers to update the goal’s mirror column with a link to the task. However, when I map the ID of the new task to the goal’s mirror column, it overwrites the current content - therefore we end up with only one task (the most recently added one).

To get around this I decided to try updating the goal’s mirror column with a GraphQL query. I have written this:

mutation{
change_column_value(
item_id: {{1.mappable_column_values.connect_boards.linkedPulseIds[].linkedPulseId}}, 
column_id: "connect_boards4", 
board_id: 2747663520, 
value:{{if(6.parsed_value.linkedPulseIds[].linkedPulseId + "="""""; "{""item_ids"":[" + 1.id + "]}"; "{""item_ids"":[" + 6.parsed_value.linkedPulseIds[].linkedPulseId + "," + 1.id + "]}")}}, 
create_labels_if_missing: true
) {
id}
}

However, on run I get:

The operation failed with an error. [200] [{"message":"Parse error on \"item_ids\" (STRING) at [6, 8]","locations":[{"line":6,"column":8}]}]

I assume that there is something wrong with the JSON formatting of ‘item_ids’, but what I have there matches the examples in documentation.

@Mike_Randall

As written (when it works), it looks like you will end up with the first link and the newest only. Is that what you want?

Can you show the actual query string that is getting sent to the API?


Jim - The Monday Man (YouTube Channel) Our latest vid: Reading REALLY Large monday Boards
What is Make & How can it help you with monday?
We Create Custom Solutions - Your Make or Ours
Schedule a 1-on-1 Tutorial Session (for monday, Make or “Rocket Science”)