Hi everyone,
I'm developing an app that processes WorkDoc content. I am successfully using the blocks API to fetch the document structure, but I’ve hit a roadblock when trying to resolve embedded widgets (such as the Battery widget).
The block payload returns a widgetId inside the stringified content field, like this:
{
"id": "86fec34c-4a0f-46fd-8cee-ad3c3d4e7bfc",
"type": "widget",
"content": "{\"type\":\"widget\",\"widgetId\":143752276,\"alignment\":\"left\",\"direction\":\"ltr\",\"widgetType\":\"EmbeddedSiteOverviewSection\",\"isCreatingWidget\":null,\"didNewLayoutMigration\":true}",
"parent_block_id": null
}
In the Monday GraphQL schema, widgets cannot be queried at the root level - they normally require a parent dashboard(ids: [...]) query. However, because these widgets are embedded inside a WorkDoc, there is no parent Dashboard ID available.
Is there an existing query, a specific nesting pattern, or a workaround in the API to fetch the configuration data (settings_str) of a standalone widget using just its widgetId?
Any guidance would be greatly appreciated!