Updating "connect boards" column through the API

Hi, It is solved now :slight_smile: . I was trying to update the value of a “connect boards” column in my board.
I have already created the column in the board, and it is already connected to the other board.

When I run this query, the response is succesful and all the column values are updated except for the connect boards.

        query = 'mutation ($myItemName: String!, $columnVals: JSON!) { create_item (board_id:' + str(main_board_id) + ', item_name:$myItemName, column_values:$columnVals) { id } }'
        vars = {'myItemName': customer_inv.get('company_name'),
                'columnVals': json.dumps({'text0': row['hubspot_id'], 'connect_boards': {'item_ids': [int(companies_contactDB.get(row['hubspot_id']))]},
                'connect_boards0': {'item_ids': [int(bullride_companies.get(row['hubspot_id']))]} if bullride_companies.get(row['hubspot_id']) else '',})}
        data = {'query': query, 'variables': vars}
        monday_headers = {"Authorization": APIKEY, 'API-Version': '2023-10'}
        monday_apiUrl = "https://api.monday.com/v2"

connect_boards value -> {'item_ids': [1303168030]}
connect_boards0 value -> {'item_ids': [1288328622]}

response: 200 -> {'data': {'create_item': {'id': '1314615502'}}, 'account_id': XXXXX}

Thanks!

1 Like