def get_folder_id(drive):
    """Determines the folder id of cfs-m's root folder"""
    folder_id = None
    file_list = drive.ListFile({'q': "'root' in parents and trashed=false"}
        ).GetList()
    for f in file_list:
        if f['title'] == 'CFS_Manager':
            folder_id = f['id']
            return folder_id
    else:
        folder = drive.CreateFile({'title': 'CFS_Manager', 'mimeType':
            'application/vnd.google-apps.folder'})
        folder.Upload()
        return folder['id']
