Querying monday API with power bi

Hello everyone in the community.

I am using monday API to load the data in my power bi. Recently I started to face a problem of not bringing all monday sub-items.

After a few moments, I noticed that it was necessary to perform some paging in the API so that all the data could be loaded. I did the pagination, but as there is a lot of data, Power BI cannot bring everything in a 1-minute query.

Has anyone ever experienced this? Is there any way to pause the API on each request so it doesn’t overload the queries?

Hello again,

We would love to take a look into your script if you would like to send us an email to appsupport@monday.com with it.

Please specify the steps of your process so we can see the full picture.

See you over there!

Cheers,
Matias

Hello Matias, this is my code, for each id_board I need to go through 6 pages to get all the sub-items available on monday. So, if I have 10 id_boards, power bi will generate 60 pages and for each page, power BI will bring 25 records, totaling 1500 records (60 x 25 = 1500)

(id_board as text, page as text) =>

let
Key = "<API_TOKEN>",


     Source = Web.Contents("https://api.monday.com/",
     [
         RelativePath="v2",
         Headers=[
             #"Method"="POST",
             #"Content-Type"="application/json",
             #"Authorization"= Key
             ],
             Content=Text.ToBinary("{""query"": ""{ boards(ids: "& id_board &") { items (limit: 25, page: "& page&"){ id subitems{name column_values{ title text }} } } }""}")
             ]
     ),
     #"JSON" = Json.Document(Source,65001),
     date = JSON[date],
     boards = data[boards],
     boards1 = boards{0},
     items = boards1[items],
     #"Converted to Table" = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error)
in
     #"Converted to Table"

Hello Matias, this is my code, for each id_board I need to go through 6 pages to get all the sub-items available on monday. So, if I have 10 id_boards, power bi will generate 60 pages and for each page, power BI will bring 25 records, totaling 1500 records (60 x 25 = 1500)

(id_board as text, page as text) =>

let

Key = “<API_TOKEN>”,

Source = Web.Contents(https://api.monday.com/,

[

RelativePath=“v2”,

Headers=[

#“Method”=“POST”,

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

#“Authorization”= Key

],

Content=Text.ToBinary(“{”“query”“: “”{ boards(ids: “& id_board &”) { items (limit: 25, page: “& page&”){ id subitems{name column_values{ title text }} } } }”“}”)

]

),

#“JSON” = Json.Document(Source,65001),

date = JSON[date],

boards = data[boards],

boards1 = boards{0},

items = boards1[items],

#“Converted to Table” = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error)

in

#“Converted to Table”

Internal Use Only

Hi @leorocha,

Thanks for sending this in! Would you please send us an email to appsupport@monday.com with these details so we can take a closer look this issue?
Thanks!

1 Like

Hello Alessandra,

Here is code, as requested by the forum.

(id_board as text, page as text) =>

let

Key = “<API_TOKEN>”,

Source = Web.Contents(https://api.monday.com/,

[

RelativePath=“v2”,

Headers=[

#“Method”=“POST”,

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

#“Authorization”= Key

],

Content=Text.ToBinary(“{”“query”“: “”{ boards(ids: “& id_board &”) { items (limit: 25, page: “& page&”){ id subitems{name column_values{ title text }} } } }”“}”)

]

),

#“JSON” = Json.Document(Source,65001),

date = JSON[date],

boards = data[boards],

boards1 = boards{0},

items = boards1[items],

#“Converted to Table” = Table.FromList(items, Splitter.SplitByNothing(), null, null, ExtraValues.Error)

in

#“Converted to Table”

Internal Use Only

Hello there @leorocha ,

I replied to this in the ticket you opened with us via email :grin:

Let’s please continue over there.

Cheers,
Matias

1 Like

Hello monday friends. Thank you for taking the time to help me. Fortunately I was able to solve the problem with some help from our friends at Microsoft. Thank you again and I believe this question can now be closed.

I would like to leave the solution link registered here, in case another member has the same difficulty;

Microsoft forum link:

Hello again @leorocha,

I am glad you could find the source of the issue!

Our ticket will be closed then.

Thank you for sharing this with the community :grin:

Cheers,
Matias