Skip to main content

Hi, I am not programmer but API migration can block my Power BI repport, this is the Query that stay on my Developper Center, whar I need to update? Thanks for helping.


Example: Get board items


The example will return the first 5 items of a specifc


board and include all collumn values.


query GetBoardItems{

boards(ids: {{target_board_id}} {

items_page(limit: 5) {

items {

id

name

column_values {

id

value

}

}

}

}

}


And this is the Query of interface between MOnday and Power BI:


// Queries Monday.com items from a specific board

// Created by Guilherme Chaguri

// Replace the API Key and Board ID for it to work


let

Key = “My key”,

Board = “2910485819”,

Source = Web.Contents(

https://api.monday.com/v2”,

,

Headers=

#“Method”=“POST”,

#“Content-Type”=“application/json”,

#“Authorization”=“Bearer " & Key

],

Content=Text.ToBinary(”{““query””: ““query { boards(ids: " & Board & “) { items { name, updated_at, group { title }, columns: column_values { title, text } } } }””}”)

]

),

Data = Table.FromList(Json.Document(Source))data]
#“Monday” = Table.FromRecords(Table.TransformRows(Data, each

List.Accumulate( Columns], R

Title = oTitle],

UpdateDate = tUpdatedAt],

Group = rGroup]ttitle]

], (state, current) => Record.AddField(state, currentptitle], current text]) )

)),

#“Type modifié” = Table.TransformColumnTypes(Monday,{{“Identifiant”, type text}, {“Date assign. pré-analyse”, type date}}),

#“Fractionner la colonne par position” = Table.SplitColumn(#“Type modifié”, “UpdateDate”, Splitter.SplitTextByRepeatedLengths(10), {“UpdateDate.1”, “UpdateDate.2”}),

#“Type modifié1” = Table.TransformColumnTypes(#“Fractionner la colonne par position”,{{“UpdateDate.1”, type date}, {“UpdateDate.2”, type text}}),

#“Fractionner la colonne par position1” = Table.SplitColumn(#“Type modifié1”, “Dernière mise à jour”, Splitter.SplitTextByRepeatedLengths(10), {“Dernière mise à jour.1”, “Dernière mise à jour.2”, “Dernière mise à jour.3”}),

#“Type modifié2” = Table.TransformColumnTypes(#“Fractionner la colonne par position1”,{{“Dernière mise à jour.1”, type date}, {“Dernière mise à jour.2”, type time}, {“Dernière mise à jour.3”, type text}}),

#“Fractionner la colonne par délimiteur” = Table.SplitColumn(#“Type modifié2”, “Échéances Préanalyse”, Splitter.SplitTextByDelimiter(" “, QuoteStyle.Csv), {“Échéances Préanalyse.1”, “Échéances Préanalyse.2”, “Échéances Préanalyse.3”}),

#“Type modifié3” = Table.TransformColumnTypes(#“Fractionner la colonne par délimiteur”,{{“Échéances Préanalyse.1”, type date}, {“Échéances Préanalyse.2”, type text}, {“Échéances Préanalyse.3”, type date}}),

#“Colonnes supprimées” = Table.RemoveColumns(#“Type modifié3”,{“Échéances Préanalyse.2”}),

#“Fractionner la colonne par délimiteur1” = Table.SplitColumn(#“Colonnes supprimées”, “Échéance souhaitée”, Splitter.SplitTextByDelimiter(” ", QuoteStyle.Csv), {“Échéance souhaitée.1”, “Échéance souhaitée.2”, “Échéance souhaitée.3”}),

#“Type modifié4” = Table.TransformColumnTypes(#“Fractionner la colonne par délimiteur1”,{{“Échéance souhaitée.1”, type date}, {“Échéance souhaitée.2”, type text}, {“Échéance souhaitée.3”, type date}}),

#“Colonnes supprimées1” = Table.RemoveColumns(#“Type modifié4”,{“Échéance souhaitée.2”}),

#“Colonnes renommées” = Table.RenameColumns(#“Colonnes supprimées1”,{{“Échéances Préanalyse.1”, “Échéances Préanalyse Debut”}, {“Échéances Préanalyse.3”, “Échéances Préanalyse Fin”}, {“Échéance souhaitée.1”, “Échéance souhaitée Debut”}, {“Échéance souhaitée.3”, “Échéance souhaitée Fin”}}),

#“Type modifié5” = Table.TransformColumnTypes(#“Colonnes renommées”,{{“Date de la demande”, type date}})

in

#“Type modifié5”

Hello there @JorgeTORRES and welcome to the community!


I hope you like it here 💪


Your first query looks almost correct, but I see in the one in your script you use boards->items without using items_page.


You can change it to something like this:


{
boards(ids: 1111111) {
items_page(limit: 5) {
items {
id
name
column_values {
id
value
}
}
}
}
}

Let me know how that goes!


Cheers,

Matias


Thanks so much Matias! it is working very well, best regards from Canada!


Happy to help @JorgeTORRES !!!


Reply