Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Richard_Halsall
Helper IV
Helper IV

JSON query text error Monday.com api

Hi

 

I require help with an error I am receiving when querying the Monday.com api, I have tried multiple versions but just can't seem to resolve

 

I have 2 versions of the query and both are returning the same error at the JSON step

 

Version 1

 

let
Key = MondayKey,
Board = id_board,
Group = id_group1,
Source = Web.Contents(MondayBaseURL,
[
RelativePath="v2",
Headers=[
#"Method"="POST",
#"Content-Type"="application/json",
#"Authorization"= Key,
#"API-Version" = "2023-10"
],
Content=Text.ToBinary("{""query"": ""{ boards (ids: " & Board & ") {groups (ids: " & Group & " ) {items_page (limit:500) { cursor items { id name column_values { column{title} text}}}}}}""}")
]
),

#"JSON" = Json.Document(Source,65001),

 

Version 2

let
Key = MondayKey,
Board = id_board,
Group = id_group1,
Source = Web.Contents(MondayBaseURL,
[
RelativePath="v2",
Headers=[
#"Method"="POST",
#"Content-Type"="application/json",
#"Authorization"= Key,
#"API-Version" = "2023-10"
],
Content = Json.FromValue([query= "query { boards (ids: " & Board & ") {groups (ids: " & Group & " ) { items_page (limit:500) { cursor items { id name column_values { column{title} text}}}}}"])
]
),

 

#"JSON" = Json.Document(Source,65001),

 

The error is specific to the groups parameters and states it is expecting a text value. The boards parameter is also a text value and this resolves fine

 

All the parameters I reference in the query are text values

 

Any help or guidance would be appreciated

 

Thanks

 

 

1 ACCEPTED SOLUTION

Hi thanks for taking the time to review and yes id_group1 is text

 

Had a lightbulb moment and amended the parameter value in PQ to replicate what I have in Postman for id_group1 rather than trying to build through the code and it now works.

 

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

so you are absolutely sure that  id_group1 is a text?  Maybe use

 

Group = Text.From(id_group1),

 

Also, could be a freak coincendence that "Group"  is a reserved word?

Hi thanks for taking the time to review and yes id_group1 is text

 

Had a lightbulb moment and amended the parameter value in PQ to replicate what I have in Postman for id_group1 rather than trying to build through the code and it now works.

 

Hi @Richard_Halsall ,

 

Thanks for reaching out to the Microsoft fabric community forum.

I hope your issue has been resolved. If so, please mark the helpful reply and accept it as the solution. This will assist other community members with similar problems in resolving them more quickly.

 

Thank you.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.