Skip to main content

Accessing boards embedded in documents

  • December 17, 2023
  • 7 replies
  • 264 views

Hi,

We’re working on an app that would greatly benefit from retrieving the board id of any board embedded in a document.

When I query the document blocks, I get a block of type board with content:

{
  "type": "board",
   "widgetId": <number>,
  "alignment": "left",
  "direction": "ltr",
  "didNewLayoutMigration": true
}

I haven’t found any information in the API documentation about accessing widgets or using the widgetId in order to retrieve information about the embedded board.

Is this possible at all?

Thanks in advance.

7 replies

Forum|alt.badge.img
  • monday.com Team Member
  • December 18, 2023

Hi Oscar,

Welcome to the community! Hope you are enjoying it here!

Would you be able to provide the query that was run to receive this object? We can take a look at that to see what is going on.

Best,
Joseph


  • Author
  • New Participant
  • December 18, 2023

Hi Joseph,

Thank you for the warm welcome.

Some context: I created a document and embedded a board in it by typing /board in the user interface, which causes the “Board & Widgets” pop up menu to appear, then selecting the “Board” option, then selecting a board from the “Choose Board” menu that appears.

I’m issuing a simple query to retrieve the blocks of a work document:

  docs(ids: [${docId}]) {
    blocks {
      id
      parent_block_id
      created_at
      created_by {
        id
        name
      }
      updated_at
      position
      type
      content
    }
  }

where ${docId} is the id of a particular document that has a board embedded in it.

This works as expected and returns the document blocks. My issue is that the doc block that describes the embedded board only contains a widgetId as described in the original question. We need the id of the board.

Thanks again,
Oscar.


Forum|alt.badge.img
  • monday.com Team Member
  • December 19, 2023

Hi Oscar,

Thank you for giving us more context. To clarify further, you state that the query works as expected but you want to retrieve the board ID using the widget ID or in general want to find a way to retrieve the board ID from this query?

Best,
Joseph


  • Author
  • New Participant
  • December 19, 2023

Hi Joseph,

The latter. I just need the board id(s) of the embedded board(s) in a doc. No need to go through the widgetId, I just mentioned it because it’s all I get at the moment.

Thanks again,
Oscar.


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • December 27, 2023

Hello there @oscar-alu,

It is not possible to do that right now.

I have created a request for our team, based on your question 😁

Cheers,
Matias


  • Author
  • New Participant
  • December 27, 2023

Thank you for looking into this and confirming @Matias.Monday .

Best,
Oscar.


Matias.Monday
Forum|alt.badge.img
  • monday.com Team Member
  • December 28, 2023

Happy to help @oscar-alu !