Connect boards

The connect boards column links an item on the board with an item(s) on a different board(s). Our API fully supports the connect boards column, so you can filter, read, update, and clear it via the API.

Filtering the connect boards column

Using the items_page object, you can easily filter a board's items by specific columns or column values. The table below contains the connect boards column's supported operators and compare values.

OperatorsCompare values
any_ofThe connected items' IDs to filter by
not_any_ofThe connected items' IDs to filter by
is_emptynull
is_not_emptynull
contains_textThe partial or whole item name to filter by as a string
not_contains_textThe partial or whole item name to filter by as a string

👍

Pro tip

items_page is only available in API version 2023-10 for now.

The following example returns all items on the specified board that are connected to an item whose name contains "Test".

query {
  boards (ids: 1234567890) {
    items_page (query_params: {rules: [{column_id: "connect_boards", compare_value: ["Test"], operator:contains_text}]}) {
      items {
        id
        name
      }
    }
  }
}

Reading the connect boards column

You can query the connect boards column using the column_values object. The object has different fields based on which API version you are using. Column values v2 fields will be available in API versions 2023-10 and later, while column values v1 fields are only supported in versions 2023-07 and 2023-04.

Column values v2

The column_values object enables you to return column-specific subfields by sending a fragment in your query. Values for the connect boards column are of the BoardRelationValue type.

👍

Pro tip

column_values v2 fields are only available in API version 2023-10.

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on BoardRelationValue {
        linked_item_ids
        linked_items
      }
    }
  }
}

Fields

FieldDescription
column Column!The column the value belongs to.
display_value String!The names of the linked items, separated by commas.
id ID!The column's unique identifier.
linked_item_ids [ID!]!The unique identifiers of linked items.
linked_items [Item!]!The linked items.
text StringThe column's value as text. Please note: this field will be blank in API version 2023-10. Use display_value instead.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Column values v1

You can return the data in a connect boards column in two different formats when you query by column values. The text field will return the connected items' name(s) as a simple string. The value field will return metadata about the column as a JSON string.

{
  "text": "Sample task",
  "value": "{\"changed_at\":\"2023-05-30T12:00:00.000Z\",\"linkedPulseIds\":[{\"linkedPulseId\":1234567890}]}"
}

Updating the connect boards column

You can update a connect boards column using the change_multiple_column_values mutation and passing a JSON string in the column_values argument. Simple string updates are not supported.

JSON

🚧

Warning

Boards can't be connected using the API - only items on boards that are already connected. Let's say your want to connect an item from Board B to Board A, but the boards are not yet connected. You must first manually connect Boards B and A, and then you can use the API to connect the items.

If you try to connect items from boards that are not connected, you will get an error.

To update a connect boards column, send the item IDs to be linked as an array. Check out this mutation in action in our Postman library or follow along with these code samples!

mutation {
  change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"connect_boards\" : {\"item_ids\" : [12345, 23456, 34567]}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      myColumnValues: "{\"connect_boards\": {\"item_ids\": [9876543210, 1234567890, 0987654321]}}"
    })
  })
})

Clearing the connect boards column

You can also clear a connect boards column using the change_multiple_column_values mutation and passing null or an empty object in the column_values argument. Check out this mutation in action in our Postman library or follow along with these code samples!

mutation {
 change_multiple_column_values(item_id:9876543210, board_id:1234567890, column_values: "{\"connect_boards\" : null}") {
  id
 }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY_HERE'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValues:JSON!) { change_multiple_column_values(item_id:$myItemId, board_id:$myBoardId, column_values: $myColumnValues) { id } }",
    variables : JSON.stringify({
      myBoardId: 1234567890,
      myItemId: 9876543210,
      myColumnValues: "{\"connect_boards\" : null}"
    })
  })
})

📘

Join our developer community!

We've created a community specifically for our devs where you can search through previous topics to find solutions, ask new questions, hear about new features and updates, and learn tips and tricks from other devs. Come join in on the fun! 😎