Hello All,
I am using this small code in M query (power BI) to extract data out of monday board.
But when i try to schedule a refresh in power BI platform it says “not authenticated”.
Can any one help me to find a way to add authentication in the code or how can i login to this
https://api.monday.com/v2 so that power BI can authenticate itself. Any help will be appreciated.
here is the code.
let
Key = “api token”,
Board = “board id”,
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, columns: column_values { title, text } } } }””}”)
]
),
//Line 19 converts the data inside “data → board-> items” to a table with the column names “Title”, “Updated At”, “Group”, “Columns”
Data = Table.FromList(Json.Document(Source)[data][boards]{0}[items], Record.FieldValues, {“Title”, “Columns”}),
#“Expanded Columns” = Table.ExpandListColumn(Data, “Columns”),
#“Expanded Columns1” = Table.ExpandRecordColumn(#“Expanded Columns”, “Columns”, {“title”, “text”}, {“Columns.title”, “Columns.text”}),
#“Pivoted Column” = Table.Pivot(#“Expanded Columns1”, List.Distinct(#“Expanded Columns1”[Columns.title]), “Columns.title”, “Columns.text”)
in
#“Pivoted Column”
