Skip to main content

Add new line inside long-text using API

  • March 14, 2021
  • 3 replies
  • 2483 views

f2yez
Forum|alt.badge.img
  • Participating Frequently

Hi,

I tried to add new line symbol inside long text value using this query:

mutation { change_column_value ( board_id: 940074204, item_id: 1129522709, column_id: "long_text", value: "{\\"text\\":\\"234test123\\n222\\"}" ) { id } }

But I have got an error after executed the query:

{
“error_message”: “Internal server error”,
“status_code”: 500
}

The same error on the “try it yourself”

Is that not allowed ?

Thanks!

This topic has been closed for replies.

3 replies

LaurentConroux
  • Participating Frequently
  • March 14, 2021

Hey @f2yez,

You need to escape the \\ inside your text value :
\\"234test123\\\\n222\\" did work for me on the playground.

Cheers,
Laurent


Forum|alt.badge.img
  • monday.com Team Member
  • March 15, 2021

@f2yez

If you want to see the backslash within the long text column, you will need to utilize 4 backslashes like this:

"{\\"text\\":\\"234test123\\\\\\\\n222\\"}"

this will work!


  • March 22, 2021

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.