Skip to main content

Hi,


I am trying to retrieve the contents of particular blocks in a workdoc using the API, I can successfully query a document as so:


query {
docs (object_ids: XXXXXXXXXX, limit: 1) {
blocks {
id
content
doc_id

}
}
}

However, I cannot access the content of a table, for example, and have not been able to find documentation to figure it out (it may just be me and I missed it).


I would like to be able to programmatically retrieve content from a Monday workdoc. So far I have been querying the block property, but cannot move beyond listing the blockId’s below that - which doesn’t include the actual content within the return using the query above.


Could someone point me in the right direction? I had been reviewing Document blocks


Thanks.

Hello there @acodez,


I will check about this specific use case with the team in charge of the docs and will let you know as soon as they reply 😁


Cheers,

Matias


Hello again @acodez ,


I checked this with the team in charge of docs.


Currently the API supports getting all blocks of a doc. In the case of the cells of a table created within the UI, you will need to (from the UI) click on the cells before they are visible to the API because of how this is configured at the moment. This is if the block was created via the UI.


If the table is created via API then the content of each cell will be visible immediately without the need of clicking anywhere.


Cheers,

Matias


Hi @Matias.Monday,


I tried clicking on each cell, its text contents and the entire table. I also deleted an existing table and created a new one.


But the API is still not giving me the cell contents.


This is the query I’m using,


{
docs(ids: "1574538") {
blocks {
__typename
type
content
id
}
}
}

This is the response I’m getting for the table,


{
"__typename": "DocumentBlock",
"type": "table",
"content": "{\\"cells\\":\\{\\"blockId\\":\\"9b94cbf4-6f6a-4879-810b-cee43de2bfe2\\"},{\\"blockId\\":\\"d7e241f1-adea-493e-894c-57b194f149e1\\"}],"{\\"blockId\\":\\"32e0de53-799b-41fb-9848-cd6fe608c467\\"},{\\"blockId\\":\\"12c1efdb-33e1-46d2-a99a-6d3a1f6db194\\"}]],\\"alignment\\":\\"left\\",\\"direction\\":\\"ltr\\",\\"columnsStyle\\":\{\\"width\\":50},{\\"width\\":50}]}",
"id": "a475dfbf-b9a8-44f4-a821-8c46cb4e3cbf"
}

Can you please suggest any workarounds?


Hello again @rajaravivarma_r,


That is odd. I can not reproduce the issue.


Would you be able to please fill this form (https://support.monday.com/hc/en-us/requests/new?ticket_form_id=13855862562962) adding as much information as possible to it (such as account ID, doc ID, timestamps, etc.) so that our team can take a look into it?


Looking forward to hearing from you via the form!


Cheers,

Matias


Hi Matias,

I just submitted the request. Hope this will be sorted out.


Thanks,

Raja


Hello again @rajaravivarma_r,


Our team will take a look 😀


Were you able to find the solution for this. I’m having the exact same issue. My content inside my table is made of column values from my board.


Hello there @Daniel.prudente,


You are invited to use this form to send our team a message (please add as much information as possible so that we have more context) 😀


Reply