Skip to main content

I’m writing an app to synchronize our SugarCRM with a Monday board.


All is working as expected, but sometimes one query to update a people column is failing with an error 500.


The query is:


mutation {

change_multiple_column_values (

board_id: 165483237,

item_id: 724910374,

column_values: “{"people":{"personsAndTeams":m{"id":5428485,"kind":"person"}]}}”

)

{

id

}

}


When using a different user id, all is working as expected.


It seems that the user 5428485 is a Team Member, but not not a Board Member.


If I add this user to the Board Member list, all is working as expected.


How to check if a user is a Board Member before updating the column?


How to add a user as a Board Member, either Member or Guest?


Thanks for your help.

Hey @lrobinot - welcome!!


It sounds like the 500 error here is being caused by the user not being a board member, as you described on your post. We do have mutations for adding / deleting users as subscribers to the board:

image

You should be able to use these to add users to the board when needed through the API. Likewise, we have a query which will return the user IDs for subscribers to a board:


query{boards(ids: _______) {
id, subscribers {
id
}
}}

This being said, the logic for comparing the two user ID’s would have to be implemented on your side.


Let me know if we can help with anything else!


-Daniel


Thanks for the quick reply.


I was expecting a support answer, as a 500 error code is not an error on my side… 🙂


The workaround took me some time to find. An error explaining that the user is not a board subscriber should have save me a lot of time.


Issue have been fixed on my side 😇 !!


Awesome @lrobinot! Let us know if we can assist with anything else 🙂