async def METHOD_NAME(
    exe_message: ExecutionMessage,
    config: GoogleWorkspaceConfig,
    output_dir: str,
    detect_messages: list = None,
):
    """List all groups in the domain, along with members and
    settings"""
    base_path = os.path.expanduser(output_dir)
    existing_template_map = await get_existing_template_map(
        base_path,
        GOOGLE_GROUP_TEMPLATE_TYPE,
        config.template_map,
    )
    all_resource_ids = set()
    log.info("Updating and creating Google group templates.")
    for workspace in config.workspaces:
        for subject in workspace.subjects:
            domain = subject.domain
            group_dir = get_group_dir(base_path, domain)
            groups = await exe_message.get_sub_exe_files(
                *get_resource_dir_args(domain),
                "templates",
                file_name_and_extension="**.yaml",
            )
            # Update or create templates
            for group in groups:
                group = GoogleWorkspaceGroupTemplate(file_path="unset", **group)
                group.file_path = group.default_file_path
                resource_template = await update_or_create_group_template(
                    group, existing_template_map, group_dir
                )
                if not resource_template:
                    # Template not updated. Most likely because it's an `enforced` template.
                    continue
                all_resource_ids.add(resource_template.resource_id)
    # Delete templates that no longer exist
    delete_orphaned_templates(list(existing_template_map.values()), all_resource_ids)
    log.info("Finish updating and creating Google group templates.")