Skip to content

Creation of Subitems not working for workspace non-admins as of Aug 22, 2023 #113

@mm360x

Description

@mm360x

Monday.com looks to have updated their API for non-admins to restrict boards queries, hence whenever I tried to create a subitem, this is the error I get:
{'errors': [{'message': "Permission Denied! Your token doesn't grant access to boards:read"}], 'account_id': 1234567}

After looking through the library code, it seems like the function mutate_subitem_query() in Lib\site-packages\monday\query_joins.py
is returning the mutation with an additional boards:read query, which is why it is erroring out:

def mutate_subitem_query(parent_item_id, subitem_name, column_values, create_labels_if_missing): column_values = column_values if column_values else {} return '''mutation { create_subitem ( parent_item_id: %s, item_name: "%s", column_values: %s, create_labels_if_missing: %s ) { id, name, column_values { id, text }, board { id, name } } }''' % (parent_item_id, subitem_name, monday_json_stringify(column_values), str(create_labels_if_missing).lower())

After deleing the below from the mutation return above, I was able to create a subitem successfully.
board { id, name }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions