API: GraphQL workaround

Hi Easymorph Community,

I am hoping to get some guidance/assistance in regards to API POST requests. The endpoint I am hitting uses GraphQL so I need to create a query when I send the request. I am trying to use the “Iterate Web Request” to go through each record in my table to make updates.

Here is the documentation for the API I am targetting: monday.com GraphQL API

I am having trouble figuring out how to create the query string in my request body. I need to be able to send a query like the below.

The only wait I am currently figuring that I can handle this is using selecting JSON as the body in the action and using a parameter for the value. However, it looks like this limits to using the global project parameters and I can’t pull in a column value there.

Does anyone have any ideas about how I might be able to approach this? Best!

mutation {
create_item (board_id:2128789134 , item_name: “22”) {
id
name
} }

Hi Sean and welcome to the Community!

There are multiple ways how to create a request body in EasyMorph. It can be done using text concatenation as in your example. The correct expressions should be:

'mutation { create_item (board_id:2128789134 , item_name: "' & {item_name} & '") { id name } }'

Notice that you can wrap single quotes in double quotes and vice versa.

For more complex JSON objects, you can use the “Construct JSON” action.

It’s also possible to construct a simple JSON object if you specify the request body type as “JSON” in the “Web request” action.

Thanks,

I appreciate the reply back. I spent some time with your suggestions and have learned quite a bit this week. Still have some more learning and tinkering to do but I am a lot closer towards what I am trying to solve for.