Issue with updating a table block in monday API

Hello,

I’m trying to create a 3x3 table in a monday.com workdoc and then update its cells with mentions and text using the GraphQL API. However, I’m encountering an error when trying to update the table cells.

Here’s what I’ve done so far:

  1. I successfully created a table block using this mutation:
mutation {
  create_doc_block(
    type: table, 
    doc_id: MY_DOC_ID, 
    content: "{\"column_count\":3,\"row_count\":3}"
  ) {
    id
  }
}
  1. Then, I tried to update a cell in the table using this mutation:
mutation {
  update_doc_block(
    block_id: "MY_BLOCK_ID",
    content: "{\"cells\":[[{\"content\":{\"deltaFormat\":[{\"insert\":\"@User Name\",\"attributes\":{\"mention\":{\"type\":\"person\",\"id\":\"USER_ID\"}}},{\"insert\":\" This is some text.\"}]}}]]}"
  ) {
    id
  }
}

However, when I run this mutation, I get the following error:

{
“errors”: [
{
“message”: “bad request”,
“locations”: [
{
“line”: 1,
“column”: 10
}
],
“path”: [
“update_doc_block”
],
“extensions”: {
“code”: “DocMutationException”,
“status_code”: 400,
“error_data”: [
{
“error_type”: “Block type not supported”
}
]
}
}
],
“status_code”: 400,
“error_data”: [
{
“error_type”: “Block type not supported”
}
],
“error_code”: “DocMutationException”,
“error_message”: “bad request”,
“account_id”: 1234
}

I’ve double-checked that I’m using the correct block ID and that my app has the necessary docs:write permission. I’m also using the latest API version.

Can anyone help me understand why I’m getting this “Block type not supported” error when trying to update the table cells, and how I can resolve it?

Thank you in advance for your help!

Hello there @sungjunHan and welcome to the community!

What happens if you use something like this:

mutation{
  create_doc_block(parent_block_id: "7sadsa1e-egfdg0-4fsd8-8b6d-e5sadbbfsd74fb5", doc_id: 1234567, type: normal_text, content: "{\"alignment\":\"left\",\"direction\":\"ltr\",\"deltaFormat\":[{\"insert\":\"This is some text\"}]}"){
    id
  }
}