Groups Methods

Method Name Method Type Description
is_group_empty(board_id, group_id) Getter Checks if a group is empty.
create_group(board_id, group_name) Setter Creates a new group on a board.
move_item_to_group(item_id, group_id) Setter Moves an item to another group.
update_group(board_id, group_id, group_attribute, new_value) Setter Updates an attribute of a group.
duplicate_group(board_id, group_id, add_to_top) Setter Duplicates a group within a board.
archive_group(board_id, group_id) Setter Archives a group in a board.
delete_group(board_id, group_id) Deleter Deletes a group from a board.

Method Details

is_group_empty()

is_group_empty(board_id, group_id)

Description: Checks if a group in a board is empty (has zero items).

Arguments:

  • board_id (int): The ID of the board.
  • group_id (str): The ID of the group.

Returns: True if the group is empty, False otherwise. None or error message if the request fails.

Example:

empty = monday.groups.is_group_empty(123456789, "group_abc")

create_group()

create_group(board_id, group_name)

Description: Creates a new group on a board at the top position.

Arguments:

  • board_id (int): The ID of the board.
  • group_name (str): The name of the new group.

Returns: UUID of the newly created group. None or error message on API call failure.

Example:

new_group = monday.groups.create_group(123456789, "New Group")

move_item_to_group()

move_item_to_group(item_id, group_id)

Description: Moves an item from one group to another.

Arguments:

  • item_id (int): The ID of the item to move.
  • group_id (str): The ID of the destination group.

Returns: UUID of the moved item. None or error message on API call failure.

Example:

moved_item = monday.groups.move_item_to_group(987654321, "group_def")

update_group()

update_group(board_id, group_id, group_attribute, new_value)

Description: Updates an attribute of an existing group.

Arguments:

  • board_id (int): The ID of the board.
  • group_id (str): The ID of the group to update.
  • group_attribute (str): The attribute to update ("title", "color", "position").
  • new_value (str): The new value for the attribute.

Returns: UUID of the updated group. None or error message on API call failure.

Example:

updated_group = monday.groups.update_group(123456789, "group_abc", group_attribute='color', new_value='yellow')

duplicate_group()

duplicate_group(board_id, group_id, add_to_top)

Description: Duplicates an existing group within a board.

Arguments:

  • board_id (int): The ID of the board.
  • group_id (str): The ID of the group to duplicate.
  • add_to_top (bool): Whether to add the new group to the top of the board (default: True).

Returns: UUID of the duplicated group. None or error message on API call failure.

Example:

duplicated_group = monday.groups.duplicate_group(123456789, "group_abc", add_to_top=False)

archive_group()

archive_group(board_id, group_id)

Description: Archives an existing group within a board.

Arguments:

  • board_id (int): The ID of the board.
  • group_id (str): The ID of the group to archive.

Returns: True if the group is successfully archived. None or error message if the request fails.

Example:

success = monday.groups.archive_group(123456789, "group_abc")

delete_group()

delete_group(board_id, group_id)

Description: Deletes a group from a board.

Arguments:

  • board_id (int): The ID of the board.
  • group_id (str): The ID of the group to delete.

Returns: True if successful. None or error message on API call failure.

Example:

success = monday.groups.delete_group(123456789, "group_abc")