Excel M Query API

Hi,

Pre-new API i was happily querying a monday board via the excel powerquery ,however post the update i cannot figure out how to re-write the query to return the same data .

So far i have got this which is returning the ID column and the first column in the board i want to query but i want to pull all columns through and all data any help would be much appreciated!

let
apiKey = “My API Key”,
boardId = “My Board ID”,
url = “https://api.monday.com/v2”,
graphqlQuery = “query { boards (ids: “&BoardID&”){ items_page { cursor items {id name} } } }”,
headers = [#“Authorization”=“Bearer " & apiKey, #“Content-Type”=“application/json”],
source = Json.Document(Web.Contents(url, [Headers=headers, Content=Text.ToBinary(”{““query””: “”" & graphqlQuery & “”“}”)])),
data = source[data],
boards = data[boards],
boards1 = boards{0},
items_page = boards1[items_page],
items = items_page[items],
#“Converted to Table” = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#“Expanded Column1” = Table.ExpandRecordColumn(#“Converted to Table”, “Column1”, {“id”, “name”}, {“Column1.id”, “Column1.name”})
in
#“Expanded Column1”

thanks!

1 Like

:rofl: gotta be a joke…

1 Like

Thanks for your response!