Columns Methods
| Method Name | Method Type | Description |
|---|---|---|
get_column_metadata(board_id, column_ids) |
Getter | Retrieves metadata for specific columns on a board. |
change_column_values(board_id, item_id, column_dict) |
Setter | Updates multiple column values of an item. |
create_column(board_id, title, column_type) |
Setter | Creates a new column in a board. |
change_column_title(board_id, column_id, new_title) |
Setter | Updates the title of a column. |
clear_column(board_id, item_id, column_id) |
Setter | Clears the value of a column based on its type. |
Column Types
Below is a list of all column types currently supported. The first argument is always the column_id, followed by the required values:
text: One argument. Text string. Example:
{ "column_id": { "type": "text", "values": ["Sample text"] } }checkbox: One argument. Boolean (
trueorfalse). Example:{ "column_id": { "type": "checkbox", "values": [true] } }timeline: Two arguments. Start date and end date (
YYYY-MM-DD). Example:{ "column_id": { "type": "timeline", "values": ["2024-01-01", "2024-12-31"] } }connect_boards: One argument. List of connected item IDs. Example:
{ "column_id": { "type": "connect_boards", "values": [[12345678, 87654321]] } }country: Two arguments. Country code and country name. Example:
{ "column_id": { "type": "country", "values": ["US", "United States"] } }date: One argument. Date string (
YYYY-MM-DD). Example:{ "column_id": { "type": "date", "values": ["2024-06-15"] } }date_time: Two arguments. Date string and time (
HH:MM). Example:{ "column_id": { "type": "date_time", "values": ["2024-06-15", "12:30"] } }dropdown: One argument. Single option value. Example:
{ "column_id": { "type": "dropdown", "values": ["option1"] } }email: Two arguments. Email and optional text label. Example:
{ "column_id": { "type": "email", "values": ["user@example.com", "Work Email"] } }hour: Two arguments. Hour and minute values. Example:
{ "column_id": { "type": "hour", "values": [14, 30] } }link: Two arguments. URL and optional display text. Example:
{ "column_id": { "type": "link", "values": ["https://example.com", "Click Here"] } }location: Three arguments. Latitude, longitude, and address. Example:
{ "column_id": { "type": "location", "values": ["29.9772962", "31.1324955", "Giza Pyramid Complex"] } }long_text: One argument. Long text string. Example:
{ "column_id": { "type": "long_text", "values": ["Detailed description of the task."] } }numbers: One argument. Numeric value. Example:
{ "column_id": { "type": "numbers", "values": [42] } }people: Two arguments. User/team ID and kind (
personorteam). Example:{ "column_id": { "type": "people", "values": [123456, "person"] } }phone: Two arguments. Phone number and country code. Example:
{ "column_id": { "type": "phone", "values": ["+123456789", "US"] } }rating: One argument. Rating value between 1 and your rating scale (integer). Example:
{ "column_id": { "type": "rating", "values": [5] } }world_clock: One argument. Timezone identifier. Example:
{ "column_id": { "type": "world_clock", "values": ["America/New_York"] } }week: Two arguments. Week start and end dates. Example:
{ "column_id": { "type": "week", "values": ["2019-06-10", "2019-06-16"] } }
Method Details
get_column_metadata()
get_column_metadata(board_id, column_ids)
Description: Retrieves metadata for specific columns on a board.
Arguments:
board_id(int): The ID of the board.column_ids(list): A list of column IDs to retrieve metadata for.
Returns:
A list of dictionaries containing metadata for the specified columns. None or an error message if the request fails.
Example:
column_metadata = monday.columns.get_column_metadata(1234567890, ["status", "date"])
change_column_values()
change_column_values(board_id, item_id, column_dict)
Description: Updates multiple column values of an item.
Arguments:
board_id(int): The ID of the board.item_id(int): The ID of the item.column_dict(dict): A dictionary containing column IDs, types, and their new values (refer to Column Types).
Returns:
The updated item's ID. None or an error message if the request fails.
Example:
column_dict = {
"text1": {"type": "text", "values": ["Updated Text"]},
"status2": {"type": "status", "values": ["Done"]},
"date3": {"type": "date", "values": ["2024-06-15"]},
"rating4": {"type": "rating", "values": [5]},
"week5": { "type": "week", "values": ["2019-06-10", "2019-06-16"]},
"location6": { "type": "location", "values": ["29.9772962", "31.1324955", "Giza Pyramid Complex"]}
}
updated_item = monday.columns.change_column_values(1234567890, 987654321, column_dict)
create_column()
create_column(board_id, title, column_type)
Description: Creates a new column in a board.
Arguments:
board_id(int): The ID of the board.title(str): The title of the new column.column_type(str): The type of column to create (e.g.,text,date).
Returns:
The newly created column's ID. None or an error message if the request fails.
Example:
new_column_id = monday.columns.create_column(1234567890, "Priority", "status")
change_column_title()
change_column_title(board_id, column_id, new_title)
Description: Updates the title of a column.
Arguments:
board_id(int): The ID of the board.column_id(str): The ID of the column to update.new_title(str): The new title for the column.
Returns:
The updated column's ID. None or an error message if the request fails.
Example:
updated_column = monday.columns.change_column_title(1234567890, "status", "Progress")
clear_column()
clear_column(board_id, item_id, column_id)
Description: Clears the value of a column based on its type.
Arguments:
board_id(int): The ID of the board.item_id(int): The ID of the item.column_id(str): The ID of the column to clear.
Returns:
The updated item's ID. None or an error message if the request fails.
Example:
cleared_item = monday.columns.clear_column(1234567890, 987654321, "status")