People

Learn how to filter by, read, update, and clear the people column on monday boards using the platform API

The people column assigns one or more users or teams to an item.

Via the API, the people column supports read, filter, create, update, and clear operations.

Column Type

Implementation Type

Supported Operations

people

PeopleValue

  • Read: Yes
  • Filter: Yes
  • Update: Yes
  • Clear: Yes

Queries

People columns can be queried through the column_values field on items queries using an inline fragment on PeopleValue.

query {
  items(ids: [1234567890, 9876543210]) {
    column_values {
      ... on PeopleValue {
        persons_and_teams {
          id
          kind
        }
      }
    }
  }
}

Fields

You can use the following fields to specify what information your PeopleValue implementation will return.

FieldDescription
column Column!The column the value belongs to.
id ID!The column's unique identifier.
persons_and_teams [PeopleEntity!]The assigned people or teams.
text StringThe column's value as text. Returns "" if the column has an empty value.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
value JSONThe column's JSON-formatted raw value.

Filter

You can filter items by people values using the items_page object. The people column supports the following operators:

Operators

Compare Values

any_of

  • User IDs ("person-123456")
  • "assigned_to_me" (items assigned to the user making the API call)
  • "person-0" (blank values)

not_any_of

  • User IDs ("person-123456")
  • "assigned_to_me" (items assigned to the user making the API call)
  • "person-0" (blank values)

is_empty

[]

is_not_empty

[]

contains_text

Partial or full name (must match the UI)

not_contains_text

Partial or full name to exclude (must match the UI)

contains_terms

Matches names by keyword(s) in any order

starts_with

Name starts with the compare value

ends_with

Name ends with the compare value

Example

This example returns items assigned to anyone except the user making the API call.

query {
  boards(ids: 1234567890) {
    items_page(
      query_params: {
        rules: [
          {
            column_id: "people"
            compare_value: ["assigned_to_me"]
            operator: not_any_of
          }
        ]
      }
    ) {
      items {
        id
        name
      }
    }
  }
}

Mutations

Update

You can update a people column using change_simple_column_value or change_multiple_column_values. You can send values as simple strings or JSON objects, depending on the mutation you choose.

change_simple_column_value

Send a comma-separated list of user IDs as a string in value.

mutation {
  change_simple_column_value(
    item_id: 9876543210
    board_id: 1234567890
    column_id: "people"
    value: "123456,654321"
  ) {
    id
  }
}

change_multiple_column_values

Send people or team IDs as JSON objects with id and kind keys in column_values.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"people\": {\"personsAndTeams\": [{\"id\": 4616666, \"kind\": \"person\"}, {\"id\": 51166, \"kind\": \"team\"}]}}"
  ) {
    id
  }
}

Clear

You can clear a people column using change_simple_column_value or change_multiple_column_values.

change_simple_column_value

Pass an empty string in value.

mutation {
  change_simple_column_value(
    item_id: 9876543210
    board_id: 1234567890
    column_id: "people"
    value: ""
  ) {
    id
  }
}

change_multiple_column_values

Pass null or an empty string/object in column_values.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"people\": null}"
  ) {
    id
  }
}