Getting a row (Item and column values) from a board results in Cannot read property 'column_values' of undefined error

Hi
My aim is to export each row of a board as a file (JSON payload) so I can import them into our system and use the values for calculations.

I have solved (via help on stackoverflow) getting the column_values ID and Text values as Key value pairs
eg
“column_values”: [ { “id”: “status”, “text”: “Working on it” } ]

becomes
“column_values”[{“status”: “Working on it”}]

using
results.data.boards[0].items[0].column_values=results.data.boards[0].items[0].column_values.map(x => ({[x.id] : x.text}));

Although some of the ID come across as text1, text2 instad of the actual text value

When I test this in the intergration it works and the full api payload is converted.

However when when I use the intergration in a Zap it fails with the error - Cannot read property ‘column_values’ of undefined.

The zap uses Mondays - Column Value Changed in Board in monday.com with a set board ID as the trigger to provide the Pulse ID

I then pass the Board ID and Pulse ID to the Monday api with the following request

const options = {
url: ‘https://api.monday.com/v2’,
method: ‘POST’,
headers: {
‘Content-Type’: ‘application/json’,
‘Accept’: ‘application/json’,
‘Authorization’: bundle.authData.Authorization
},
params: {
‘Authorization’: bundle.authData.Authorization
},
body: {
‘query’: {boards (ids:${bundle.inputData.board_id}) {name items (ids:${bundle.inputData.item_id}) { name id column_values { id text } } } }
}
}

return z.request(options)
.then((response) => {
response.throwForStatus();
const results = response.json;

results.data.boards[0].items[0].column_values=results.data.boards[0].items[0].column_values.map(x => ({[x.id] : x.text}));

return results;

});

to return the Board Item and Column values - which fails with the error.

Hey there @Commissionly :wave:

Sorry for my delay in getting back to you on this! Let’s try and get this sorted out together.

I do need to investigate this a little more closely to provide more tailored suggestions, but it seems like you are running into this error code on Zapier’s end, since we do not have an error message like the following:

Cannot read property ‘column_values’ of undefined.

Does this work for you in a testing environment, but not when trying to shoot a real Zap to Monday.com?
Is there any chance your query is too complex in relation to our API’s complexity limit? You can find more info on that here:

Complexity

What do you think? Let me know :slight_smile:

-Alex