Skip to main content

Retrieving table content from Monday docs

  • May 16, 2023
  • 3 replies
  • 399 views

Forum|alt.badge.img

Hi there,
I am trying to retrieve data from table inside a Monday docs, the query used is:
query {
docs (ids:5478957) {
blocks {
id
type
content
}
}
}


I am getting results like the image above and understood that the Monday docs API allows one to get the content for ‘normal text’ type but how do I get the text content from a ‘table’ or use the child block id to get the text inside a table. (The arguments for the retrieval query doesn’t have block id in it)
Would appreciate some help here! Thanks

3 replies

Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • May 17, 2023

Hello there @Durga and welcome to the community!

If the table was created via UI, you will need to click on each individual cell.

After you have done that, this query should give you the content of the cells:

{
  docs(ids:123456){
    blocks {
      __typename
      type
      content
    }
  }
}

If the table is created via API, no clicking is needed.

I hope that helps!

Cheers,
Matias


Forum|alt.badge.img
  • Author
  • New Participant
  • June 2, 2023

Thank you Matias, Missed that because of default limit in the query


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • June 4, 2023

Glad to help @Durga !