Last Updated

Learn how to filter by and read the last updated column on monday boards using the platform API

The last updated column displays when an item was last modified and who updated it.

Via the API, the last updated column supports read and filter operations.

Column Type

Implementation Type

Supported Operations

last_updated

LastUpdatedValue

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

Queries

Last updated columns can be queried through the column_values field on items queries using an inline fragment on LastUpdatedValue.

query {
  items(ids: [1234567890, 9876543210]) {
    column_values {
      ... on LastUpdatedValue {
        updated_at
        value
      }
    }
  }
}
import { ApiClient } from "@mondaydotcomorg/api";

const mondayApiClient = new ApiClient({ token: myToken });

const query = `
  query($itemIds: [ID!], $columnType: [ColumnType!]) {
    items(ids: $itemIds) {
      id
      column_values(types: $columnType) {
        column { title id }
        ... on LastUpdatedValue {
          updated_at
          updater_id
        }
      }
    }
  }
`;

const variables = {
  itemIds: [9571351485, 9572374902],
  columnType: "last_updated"
};

const response = await mondayApiClient.request(query, variables);

Fields

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

FieldDescription
column Column!The column the value belongs to.
id ID!The column's unique identifier.
text StringThe column's value as text.
type ColumnType!The column's type.
updated_at DateThe column's last updated date.
updater User!The user who last updated the item.
updater_id ID!The unique identifier of the user who last updated the item.
value JSONThe column's JSON-formatted raw value.

Filter

You can filter items by their last updated information using the items_page object.

Even if the last updated column is not visible on the board, you can filter by last updated metadata using __last_updated__ as the column_id.

You can filter items by:

  • Who last updated them
  • When they were last updated
👍

The results depend on the timezone, date format, and first day of the week settings configured in the monday.com profile of the user making the API call.

Compare Value

Description

Operators

Compare Attribute

Compare Attribute Required?

"assigned_to_me"

Items last updated by the calling user

any_of
not_any_of


No

"person-123456"

Items last updated by a specific user

any_of
not_any_of


No

"TODAY"

Items last updated today

any_of not_any_of

"UPDATED_AT"

Yes

"YESTERDAY"

Items last updated yesterday

any_of not_any_of

"UPDATED_AT"

Yes

"THIS_WEEK"

Items last updated this week

any_of not_any_of

"UPDATED_AT"

Yes

"LAST_WEEK"

Items last updated last week

any_of not_any_of

"UPDATED_AT"

Yes

"THIS_MONTH"

Items last updated this month

any_of not_any_of

"UPDATED_AT"

Yes

"LAST_MONTH"

Items last updated last month

any_of not_any_of

"UPDATED_AT"

Yes

"PAST_DATETIME"

Items last updated in the past

any_of

"UPDATED_AT"

Yes

Examples

Filter by today's updates

This example returns all items last updated today, even if the board does not have a visible last updated column.

query {
  boards(ids: 1234567890) {
    items_page(
      query_params: {
        rules: [
          {
            column_id: "__last_updated__"
            compare_value: ["TODAY"]
            operator: any_of
            compare_attribute: "UPDATED_AT"
          }
        ]
      }
    ) {
      items {
        id
        name
      }
    }
  }
}
const query = `
  query ($boardId: [ID!], $columnId: ID!, $operator: ItemsQueryRuleOperator!, $compareValue: CompareValue!, $compareAttribute: String!) {
    boards(ids: $boardId) {
      items_page(
        query_params: {
          rules: [
            {
              column_id: $columnId,
              compare_value: $compareValue,
              compare_attribute: $compareAttribute,
              operator: $operator
            }
          ]
        }
      ) {
        items { id name }
      }
    }
  }
`;

const variables = {
  boardId: 9571351437,
  columnId: "__last_updated__",
  compareValue: ["TODAY"],
  compareAttribute: "UPDATED_AT",
  operator: "any_of"
};

const response = await mondayApiClient.request(query, variables);

Filter by who last updated an item

This example returns all items last updated by user 123456.

query {
  boards(ids: 1234567890) {
    items_page(
      query_params: {
        rules: [
          {
            column_id: "__last_updated__"
            compare_value: ["person-123456"]
            operator: any_of
          }
        ]
      }
    ) {
      items {
        id
        name
      }
    }
  }
}
const query = `
  query ($boardId: [ID!], $columnId: ID!, $operator: ItemsQueryRuleOperator!, $compareValue: CompareValue!) {
    boards(ids: $boardId) {
      items_page(
        query_params: {
          rules: [
            { column_id: $columnId, compare_value: $compareValue, operator: $operator }
          ]
        }
      ) {
        items { id name }
      }
    }
  }
`;

const variables = {
  boardId: 9571351437,
  columnId: "__last_updated__",
  compareValue: ["person-123456"],
  operator: "any_of"
};

const response = await mondayApiClient.request(query, variables);