How to get data from Monday Item Read connector

Here is short JS mapper script that can help you to get data directly Monday Items Read connector. Basically one of the step in the task is:

image

It is returning data in the following data schema:

This means that column values looks like this:

If get this data into next step that will be JS mapper as need to extract some of the value:

image

Here is a small trick as I need also board ID for next step I create new schema where I included Monday Item Readed Output schema:

Whit this statement that can return value of particular column based on ColumnValues.ID:

const mondayData = inputData[0];
const branchColumn = mondayData.MondayData[0].ColumnValues.find(x => x.ID == "text21");

var branchName = branchColumn?.PlainValue;

if(!branchName){
  log.error("Missing branch information");
};

return [{
  "BoardID": mondayData.BoardID,
  "ItemID": mondayData.MondayData[0].ID,
  "Branch": branchName,
}];

In this way I can further process extracted data and use them for other connectors. I my case I use it to run build on Jenkins and update Monday Pulse with information that build starter (that is why I have in my schema BoradID + ItemID that are used as input for other task.

1 Like