Long text

The long text column holds texts of up to 2,000 characters in length. Our API supports this column, so you can read and update the long text column via the API.

Reading the long text column

You can return the data in a long text column in two different formats. The text field will return the data as a simple string, and the value field will return the data as a JSON string.

{
  "text": "Insert long text over 2,000 characters here.",
  "value": "{\"text\":\"Insert long text over 2,000 characters here.\",\"changed_at\":\"2022-07-21T12:00:00.000Z\"}"
}

Updating the long text column

You can update a long text column with both a simple string and a JSON string.

Simple strings

To update the long text column, send a string with up to 2,000 characters.

For example: "Sample text"

JSON

To update the long text column, send a string up to 2,000 characters with the key β€œtext”.

For example: "{\"text\":\"Sample text\"}"

mutation {
  change_multiple_column_values(item_id:11111, board_id:22222, column_values: "{\"long_text1\" : {\"text\" : \"Sample text\"}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id }}",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      myColumnValues: "{\"long_text1\" : {\"text\" : \"Sample text\"}}"
    })
  })
})

You can find the Postman request to change the long text column here.

Clearing the long text column

You can clear the long text column using a change_multiple_column_values mutation like the one below.

mutation {
  change_multiple_column_values(item_id: 2973227073, board_id: 2973227049, column_values: "{\"long_text\" : \"\"}") {
    id
  }
}

πŸ“˜

Have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!