The email column allows you to attach an email address to an item and send emails to that contact with a single click from within your board. Our API supports this column, so you can read and update the email column via the API.

Reading the email column

You can return the data in an email column in two different formats. The text field will return the data as a simple string, and the value field will return the data as a JSON string.

{
  "text": "[email protected]",
  "value": "{\"text\":\"[email protected]\",\"email\":\"[email protected]\",\"changed_at\":\"2022-07-21T12:00:00.000Z\"}"
}

Updating the email column

You can update the email column with a JSON string, or with a simple string value.

Simple strings

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

For example: "[email protected] This is an example email"

mutation {
  change_simple_column_value (item_id: YOUR_ITEM_ID, board_id: YOUR_BOARD_ID, column_id:"email", value: "[email protected] This is an example email") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    query : "mutation ($myBoardId:Int!, $myItemId:Int!, $myColumnValue: String!, $columnId: String!) { change_simple_column_value (item_id:$myItemId, board_id:$myBoardId, column_id: $columnId, value: $myColumnValue) { id } }",
    variables : JSON.stringify({
      myBoardId: YOUR_BOARD_ID,
      myItemId: YOUR_ITEM_ID,
      columnId: "YOUR_COLUMN_ID",
      myColumnValue: "[email protected] This is an example email"
      })
    })
  })

JSON

To update an email column, you can send the email address in the email field and display text in the text field. For example: {"email" : "[email protected]", "text" : "[email protected]"}

mutation {
  change_multiple_column_values (item_id: YOUR_ITEM_ID, board_id: YOUR_BOARD_ID, column_values: "{\"email\":{\"email\":\"[email protected]\",\"text\":\"[email protected] This is an example email\"}}") {
    id
  }
}
fetch ("https://api.monday.com/v2", {
  method: 'post',
  headers: {
    'Content-Type': 'application/json',
    'Authorization' : 'YOUR_API_KEY'
  },
  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: JSON.stringify({
        email : {email : "[email protected]","text":"This is an example email"}
      })
    })
  })
})

You can find the Postman request to change the email column here.

👍

NOTE

You can use both string and JSON values in change_multiple_column_values(), as well as the create_item() mutations.

Clearing the email column

You can clear the email column using a change_multiple_column_values mutation.

mutation {
  change_multiple_column_values(item_id: 2973227073, board_id: 2973227049, column_values: "{\"email\" : {\"email\" : \"\", \"text\" : \"\"}}") {
    id
  }
}

📘

Have questions?

Join our developer community! You can share your questions and learn from fellow users and monday.com product experts.

Don’t forget to search before opening a new topic!