Email

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

The email column allows you to attach an email address to an item and send emails to that contact with a single click.

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

Column Type

Implementation Type

Supported Operations

email

EmailValue

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

Queries

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

query {
  items (ids:[1234567890, 9876543210]) {
    column_values {
      ... on EmailValue {
        email
        updated_at
      }
    }
  }
}
const query = `query($itemIds: [ID!], $columnType:[ColumnType!]) { items (ids:$itemIds) { id column_values (types:$columnType) { column { title id } ... on EmailValue { email } } } }`;
const variables = {
  itemIds: [9571351485, 9572374902],
  columnType: "email"
};

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

Fields

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

FieldDescription
column Column!The column the value belongs to.
email StringThe column's email value.
id ID!The column's unique identifier.
label StringThe column's text value. Please note that this may be the same as the email value if the user didn't enter any text.
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 email values using the items_page object. The email column supports the following operators:

Operators

Compare Values

any_of

  • "" (blank values)
  • The whole email or display text value to filter by

not_any_of

  • "" (blank values)
  • The whole email or display text value to filter by

is_empty

[]

is_not_empty

[]

contains_text

The partial or whole email or display text value to filter by

not_contains_text

The partial or whole email or display text value to filter by

*Please note that you can use either the email or display text when using theany_of, not_any_of, contains_text, or not_contains_text operators, but it must match whatever is in the UI. For example, if the item just has an email without display text, you can search by email. If display text is present, you must search by that and not the email.

Example

The following example returns all items on the specified board without "@gmail" in their email address. Please note that if the column had display text values, the query would have to utilize those instead of the email value.

query {
  boards(ids: 1234567890) {
    items_page(
      query_params: {
        rules: [
          {
            column_id: "email"
            compare_value: ["@gmail"]
            operator: not_contains_text
          }
        ]
      }
    ) {
      items {
        id
        name
      }
    }
  }
}
import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });

const query = `query ($board_id: [ID!], $column_id: ID!, $operator: ItemsQueryRuleOperator!, $compare_value:CompareValue!) { boards (ids: $board_id) { items_page (query_params: {rules: [{column_id: $column_id, compare_value: $compare_value,  operator:$operator}]}) { items { id name } } } }`;
const variables = {
  board_id: 9571351437,
  column_id: "email_mksr9hcd",
  compare_value: ["@gmail.com"], 
  operator: "contains_text",
};

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

Mutations

Update

You can update an email 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

To update an email column with a simple string, send both the email address and display text as a string separated by a space. You can also include spaces in the display text. Both are required.

mutation {
  change_simple_column_value(
    item_id: 9876543210
    board_id: 1234567890
    column_id: "email"
    value: "[email protected] This is an example email"
  ) {
    id
  }
}
import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });

const query = `
  mutation (
    $boardId: ID!,
    $itemId: ID!,
    $columnId: String!,
    $columnValue: String!
  ) {
    change_simple_column_value(
      item_id: $itemId,
      board_id: $boardId,
      column_id: $columnId,
      value: $columnValue
    ) {
      id
    }
  }
`;

const variables = {
  boardId: 9571351437,
  itemId: 9571351485,
  columnId: "email_mksr9hcd",
  columnValue: "[email protected] This is an example email",
};

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

change_multiple_column_values

To update an email column with JSON, you should send the email address in the email key and display text in the text key. Both keys are required.

👍

Pro tip

You can mix both string and JSON values in the change_multiple_column_values mutation.

mutation {
  change_multiple_column_values(
    item_id: 9876543210
    board_id: 1234567890
    column_values: "{\"email_mksr9hcd\": {\"email\": \"[email protected]\", \"text\": \"This is an example email\"}}"
  ) {
    id
  }
}
import { ApiClient } from "@mondaydotcomorg/api";
const mondayApiClient = new ApiClient({ token: myToken });

const query = `
  mutation (
    $boardId: ID!,
    $itemId: ID!,
    $columnValues: JSON!
  ) {
    change_multiple_column_values(
      item_id: $itemId,
      board_id: $boardId,
      column_values: $columnValues
    ) {
      id
    }
  }
`;

const variables = {
  boardId: 9571351437,
  itemId: 9571351485,
  columnValues: JSON.stringify({
    email_mksr9hcd: { // Replace with your email column ID
      email: "[email protected]",
      text: "This is an example email"
    }
  }),
};

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

Clear

You can clear an email 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: "email"
    value: ""
  ) {
    id
  }
}
const query = `
  mutation ($boardId: ID!, $itemId: ID!, $columnValue: String!, $columnId: String!) {
    change_simple_column_value(
      item_id: $itemId
      board_id: $boardId
      column_id: $columnId
      value: $columnValue
    ) {
      id
    }
  }
`;

const variables = {
  boardId: 9571351437,
  itemId: 9571351485,
  columnId: "email",
  columnValue: ""
};

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

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: "{\"email\": null}"
  ) {
    id
  }
}