Skip to main content

Hey guys, I am sure this has been answered a few times but I am having trouble with a particular query. No code language, having trouble with the playground and postman.


I am trying to send a link in my JSON for updating multiple values at the creation of an item.

The mutation

mutation CreateNewItem ($itemName: String!, $colVals: JSON){ create_item (board_id: 1234, group_id: "new_group", item_name: $itemName, column_values: $colVals){ id } }


Unformatted(500 error):


{
"itemName": "test",
"colVals": {
"link5__1": {
"url": "https://google.com",
"text": "Go To Ticket"
}
}
}

If I attempt to stringify with single slashes I get 200 code but nothing shows up.

If I attempt to stringify with multiple slashes like so I can get it to show up in the link column but it shows up as a string. Whatever I do I cannot get the link to show up and direct me.


{"colVals":"{\\"ticket_number__1\\": \\"Test\\", \\"link5__1\\": \\"{\\\\\\"url\\\\\\": \\\\\\"https://google.com\\\\\\", \\\\\\"text\\\\\\": \\\\\\"Go To Ticket\\\\\\"}\\"}","itemName":"TEST Name"}

Any help would be much appreciated. Thank you

Hello there @JoelMorl and welcome to the community!


I hope you like it here 💪


I just tested this in Postman and you can use something like this:


mutation CreateNewItem ($itemName: String!, $colVals: JSON){ create_item (board_id: 1234567890, group_id: "topics", item_name: $itemName, column_values:$colVals){ id } }

{
"itemName": "My item",
"colVals": "{\\"link__1\\" : {\\"url\\" : \\"http://monday.com\\", \\"text\\":\\"go to monday!\\"}}"
}

I hope that helps 😀


Cheers,

Matias


That works! Thank you for the help.


Happy to help @JoelMorl 😀


Reply